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