Download Virtual Disk API Programming Guide
Transcript
Virtual Disk Mount API VixMntapi_OpenDiskSet() Opens the set of disks for mounting on a Windows or Linux virtual machine. All the disks for a dynamic volume or Logical Disk Manager (LDM) must be opened together. VixError VixMntapi_OpenDiskSet(VixDiskLibHandle diskHandles[], int numberOfDisks, uint32 openMode, VixDiskSetHandle *diskSet); The VixDiskLibHandle type, defined in vixDiskLib.h, is the same as for the diskHandle parameter in the VixDiskLib_Open() function, but here it is an array instead of a single value. Parameters: diskHandles [in] Array of handles to open disks. numberOfDisks [in] Number of disk handles in the array. openMode [in] Must be 0 (zero). diskSet [out] Disk set handle to be filled in. If you want to mount from a Windows system, first call VixDiskLib_Open() for every disk, then use the returned disk handle array to call VixMntapi_OpenDiskSet(), which returns a disk set handle. If you want to mount from a Linux system, call the function VixMntapi_OpenDisks(), which opens and creates the disk set handle, all in one function. VixMntapi_OpenDisks() Opens disks for mounting on a Windows or Linux virtual machine. On Linux, the Logical Volume Manager (LVM) is not yet supported. VixError VixMntapi_OpenDisks(VixDiskLibConnection connection, const char *diskNames[], size_t numberOfDisks, uint32 openFlags, VixDiskSetHandle *handle); Parameters: connection [in] The VixDiskLibConnection to use for opening the disks. Calls VixDiskLib_Open() with the specified flags for each disk to open. diskNames [in] Array of disk names to open. numberOfDisks [in] Number of disk handles in the array. Must be 1 for Linux. flags [in] Flags to open the disk. handle [out] Disk set handle to be filled in. VixMntapi_GetDiskSetInfo() Retrieves information about the disk set. VixError VixMntapi_GetDiskSetInfo(VixDiskSetHandle handle, VixDiskSetInfo **diskSetInfo); Parameters: handle [in] Handle to an open disk set. diskSetInfo [out] Disk set information to be filled in. VMware, Inc. 53