Cannot connect to virtual machine configuration storage

Well I was testing out ISCSI storage system and used the storage for a VM. Forgot that I had the VM using the ISCSI storage before removing the ISCSI configuration and voila the VM went into critical state and cannot connect to it. The Hyper-V Manager console doesn’t allow to delete VM’s from “Off-Critical” state. We could fix this simply by mapping the configuration file and VHD settings by mounting the ISCSI storage, but the problem here is that the storage no longer exists. We have to force delete the VM from the server.

Force Delete Hyper-V VM

To force delete a Hyper-V VM open a PowerShell with administrator privilege and run the following commands.

Get-VM
Remove-VM -name MyVmName -force

That’s it, the VM should now be removed from the console. Following is an example of the PowerShell window after completing the steps above.

Powershell command to force remove Hyper-V VM

Add a Comment

Your email address will not be published. Required fields are marked *