VMware Cloud Community
Bramha
Contributor
Contributor

How to find NFS volume backing a datastore

I am using the Vsphere Webservice sdk . I need to find the NFS volume backing a NFS based datastore. How do i get this information . In the Managedobject browser I saw the the managed object reference for the dataStore has the objectid in the form "10.72.225.174:/vol/NFS_volume_1". How do I get this objectid from the reference . Is there any other way to get this info ?

thanks,

Tags (3)
0 Kudos
1 Reply
lamw
Community Manager
Community Manager

Yes, you can easily find this by looking at the HostSystem DatastoreSystem: http://www.vmware.com/support/developer/vc-sdk/visdk400pubs/ReferenceGuide/vim.host.DatastoreSystem....

You'll get an array of datastores and just filter out that are of type 'NFS'

=========================================================================

William Lam

VMware vExpert 2009

VMware ESX/ESXi scripts and resources at:

Twitter: @lamw

VMware Code Central - Scripts/Sample code for Developers and Administrators

VMware Developer Community

If you find this information useful, please award points for "correct" or "helpful".