Public Member Functions | |
void | createDynamicImage (in unsigned long long size,[retval] out IProgress progress) |
Starts creating a dymically expanding hard disk image in the background. | |
void | createFixedImage (in unsigned long long size,[retval] out IProgress progress) |
Starts creating a fixed-size hard disk image in the background. | |
void | deleteImage () |
Deletes the existing hard disk image. | |
Public Attributes | |
attribute wstring | location |
Location of this custom hard disk. | |
readonly attribute wstring | format |
The plugin name of the image file. | |
readonly attribute boolean | created |
Whether the virual disk image is created or not. |
This interface allows to add support for custom hard disk formats to VirtualBox.
Objects that support this interface also support the IHardDisk interface.
Hard disks using custom hard disk formats can be either opened using IVirtualBox::openHardDisk() or created from scratch using IVirtualBox::createHardDisk().
When a new hard disk object is created from scratch, an image file for it is not automatically created. To do it, you need to specify a valid location, and call createFixedImage() or createDynamicImage(). When it is done, the hard disk object can be registered by calling IVirtualBox::registerHardDisk() and then attached to virtual machines.
The description of the hard disk is stored in the VirtualBox configuration file, so it can be changed (at appropriate times) even when accessible returns false
. However, the hard disk must not be attached to a running virtual machine.
{A7B0236D-3FF4-47C0-A4AA-DDC4DDC1141A}
void ICustomHardDisk::createDynamicImage | ( | in unsigned long long | size, | |
[retval] out IProgress | progress | |||
) |
Starts creating a dymically expanding hard disk image in the background.
The previous image associated with this object, if any, must be deleted using deleteImage, otherwise the operation will fail.
size | Maximum logical size of the hard disk in megabytes. | |
progress | Progress object to track the operation completion. |
void ICustomHardDisk::createFixedImage | ( | in unsigned long long | size, | |
[retval] out IProgress | progress | |||
) |
Starts creating a fixed-size hard disk image in the background.
The previous image, if any, must be deleted using deleteImage, otherwise the operation will fail.
size | Logical size of the hard disk in megabytes. | |
progress | Progress object to track the operation completion. |
void ICustomHardDisk::deleteImage | ( | ) |
Deletes the existing hard disk image.
The hard disk must not be registered within this VirtualBox installation, otherwise the operation will fail.
This operation is valid only for non-differencing hard disks, after they are unregistered using IVirtualBox::unregisterHardDisk().
attribute wstring ICustomHardDisk::location |
Location of this custom hard disk.
For newly created hard disk objects, this value is null
.
The format of the location string is plugin-dependent. In case if the plugin uses a regular file in the local file system to store hard disk data, then the location is a file path and the following rules apply:
true
. readonly attribute wstring ICustomHardDisk::format |
The plugin name of the image file.
readonly attribute boolean ICustomHardDisk::created |
Whether the virual disk image is created or not.
For newly created hard disk objects or after a successful invocation of deleteImage(), this value is false
until createFixedImage() or createDynamicImage() is called.