Name

VixDiskLib_EndAccess

Description

VixError
VixDiskLib_EndAccess(const VixDiskLibConnectParams *connectParams,
                     const char *identity);

This function is used to notify the host of a virtual machine that the virtual machine disks are closed and that the operations which rely on the virtual machine disks to be closed can now be allowed.

This must be called after closing all of the disk belonging to the virtual machine, and after deleting the snapshot of the virtual machine.

Normally, this function is called after previously calling VixDiskLib_PrepareForAccess, but it may be called as a matter of cleaning up after a program crash.

See also VixDiskLib_PrepareForAccess().

Parameters

connectParams
A struct containing the parameters to establish a connection.
identity
An arbitrary string identifying the application.

Return Value

VIX_OK if the function succeeded, otherwise an appropriate VIX error code.

Remarks

Example

   VixError vixError;
   VixDiskLibConnectParams cnxParams = {0};
   cnxParams.vmName = NULL;
   cnxParams.serverName = hostName;
   cnxParams.credType = VIXDISKLIB_CRED_UID;
   cnxParams.creds.uid.userName = userName;
   cnxParams.creds.uid.password = password;
   cnxParams.port = port;
   vixError = VixDiskLib_EndAccess(&cnxParams, "myApp");

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