Quantcast
Channel: VMware Communities : Discussion List - vSphere SDK for Perl
Viewing all articles
Browse latest Browse all 1577

How to retrieve the console ip address of my hosts

$
0
0

Hi,

 

I try to create my first perl script for vmware. I want to retrieve the console ip address of all my hosts under my vCenter. I'm able to retrieve the name of the hosts (I found a script who do that!) but not the ip address.

 

 

my $vmhosts = Vim::find_entity_views(view_type => 'HostSystem', properties => ['name','summary','config']);
print "ESX(i) hosts residing on " . Opts::get_option('server') . "\n";
foreach(@$vmhosts) {
        print "\t" . $_->{'name'} . "\t" . $_->{'summary'}->config->product->fullName . $_->{'config'}->network->consoleVnic->spec->ip->ipAddress . "\n";
}

 

Is that make sense?

 

Regards,

 

Eric


Viewing all articles
Browse latest Browse all 1577

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>