@vmlist = FindRunningVMs($hostHandle, $timeoutInSeconds);
Returns the virtual machines running on the host associated with hostHandle. The first element in the list is an error code.
use VMware::Vix::Simple; use VMware::Vix::API::Constants;
my @vms = FindRunningVMs($hostHandle, 100); my $err = shift @vms; die "Error $err finding running VMs ", GetErrorText($err),"\n" if $err != VIX_OK; print "VMs: @vms\n";