VMware

Discovering the Names of ‘Unknown’ VMs

If you have had any issues with storage failing then you may have seen this issue – the virtual machines appear in vSphere as being ‘Unknown‘ and ‘(inaccessible)‘, as seen in the image.

Usually if the storage comes back up and the host has the storage rescanned then these will revert back to their correct name and the everything is fine again.

In some circumstances, though, they don’t come back up correctly in vCenter and they appear in the same format when connecting directly to the host… you may have your management team breathing down your neck wanting you to get it fixed as soon as possible and you think ‘I’ll recover them from a backup’ – if only you knew the name of the virtual machines!!!

unknownHopefully the following information will assist with going through and discovering the names of the virtual machines…

  • Even when a VM is in an ‘Unknown‘ state in vCenter, it is still registered against a host… if you switch to ‘Hosts & Clusters’ view and then click on ‘Virtual Machines’, you will see the ‘Unknown’ VMs listed and also what host they reside on – this will be the host that you get an inventory from
  • Next you should utilise WinSCP or something similar to connect to the host discovered earlier.
  • Once connected you should download a copy of the vmInventory.xml file from the following location: /etc/vmware/hostd
  • With this file downloaded, I would open it in Wordpad (to keep the correct formatting) and adjust the size of the text ( you may wish to print this out to work through and it is likely to run across multiple pages)
  • Print out the document, this will now become your reference for the virtual machines
  • Go back to the vCenter client, utilising the same view from earlier (you may wish to order the virtual machines by name to make the next task easier) – this should still be performed at the ‘Cluster’ level, as the virtual machines may have been vMotioned to other hosts since the ‘Unknown’ status occurred
  • For each entry on your document, see if you can find the corresponding virtual machine – I tend to go through and tick them if they exist and star them if they do not exist (just to make it easier to reference later)
  • After plowing through all of the VMs listed on the document, you should have a list of virtual machines that still exist ticked on your sheet and the virtual machines that are in the ‘Unknown’ state starred.
  • You can now use this information to perform a restore as required, the ‘Unknown’ virtual machines can be removed from the inventory by right mouse clicking on them and selecting ‘Remove from Inventory’

Leave a Reply

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