Thursday, June 13, 2013

Removing a vm from hyper, forcefully

When moving around vhdx-files for Hyper-V machines the machine might get in a disconnected mode. Words like catastrophic failure and disconnected state where thrown around.

Well, Ive removed the files. I know nothing important is missing and I just want the vm gone from my HyperV Manager Console.

Didn’t work with powershell, remove-vm –name “bloodymachine” , gets error about state. This worked though:

  1. Stop Hyper-V services from HyperV Manager
  2. Go to : C:\Programdata\microsoft\windows\hyper-v\virtual machines and delete the GUID that is associated with the machine. If you don’t know find the GUID, just check created date. Really only recommended in a lab-environment.
  3. Start Hyper-V services and the menacing machine is vanquished

For really finding out GUID check out references

References:

http://blogs.technet.com/b/m2/archive/2008/07/04/how-to-get-the-bios-guid-from-a-hyper-v-vm.aspx?ppud=4&wa=wsignin1.0 – finding out GUID HyperV

http://www.petri.co.il/get-hyper-v-virtual-machine-process-id-and-guid.htm – more GUID exploration guides.

http://ashwaniashwin.wordpress.com/2013/04/17/hyper-v-error-while-deleting-virtual-machine-the-operation-cannot-be-performed-while-the-object-is-in-its-current-state/

No comments:

Powershell and Uptimerobot

Uptimerobot can be quite tedious when you need to update many monitors at once. For example say you bought the license for Uptimerobot and n...