If you’re new to virtualization, or if you have some experience and want to see the latest R2 features of Windows Server 2012 Hyper-V or Virtual Machine Manager, join us for a day of free online training with live Q&A to get all your questions answered. Learn how to build your infrastructure from the ground up on the Microsoft stack, using System Center to provide powerful management capabilities. Microsoft virtualization experts Symon Perriman and Matt McSpirit (who are also VMware Certified Professionals) demonstrate how you can help your business consolidate workloads and improve server utilization, while reducing costs. Learn the differences between the platforms, and explore how System Center can be used to manage a multi-hypervisor environment, looking at VMware vSphere 5.5 management, monitoring, automation, and migration. Even if you cannot attend the live event, register today anyway and you will get an email once we release the videos for on-demand replay!

This is a field experience I occurred few days back. Customer having HYPER-V cluster which consist of 4 nodes connected to two CSV volumes. One of the VM hosted in the cluster having a problem of not booting properly. It’s been in the saved state. Looking at VMM console I can see the same VM name visible 3 times! and each vm hosted in different HYPER-V host. Tried to delete the VM from the VMM console and received the following error,

“failed to delete configuration: The process cannot access the file because it is being used by another process. (0x80070020) (Virtual machine ID 9AF7EF4C-48EE-43C2-ADE7-E2D4D255B6F9) (Unknown error (0x8006)) “ <Please note VM specific details has been removed>

Tried to log into each hyper-v host VM manager separately and remove the VM but ended with the similar error. Further inspection revealed all duplicate VM names all tried to bind into the same VHD file and the config file in the CSV volume. The problem is all 3 hyper-v hosts holding to the files and cannot be deleted. It’s very clear only way to delete them is by force (Time to use the Jedi power force 🙂 )

From the VMM console you can open the PS (Yes the ultimate Power Shell) and type the following command,

$VM = Get-VM -Name <VM Name> Remove-VM -VM $VM –Force

After that you can refresh the VMM console and see the troublesome VM has been disappeared.

Note: Prior to any of these task as a habit I make sure VM has been backup 🙂