The PHT_VIRTUAL_DISK handle is used to create, configure, and manage Virtuozzo virtual disks. A virtual disk is comprised of a set of files including a configuration file containing information about the disk parameters (number of heads, cylinders, sectors, etc.) and the files that are used for data storage. Once created, a virtual disk can be connected to a virtual machine and recognized by it, just like a physical hard disk can be installed in a physical box. To create a new virtual disk use PrlDisk_CreateDisk or PrlDisk_CreateDisk_Local. To obtain a handle to an existing virtual disk, use PrlDisk_OpenDisk or PrlDisk_OpenDisk_Local. You must always free the handle using the PrlDisk_Free function when the handle is no longer needed. Failure to do so will result in memory leak.
The functionality provided by this handle offers more low-level control over new and existing virtual disks. You can use it to create standalone new disks and then decide on the virtual machine to which the disk should be connected. You can also manage existing disks, including those used by virtual machines. If, however, all you want to do is create a virtual machine and a virtual disk at the same time, or add a virtual disk to a virtual machine in a few easy steps, you can use the functionality provided by the PHT_VIRTUAL_MACHINE and PHT_VM_CONFIGURATION handles. You can also consult Virtualization SDK Programmer's Guide for a detailed explanation and code samples on how to create a new virtual machine and how to add a virtual disk to an existing virtual machine.
|
Name |
Description |
|
This function can be used to create a new virtual disk locally without being connected to the Virtuozzo Service. | |
|
Frees the PHT_VIRTUAL_DISK handle. | |
|
Obtains the information about the specified virtual disk. | |
|
Obtains a handle of type PHT_VIRTUAL_DISK identifying an existing virtual disk on a local machine. | |
|
Reads data from the specified virtual disk. | |
|
Reverts a virtual disk to the specified snapshot. | |
|
Waits for the background thread to finish executing before returning control to the client. | |
|
Writes data to the specified virtual disk. | |
|
Reports the size (in bytes) of a block mapped by a single bit in the map. | |
|
Reports the number of significant bits in the map. | |
|
Returns bits from the blocks map. | |
|
Obtains a handle of type PHT_VIRTUAL_DISK_OPEN_POLICY identifying an offset policy. |