Name

FindItems

Description

@vmlist = FindItems($hostHandle, $searchType, $timeoutInSeconds);

Returns the the VMs running on the host associated with the hostHandle. The first element in the list is an error code.

Parameters

hostHandle
The host handle returned by HostConnect().

searchType
The type of items to find. Values are listed in the Types Reference under VixFindItemType.

timeoutInSeconds
must be -1.

Return Value

A list, with an error code as the first entry, and the paths of Virtual Machine's matching $searchType following.

Remarks

FindRunningVMs() is a shortcut to FindItems() with searchType VIX_FIND_RUNNING_VMS.

Side Effects

None.

Requirements

use VMware::Vix::Simple;
use VMware::Vix::API::Constants;
Since VMware Workstation 6.5

Example

my @vms = FindItems($hostHandle, VIX_FIND_REGISTERED_VMS, 100);
my $err = shift @vms;
die "Error $err finding registered VMs ", GetErrorText($err),"\n" if $err != VIX_OK;

print "Registered VMs: @vms\n";

Copyright (C) 2007-2017 VMware, Inc. All rights reserved.