vSphere

 View Only
  • 1.  getting filer name or IP , path of datastore

    Posted Sep 28, 2012 09:41 AM

    hi friends,

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



  • 2.  RE: getting filer name or IP , path of datastore

    Posted Sep 28, 2012 03:01 PM

    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";

    }



  • 3.  RE: getting filer name or IP , path of datastore

    Posted Sep 28, 2012 04:40 PM

    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.



  • 4.  RE: getting filer name or IP , path of datastore

    Posted Sep 28, 2012 08:28 PM

    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.