Name

VixDiskLib_PrepareForAccess

Description

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

This function is used to notify the host of the virtual machine that the disks of the virtual machine will be opened. The host disables operations on the virtual machine that may be adversely affected if they are performed while the disks are open by a third party application.

This function must be called before creating a snapshot on the virtual machine or opening any disks of the virtual machine

See also VixDiskLib_EndAccess.

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 = "moRef=XXXX";
   cnxParams.serverName = hostName;
   cnxParams.credType = VIXDISKLIB_CRED_UID;
   cnxParams.creds.uid.userName = userName;
   cnxParams.creds.uid.password = password;
   cnxParams.port = port;
   vixError = VixDiskLib_PrepareForAccess(&cnxParams, "myApp");

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