IVMVirtualServer::CreateDifferencingVirtualHardDisk method
The CreateDifferencingVirtualHardDisk method creates a differencing virtual hard disk.
Syntax
HRESULT CreateDifferencingVirtualHardDisk(
[in] BSTR imagePath,
[in] BSTR parentPath,
[out] IVMTask **diskTask
);
Parameters
-
imagePath [in]
-
The path to the new disk image file. The containing folder will be created if it does not exist.
-
parentPath [in]
-
The path to the parent disk image file.
-
diskTask [out]
-
Retrieves the task which is used to track the creation of the image.
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 imagePath, parentPath, or diskTask parameter is NULL. |
|
The system cannot find the path specified by the imagePath or parentPath parameter. |
|
The imagePath or parentPath parameter contains an invalid character (one of "*?:<>/|""). |
|
Both the imagePath and parentPath parameter specifies an empty or relative path. At least one of the parameters must be an absolute path. |
|
The path specified by the imagePath or parentPath parameter is too long. The length of the path must be less than 260 characters. |
|
The file referenced by the imagePath parameter already exists. |
|
The dynamically expanding virtual hard disk image needs at least 8 MB free on the host volume. |
|
The parameter size must be less than 2,088,960 MB. If format is "vmDiskFormat_FAT16", then size must be less than 2000 MB. |
|
Unformatted and FAT16 formatted virtual hard disk images must be at least 3 MB.FAT32 formatted virtual hard disk images must be at least 514 MB. |
|
The host volume cannot support a file this size if the dynamically expanding virtual hard disk image expands to its full limit. The maximum file size for a FAT32 volume is 4 GB. |
|
The virtual hard disk cannot be created after the application has started shutting down. |
|
An unexpected error occurred. |
Remarks
Although either imagePath or parentPath can be a relative path, at least one of these must be an absolute path. If one path parameter is a relative path, it is assumed to be relative to the other path parameter.
Requirements
Product |
Microsoft Virtual Server 2005 onWindows Server 2003 |
Download |
Microsoft Virtual Server 2005 R2 SP1 Update onWindows Server 2008orWindows Server 2003 |
Header |
|