VMware {code} Community
samsvmware
Enthusiast
Enthusiast

getting filer name or IP , path of datastore

hi friends,

               can you help in getting the informations of datastore's filer name or IP , path .

Reply
0 Kudos
3 Replies
stumpr
Virtuoso
Virtuoso

If it's an NFS mount, it will be in the 'info' property of the Datastore....

$info = $datastore->info;

if ($info->isa('NasDatastoreInfo') { # NAS Datastore

     print "Host: $info->nas->remoteHost . "\n";

     print "Path: $info->nas->remotePath . "\n";

}

Reuben Stump | http://www.virtuin.com | @ReubenStump
Reply
0 Kudos
samsvmware
Enthusiast
Enthusiast

hi stumpr,

thank for ur kind response.....

                    Actually i am using vsphere web client . so i am using "vmware-vsphere-cli-distrib" api perl scripts for fetching the vcenter details,  i used "dsbrowser.pl" file to list the datastore and its lists some information about(name,location,spaces,"freespace",   "hosts",  "vms", "templates") . but i am need of that ("HOST ,IP,PATH") . i don't know our datastore are the 'nas mount ' or not.

Reply
0 Kudos
stumpr
Virtuoso
Virtuoso

You'll probably have to write a custom tool if you need Datastore info beyond what's provided in the tools package you're using.

If you're looking for a more robust tool that reports on Datastore device information, some of the community health check tools may fit the bill for you.  William wrote one and published it in his vGhetto Scripts.

There are probably some other examples.  The examples I have were all customer paid deliverables and would have to be signifigantly scrubbed before I could share them.

Reuben Stump | http://www.virtuin.com | @ReubenStump
Reply
0 Kudos