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

help with datetimeinfo

$
0
0


hi,


this is probably a simple question but I do not seem to get it right.


With this code:


# get all esx hosts in Datacenter

my $esxhost_view = Vim::find_entity_views(

    view_type  => 'HostSystem',

    properties =>

);

 


for my $host ( sort { $a->name cmp $b->name } @$esxhost_view ) {


    print $host->name . "\n";
    #print Dumper $host;
    print $host->config->dateTimeInfo;


}

I see I get all the required info from virtual center (both dumping it with Data::Dumper or with the --verbose flag on the script. But when I run it  I keep getting:


Can't call method "dateTimeInfo" on an undefined value at bin/check_esx_time line 30.


How do I get to the ntp config of the esx hosts? I found the vmware health check (https://github.com/lamw/vghetto-scripts/blob/master/perl/vmwareHealthCheck.pl) which seems to do the same I am attempting (see from line 1665) but no cookie.


Thanks in advance for any assistance.


Viewing all articles
Browse latest Browse all 1577

Trending Articles



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