Friday, March 18, 2011

Unknown VMs, missing datastores

Symptoms of the Issue: 
All the VMs are listed as unknown in a host or cluster ex: unknown, unknown 1, unknown 2
When you select a VM in the left pane under the summary tab you will not see the datastore containing the VM.
You will be able to see the LUN presented in the configuration>storage but through command line too you will not be able to see the LUN presented to the host or cluster.
What worked for me:
esxcfg-volume -M "VMFS UUID" and service mgmt-vmware restart
What caused it :
You moved all the data from the EVA 4000 to EVA 64000.
OR
After A normal Reboot you face this problem
OR
LUNs are detected as snapshots
Why :

when you unpresent and represent an LUN from the Command VIEW side the LUNs are getting an new NAA.XXXXXX Numbers, so the ESX couldn’t find that again. The datastore is then displayed in grey and is not accessable.
Also even when you remount the Datastores back to the ESX Host, the generated UUID for the particular LUN has been changed and this would result in “unable to power on the VM” because the full path for the swap file
is including the UUID which is after the remount different: