Name

GetProperties

Description

@properties = GetProperties($handle, $firstPropertyID, ...);

This function allows you to get one or more properties from a handle. For a list of property IDs, see Topics > Types > VixPropertyID.

Parameters

handle
Any handle returned by a Vix function.
firstPropertyID
A property ID. See below for valid values.

Return Value

@properties. Returns the values of requested properties from the object pointed to by $handle. The first element in the list is an error code.

When GetProperties() returns an error, the values of the output parameters are indeterminate.

Remarks

Side Effects

None.

Requirements

use VMware::Vix::Simple;
use VMware::Vix::API::Constants;
since VMware Server 1.0

Example

my $err;
my $myVM = VIX_INVALID_HANDLE;
my $vmPowerState;
my $vmPathName;


# ...Open the virtual machine and get a handle...

($err, $vmPowerState, $vmPathName) = GetProperties($myVM,
                                                   VIX_PROPERTY_VM_POWER_STATE,
                                                   VIX_PROPERTY_VM_VMX_PATHNAME);
if $err != VIX_OK # Handle the error

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