Collapse All
Parallels Virtualization SDK
PrlDisk_Resize Function
PHT_VIRTUAL_DISK See Also

Allows to increase or decrease the size of an existing virtual disk.

Syntax
PRL_RESULT PrlDisk_Resize(
    PRL_HANDLE hDisk, 
    PRL_HANDLE hDiskOpParams
);
File

PrlDisk.h

Parameters

hDiskOpParams
[in] A handle of type PHT_VIRTUAL_DISK_OP_PARAMS identifying the resize parameters object.
hParams
[in] A handle of type PHT_VIRTUAL_DISK identifying the virtual disk object.
Returns

PRL_RESULT . Possible values are:

PRL_ERR_INVALID_ARG - Invalid handle or null pointer was passed. PRL_ERR_SUCCESS - Function completed successfully.

Remarks

Increase :

Disk size can be increased by adding a new storage segment(s) to its configuration or by increasing the size of an existing storage (only the size of the last storage segment in the storage list can be modified). A virtual disk can be comprised of one or more storage segments, which are logical portions of the entire disk. Each storage is contained in a separate file on the physical hard drive. All storages are logically connected in a particular order.

To increase the overall disk capacity, a new storage(s) can be added at the end. In order to do that, specify new storage(s) list to add using PrlDiskParams_SetStorageList function. The type of storage can be either PRL_IMAGE_PLAIN or PRL_IMAGE_COMPRESSED depending on your preferences.

Decrease :

Depending on the new disk size, the size of the last storage segment in the virtual disk storage list will be adjusted or one (or more) storages will be deleted from the end of the list.

See Also
Links
Copyright © 1999-2017 Parallels International GmbH. All rights reserved.