jeremypage
Enthusiast
Enthusiast

Cannot delete orphaned VMs from VI?

Jump to solution

So I had a server and it died. Very sad. 2 of the VMs that where on it are greyed out in VI and I need to bring them up via re-registering them, but before I can do that I have to get their ghosts out of VI, any suggestions?

Right clicking does not have that as an option.

0 Kudos
1 Solution

Accepted Solutions
wgardiner
Hot Shot
Hot Shot

Im assuming your user account should have permissions to "remove from inventory"? Do you get the option to remove from inventory for other VMs? Does your VI Client think the server in question is still powered on?

I'd restart your virtual center service as well..as it seems to be out of sync with whats actually going on.

View solution in original post

0 Kudos
11 Replies
wgardiner
Hot Shot
Hot Shot

Have you tried manually registering them on the new ESX box?

/usr/bin/vmware-cmd -s register <config_file_path>

0 Kudos
VMKR9
Expert
Expert

Right clicking should allow you to remove from the inventory? you could just create a new vm and point it to the existing vmdks?

0 Kudos
espi3030
Expert
Expert

Try this - browse datastore, click on folder in which the vm resides, within the right side window right click on the vmx file and select "Add to Inventory", enter machine name, choose datacenter, click next until complete.

0 Kudos
jeremypage
Enthusiast
Enthusiast

Guys the problem is it won't let me add it to the inventory because there is already a VM with that name registered with VI.

0 Kudos
VMKR9
Expert
Expert

Do you not get remove from inventory from the right click menu? As I said you can create a new vm, give it a slightly different name and point it at the existing disks that way you can at least get your vm up and running...

0 Kudos
wgardiner
Hot Shot
Hot Shot

Im assuming your user account should have permissions to "remove from inventory"? Do you get the option to remove from inventory for other VMs? Does your VI Client think the server in question is still powered on?

I'd restart your virtual center service as well..as it seems to be out of sync with whats actually going on.

View solution in original post

0 Kudos
Troy_Clavell
Immortal
Immortal

try restarting the VCMS service to clear the orphan. Once the orphan is gone you will be able browse the datastore and add the VM into inventory.

espi3030
Expert
Expert

I just had a similar problem, and when I restored my VM from backup when adding vm to inventory I was prompted if I wanted to overwrite the current file. I was hoping you would get the same prompt and solve your issue. Sounds like the "gohst" is in your VC database, perhaps you can reboot that server during some down time?

jeremypage
Enthusiast
Enthusiast

Restarting VI did it, thanks.

0 Kudos
rpartmann
Hot Shot
Hot Shot

Hi,

if possible you could do on the ESX box

/usr/bin/vmware-cmd -s unregister

for each of the vm´s.

Or you also could also remove the ESX host from the VC inventory and add the ESX host back to VC afterwards.

hth,

Reinhard.

ps: Award points if you find answers helpful. Thanks.

ps: Award points if you find answers helpful. Thanks.
0 Kudos
bspies
Enthusiast
Enthusiast

I am not sure if this is the same problem I just had but, I found after removing a bad lun that I had an orphan (named "unknown"). Searching around I found this discussion, so I was getting prepared to explain that we needed an outage to clear this. However after some goofing around with the VIC, I noticed that I could select the "unknown" guest in the right-hand pane, and go to "edit" and there was a "remove" option. This actually removed my "unknown" orphan. So for what it is worth, maybe restarting your VI is not the only option.

0 Kudos