NFS Shares don’t reconnect after ESX reboot

There seems to be an issue when an ESX host is rebooted whilst connected to a QNAP filer where, once the reboot completed, all guest VMs show as Unknown X (inaccessible). On further investigation, the NFS mount is also is a disconnected state.

To fix this:
First try:

  1. SSH to QNAP.
  2.  Run:
    [~] # /etc/init.d/nfs restart
  3. Go back into vSphere client and see if the issue has been resolved.

  1. Unmount the ‘broken’ NFS share from vSphere client –> Configuration –> Storage.
  2. Navigate to the QNAP administration page –>Network Service –> NFS services, 
  3. Untick Enable NFS Service and click Apply.
  4. Tick Enable NFS Service and click Apply.
  5. Return to the NFS share from the vSphere client and re-add the NFS share, or use the ESX shell:
~ # esxcfg-nas -a -o WNAS01 -s /share/ESXDS01 ESXDS01

 WNAS01 = Hostname of QNAP
/share/ESXDS01 = nfs path containing VMs
ESXDS01 = share name

According to VMWare to restore these connections, the Unknown VMs should be removed and re-added to the inventory. The file /etc/vmware/hostd/vmInventory.xml contains the list of VMs in the inventory.

QNAP TurboNAS TS-559 Pro II (Firmware: 3.8.1 Build 20121205)
ESXi 5.0.0, 914586 (free)

Please feel free to leave a comment...