Forcefully Removing a VM From VMM 2012

I was on a customer site and was asked to help remove a virtual machine from VMM that had failed to V2V correctly from vSphere.  VMM locks the VM in a V2V state and won’t let you repair/undo/anything to the VM.  Not very helpful!

Any attempt to delete the VM was met with the following failure in Jobs:

Error (2604)
Database operation failed.

Recommended Action
Ensure that the SQL Server is running and configured correctly, and try the operation again.

First, I verified that I was targeting the correct VM … don’t want to accidentally delete the source VM from vSphere before a correct V2V:

Get-SCVirtualMachine | where { $_.Name -EQ "Bad-V2V-VM"} | fl name, status

Name   : Bad-V2V-VM
Status : V2VCreationFailed

Next up I took the above code and replaced the FL cmdlet with Remove-SCVirtualMachine, and forced the removal to complete:

Get-SCVirtualMachine | where { $_.Name -EQ "Bad-V2V-VM"} | Remove-SCVirtualMachine –Force

Please follow and like us:

2 Replies to “Forcefully Removing a VM From VMM 2012”

  1. Both the VM is having the same name except one is running and another is UnsupportedCluster. This is due to the shared storage was corrupted and replaced.

Leave a Reply

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

This site uses Akismet to reduce spam. Learn how your comment data is processed.