Have you tried the following:
1) restart the management service on ESX host:
service mgmt-vmware restart
2) restart the vCenter service
3) You can take a look at this Perl script I wrote that uses the VI Perl Toolkit to remove orphaned VM(s): http://communities.vmware.com/message/1243621#1243621
VMware vExpert 2009
VMware ESX/ESXi scripts and resources at: http://engineering.ucsb.edu/~duonglt/vmware/
If you find this information useful, please award points for "correct" or "helpful".
as mentioned above, I had done the restart of services on host and vcenter server several times, rebooted servers. Tried powershell and it wants to finish the migration. I will give the perl script a try.
Script did not work either orphans remain, error message is the same type thing as in powershell.
SOAP Fault: Fault string: A general system error occured: You must power off the virual machine and complete the migration before invoking this operating.
completing the migration is going to be hard since I already removed the messed up vm files.
Check if the vm exists in the inventory file, /etc/vmware/hostd/vmInventory.xml. If it does, save the file, remove the entry, and restart hostd, 'service mgmt-vmware restart'
i worked with vmware support on this issue, and ended up coming up with my own "solution" if this is a cluster a fix is pretty simple... I had all the same symptoms you had as well...
1. Place Node in Maint Mode
2. Remove Node from the Cluster
3. Re-Add the node to the Cluster..
Presto - Fixed.
Matter of fact, here is my original thread on this issue. http://communities.vmware.com/thread/203764?tstart=0
I think the only caveat is, that if you have Resource Pools in place this will screw those up on that node/vm's... but thats really wasnt an issue/concern for me in my case..
that did it runclear! I did not try the other one, so I don't know if that works, but removing from cluster and readding it did the trick and it was easy. Thanks.
Very Cool - Glad it worked, i beat my head on the desk for a few hours trying to figure it out... just as all the other posters suggested, i did all of those things as well, ie: looking through the XML file for the guest .. etc etc...
Excellent post kjb007! This sollution worked like a charm