IVMHardDisk::Convert method
The Convert method converts a disk image to either a dynamically expanding disk image or a fixed-size disk image.
Syntax
HRESULT Convert(
[in] BSTR convertedDiskImagePath,
[in] VMHardDiskType convertedDiskImageType,
[out] IVMTask **convertTask
);
Parameters
-
convertedDiskImagePath [in]
-
The path to the target disk image file.
-
convertedDiskImageType [in]
-
The type of the target disk image. This parameter must be either vmDiskType_Dynamic or vmDiskType_FixedSize. See VMHardDiskType.
-
convertTask [out]
-
The task which is used to track the completion of the conversion process.
Return value
This method supports standard return values, as well as the following. For information on Virtual Server specific return values not listed below, see HRESULT Codes Specific to the Virtual Server.
Return code | Description |
---|---|
|
The operation was successful. |
|
The convertedDiskImagePath or convertTask parameter is NULL. |
|
The system cannot find the path specified by the convertedDiskImagePath parameter. |
|
The convertedDiskImagePath parameter contains an invalid character (one of "*?<>/|":"). |
|
The convertedDiskImagePath parameter specifies an empty or relative path. An absolute path is required. |
|
The path specified by the convertedDiskImagePath parameter is too long. The path must be less than 260 characters. |
|
Either the virtual hard disk referenced by this object is in use or the parent of this virtual hard disk is in use. |
|
The host volume does not have enough space to convert this virtual hard disk. |
|
The file referenced by the convertedDiskImagePath parameter already exists. |
|
The convertedDiskImageType parameter must be either vmDiskType_Dynamic or vmDiskType_FixedSize. |
|
The virtual hard disk image referenced by this IVMHardDisk object does not seem to be a valid image. |
|
The parent of the virtual hard disk referenced by this object does not exist. |
|
The virtual hard disk image cannot be converted because the application is shutting down. |
|
An unexpected error occurred. |
Remarks
The source file is left intact after the conversion process.
Requirements
Product |
Microsoft Virtual Server 2005 onWindows Server 2003 |
Download |
Microsoft Virtual Server 2005 R2 SP1 Update onWindows Server 2008orWindows Server 2003 |
Header |
|