Collapse All
Parallels C API Reference Guide
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 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 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.
Creates a new virtual disk.
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
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
Obtains the information about the specified virtual disk.
This function used to get HDD identify information as it shown in guest OS
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
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.
Reads data from the specified 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
Copyright © 1999-2011 Parallels Holdings, Ltd. and its affiliates. All rights reserved.
What do you think about this topic? Send feedback!