Hi,
Thank you for your posting!
Based on your descriptions, I would like to first check your environment:
"An unexpected shutdown of all nodes in our Hyper-V cluster, there is a VM which is stuck in starting state."
Is the node in the sentence equal to VM, or does it mean that there are multiple VMs on one node?
If your issue is concerned with the latter, you may encounter unexpected failover in your cluster, and you can try these steps:
- Try to turn off your VM from Hyper-V Manager if you could see your VM on Hyper-V Manager.
2) Try to kill the worker process corresponding to the VM in Task Manager. To find the VM's working process, you can go to the location where you store the VM configuration file for your VM and pick up the VM ID, the ID is at the end of the location:
%systemdrive%\programdata\Microsoft\Windows\Hyper-V\Virtual Machines**<VM_GUID>**
2) Restart the VMMS service on both the nodes (the primary server and the one that your VM is moving to) and check. Still not resolved then proceed further. You can run command Get-ClusterResource to check your VM status.
3) You can run command to try to stop, turn off or remove your VM:
-Get-ClusterResource "Virtual Machine" | Set-ClusterParameter OfflineAction value
-Use Remove-ClusterResource command forcibly to remove your VM. How to use:
https://learn.microsoft.com/en-us/powershell/module/failoverclusters/remove-clusterresource?view=windowsserver2019-ps
Thank you for your support!
Best regards
Joan
If the Answer is helpful, please click "Accept Answer" and upvote it.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.