Collapse All
Parallels C API Reference Guide
PrlDisk_IncreaseCapacity Function
PrlDisk.h PHT_VIRTUAL_DISK See Also

Allows to increase the size of an existing virtual disk.

Syntax
PRL_RESULT PrlDisk_IncreaseCapacity(
    const PRL_HANDLE Handle, 
    PRL_CONST_DISK_PARAMETERS_PTR pParams, 
    const PRL_DISK_CALLBACK pDiskCallback, 
    PRL_VOID_PTR pParameter
);
File
Parameters

Handle
A handle of type PHT_VIRTUAL_DISK identifying the virtual disk.
pParams
Virtual disk parameters (see Remarks below).
pDiskCallback
A pointer to a callback function or NULL pointer. If the parameter contains a valid pointer to the callback, the function will be called asynchronously. If it contains a NULL pointer, the function will be called synchronously.
pParameter
A pointer to a buffer containing user-defined data to pass to the callback function.
Returns

PRL_RESULT . Possible values:

PRL_ERR_INVALID_ARG - invalid argument values.

PRL_ERR_SUCCESS - function completed successfully.

Remarks

Disk size can be increased by adding a new storage segment 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 can be added at the end. In order to do that, the members of the PRL_DISK_PARAMETERS structure that you pass in the pParam parameter must contain the following values:

  • m_Parts The number of storages to add (if adding one storage, pass 1).
  • m_Storages A pointer to an array of PRL_IMAGE_PARAMETERS structures. If adding a single storage, pass a pointer to a single structure. The uSize member of the structure must contain the new storage size. The Type member can be either PRL_IMAGE_PLAIN or PRL_IMAGE_COMPRESSED depending on your preferences.
See Also
Links
Copyright © 1999-2011 Parallels Holdings, Ltd. and its affiliates. All rights reserved.
What do you think about this topic? Send feedback!