Allows to increase or decrease the size of an existing virtual disk.
PRL_RESULT PrlDisk_Resize( PRL_HANDLE hDisk, PRL_HANDLE hDiskOpParams );
PrlDisk.h
PRL_RESULT. Possible values are:
PRL_ERR_INVALID_ARG - Invalid handle or null pointer was passed. PRL_ERR_SUCCESS - Function completed successfully.
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.