Virtual Machines “Inaccessible” after Datastore Outage


If you ever had to take a NFS datastore down to perform updates on an early release of vSphere 5.1 then you may have seen  (inaccessible) following the grayed and italicized virtual machine name in the vSphere Client.

This is a know issue and is identified in VMware ESXi 5.1u1 release notes as:

Virtual machines residing on NFS datastores are inaccessible in ESXi 5.1 host after vSphere Storage Appliance (VSA) 5.1 exits maintenance mode

The hostd agent reports the status of virtual machines incorrectly to vCenter and the ESXi host after you disconnect the NFS storage as it goes over the Misc.APDTimeout value. This issue is observed on powered off virtual machines.

This issue is resolved in this release.

This issue is commonly seen when an ESXi hosts loses connectivity with an NFS datastore.


Methods for correcting the issue is as follows:

Power CLI:

#Get Inaccessible Virtual Machines
$VMs = Get-View -ViewType VirtualMachine | ?{$_.Runtime.ConnectionState -eq "invalid" -or $_.Runtime.ConnectionState -eq "inaccessible"} | select name,@{Name="GuestConnectionState";E={$_.Runtime.ConnectionState}}write-host "---------------------------"
write-host "Inaccessible VMs"
write-host "---------------------------"


#Reload VMs into inventory
Get-View -ViewType VirtualMachine | ?{$VMs} | %{$_.reload()}

#Show new state of reloaded VMs
$ReloadedVMs = Get-View -ViewType VirtualMachine | ?{$VMs} | select name,@{Name="GuestConnectionState";E={$_.Runtime.ConnectionState}}

write-host "---------------------------"
write-host "Reloaded VMs"
write-host "---------------------------"



vim-cmd vmsvc/getallvms >grep skip
Skipping invalid VM '118'
Skipping invalid VM '127'
vim-cmd vmsvc/reload [NUMBER] 

Articles Cited:

Using Power CLI:
Using vim-cmd:
VMware ESXi 5.1u1 Release Notes:


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s