VMware {code} Community
Mobster
Contributor
Contributor

Accessibility of datastore

I need to determine whether a given datastore is accessible from ESX

hosts. I notice that the datastore MO has a property called

accessible. However, in my testing, even when I take the datastore down

(it was a test NFS datastore and I just shut the NFS host down), the

accessible property still return true.

Does anyone know of a way to determine when/if a given datastore is no longer accessible by an ESX host?

Many thanks in advance for your help.

--Moby

Tags (2)
0 Kudos
1 Reply
njain
Expert
Expert

You may have to use RefreshStorageSystem to update the storage information for the ESX server. Sometimes, it may take some time for the ESX server to pick up the changes occurred and reflect them. Before checking the "accessible" property, invoke RefreshStorageSystem method and the property should reflect the correct status.

0 Kudos