Πώς να σταματήσετε μια κολλημένη εικονική μηχανή Hyper-V.
It is stuck in the Stopping ή Τρέξιμο state and doesn’t give any Turn Off, Shutdown, Αποθηκεύσετε, Pause or Reset options.
One way it’s possible to kill off that stuck virtual machine is to open Task Manger and end the task responsible for that machine. Δυστυχώς, it’s not quite that simple because the Virtual Machine Worker Process which is responsible for running the virtual machine appears numerous times, once for each running guest machine!
Μέθοδος 1
If you have a small number of VMs:
- Ανοιξε Task Manager and view the Λεπτομέριες αυτί;
- You will see many vmwp.exe running processes with the Username column including the machineGUIDs;
- Browse to the location where the virtual machines are stored and open the folder of the virtual machine which is currently hung. From here we can find the machine configuration file and make note of theΟΔΗΓΟΣ for that machine;
- Now we know which ΟΔΗΓΟΣ relates to the virtual machine that we are looking to stop. Jump back to Task Manager, right-click on the correct process, και End Process.
ΣΗΜΕΙΩΣΗ: This process should only be used as a last resort as it could cause corruption of the virtual machine!
Μέθοδος 2
If you have a bunch of running VMs. The fastest way is to find the needed VM GUID with the PowerShell command.
Get-VM <vmname> | fl *
Now we know which ΟΔΗΓΟΣ relates to the virtual machine that we are looking to stop. Jump back to Task Manager, right-click on the correct process, και End Process.
This command pulls a list of virtual machine names and GUIDs then compares that to a list of GUIDs in the Command Line of the processes running and returns virtual machine names with the associated Process ID (δεν VM GUID).
Get-WmiObject Win32_Process -Filter "Name like '%vmwp%'" | %{$vm=get-vm -id $_.CommandLine.split(" ")[1];"$($_.processID)`t$($vm.name)"}
Μέθοδος 3
Use Sysinternals Process Explorer.