Collapse All
Parallels C API Reference Guide
ContentsIndex
PreviousUpNext
PHT_VIRTUAL_DISK
Functions  Functions by Handle  Legend  Send Feedback

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 
 
Merges all snapshots. 
 
Commin unfinished state operation (interrupted) 
 
Compacts a virtual disk. 
 
Compact disk with free blocks map
@param Valid PRL_HANDLE @param Pointer to bit array of used blocks @param Sectors per bit, i.e. 
 
Converts pre-Atlantis disk to Sumer and later. 
 
Converts pre-Atlantis disk to Sumer and later. 
 
Creates a new virtual disk. 
 
This function can be used to create a new virtual disk locally without being connected to the Parallels Service. 
 
Start creation procedure of the new state 
 
Allows to decrease the size of an existing virtual disk. 
 
Start delete state procedure. 
 
Writes data from a virtual disk cache to the real storage. 
 
This method is used to free the disk reference with closing. 
 
Get disk information. 
 
Get snapshots count. 
 
Get snapshots tree. 
 
Get user parameter for disk. 
 
Allows to increase the size of an existing virtual disk. 
 
Check is image compactable. 
 
Obtains a handle of type PHT_VIRTUAL_DISK identifying an existing virtual disk. 
 
Method let to open disk and return handle This function can be used locally, without a Parallels Service connection. 
 
Write data to disk. 
 
Set caching policy for disk. 
 
Set shared directory (all files created somewhere in this directory will have 666 permissions). 
 
Set shared directory (all files created somewhere in this directory will have 666 permissions) This function can be used locally, without a Parallels Service connection. 
 
Set user parameter for disk. 
 
Start switching to state procedure. 
 
Wait for completion of the work. 
 
Write data to disk. 
Links
Copyright (c) 1999-2009 Parallels Software International Inc.
What do you think about this topic? Send feedback!