VMware Cloud Community
Clearview
Contributor
Contributor
Jump to solution

Need help removing an 'orphan' Inventory entry from ESXi4/vSphere

I'd apprecate some assistance as I seem to have managed to tie myself in a bit of a knot.

Having recently installed ESXi 4, we are in the process of moving some virtual machines from older VMWare 1.09 servers to the new ESXi box. I copied one of the VMs into the datastore and then added it to the inventory. When the machine refused to start I then attempted to run the upgrade hardware process.

When this also failed, I must confess that I didn't think and I then proceded to the datastore and deleted the folder containing this VM instead of using the "Delete from disk" option from the inventory right-click menu.

So I am left with an inventory entry which really doesn't exist any more. I've tried to re-copy the VM to exactly the same folder in the datastore in the hope that this would then allow me to remove it from the inventory screen. However, when I right-click on the inventory object, the "Remove from Inventory" and "Delete from disk" options are both greyed out.

Is there any other way to remove this orphaned entry?

Thanks in advance.

Phil.

0 Kudos
1 Solution

Accepted Solutions
nirvy
Commander
Commander
Jump to solution

Hi

In ESXi, your Inventory is maintained in the file /etc/vmware/hostd/vmInventory.xml

Edit the file and see if the VM is listed. If it is, delete it. For example:

<ConfigRoot>
<configEntry id="0000">
<objID>16</objID>
<vmxCfgPath>/vmfs/volumes/4b630d21-8dc368cb-98ea-002219654c96/BADVM.vmx</vmxCfgPath>
</configEntry>
....


</ConfigRoot> 

Backup the file first, then delete from <configEntry> to </ConfigEntry>, save the file then restart the management agents. Once you login again with the VIC, the VM should have gone.

View solution in original post

0 Kudos
2 Replies
nirvy
Commander
Commander
Jump to solution

Hi

In ESXi, your Inventory is maintained in the file /etc/vmware/hostd/vmInventory.xml

Edit the file and see if the VM is listed. If it is, delete it. For example:

<ConfigRoot>
<configEntry id="0000">
<objID>16</objID>
<vmxCfgPath>/vmfs/volumes/4b630d21-8dc368cb-98ea-002219654c96/BADVM.vmx</vmxCfgPath>
</configEntry>
....


</ConfigRoot> 

Backup the file first, then delete from <configEntry> to </ConfigEntry>, save the file then restart the management agents. Once you login again with the VIC, the VM should have gone.

0 Kudos
Clearview
Contributor
Contributor
Jump to solution

Thank you - that seems to have done the job nicely! :smileygrin:

0 Kudos