Collapse All
Parallels Virtualization SDK
ContentsIndex
PreviousUpNext
PHT_VIRTUAL_DISK
Functions  Functions by Handle  Legend

The PHT_VIRTUAL_DISK handle is used to create, configure, and manage Parallels 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.

Notes

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.

Functions
 
Name 
Description 
 
This function used to calculate default block size of disk 
 
Calculate the size of part of "splitted" disk in sectors. 
 
This function used to change the key of the encrypted disk 
 
Combines all available disk snapshots into a single entity. 
 
Commits unfinished state operation (interrupted). 
 
This method is deprecated now. 
 
Compacts a virtual disk with free blocks map. 
 
This function can be used to configure a new virtual disk, which is based on an external physical device, locally without being connected to the Parallels Service. 
 
This function used to convert disk size in blocks to the Cylinders-Heads-Sectors (CHS) format, used at disk creation 
 
Converts virtual disks that were created with an older version of Parallels Service to the current version. 
 
Converts virtual disks that were created with an older version of Parallels Service to the current version. 
 
Convert all Expanding images to Extend_Expanding 
 
Creates a new virtual disk. 
 
This function can be used to create a new virtual disk locally without being connected to the Parallels Service. 
 
This function can be used to create a new virtual disk locally without being connected to the Parallels Service. 
 
Takes a snapshot of the specified virtual disk. 
 
Allows to decrease the size of an existing virtual disk. 
 
This function used to encrypt whole disk 
 
Deletes the specified virtual disk snapshot. 
 
This function used to encrypt whole disk 
 
Estimate compacts for a virtual disk with free blocks map. 
 
Checks and fixes consistency of a virtual disk. 
 
Writes data from a virtual disk cache to the real storage. 
 
Frees the PHT_VIRTUAL_DISK handle. 
 
This function used to get default block size of disk 
 
This function used to get default logical sector size of disk 
 
This function used to get default physical sector size of disk 
 
Obtains the information about the specified virtual disk. 
 
This function used to get HDD identify information as it shown in guest OS 
 
Get Theoretical upper limit (in sectors) after which we have to force splitted disks 
 
Gets virtual disk parameters. 
 
Determines the number of snapshots of the specified virtual disk. 
 
Obtains the entire snapshot tree for the specified virtual disk. 
 
This function used to get splitted disk part size 
 
Gets virtual disk states tree. 
 
Get the UID of the temporary disk snapshot 
 
Retrieves user-defined parameter values stored on a virtual disk. 
 
Allows to increase the size of an existing virtual disk. 
 
This function used to check is the disk bootable or not 
 
Determines if the specified virtual disk can be compacted. 
 
This function used to check is the disk encrypted or not 
 
This function used to create a linked clone disk 
 
Obtains a handle of type PHT_VIRTUAL_DISK identifying an existing virtual disk. 
 
Obtains a handle of type PHT_VIRTUAL_DISK identifying an existing virtual disk on a local machine. 
 
This function can be used to open an existing virtual disk locally without being connected to the Parallels Service. 
 
Reads data from the specified virtual disk. 
 
Open a virtual disk at the specified snapshot. 
 
Allows to increase or decrease the size of an existing virtual disk. 
 
Set the caching policy for a virtual disk. 
 
This function used to set the key to the encrypted disk 
 
Sets necessary access permissions on a directory containing a virtual disk to make the disk accessible to other users. 
 
Sets necessary access permissions on a directory containing a virtual disk to make the disk accessible to other users. 
 
Stores user-defined parameter values on a 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. 
Links
© 2021 Parallels International GmbH. All rights reserved.