Name

HostDisconnect

Description

HostDisconnect($hostHandle);

Destroys the state for a particular host handle.

Parameters

handle
The host handle returned by HostConnect().

Return Value

None.

Remarks

Call this function to disconnect the host. After you call this function the handle is no longer valid and you should not use it in any Vix function. Similarly, you should not use any handles obtained from the host while it was connected.

Side Effects

None.

Requirements

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

Example

use VMware::Vix::Simple;
use VMware::Vix::API::Constants;

my $err = VIX_OK;
my $hostHandle = VIX_INVALID_HANDLE;

($err, $hostHandle) = HostConnect(VIX_API_VERSION,
                                  VIX_SERVICEPROVIDER_VMWARE_VI_SERVER,
                                  "https://viserver/sdk", # hostName
                                  0, # hostPort
                                  "root", # userName
                                  "rootpasswd", # password
                                  0, # options
                                  VIX_INVALID_HANDLE); # propertyListHandle

die "HostConnect() failed, $err ", GetErrorText($err), "\n" if $err != VIX_OK;
# ...Do everything in your program...
HostDisconnect($hostHandle);


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