N-central Help

Convert VHD to New VHD File

Converts a virtual hard disk file by copying the data from a source virtual hard disk file to a new virtual hard disk file of a specified format and version type. The format is determined by the file extension of the specified files, either .vhdx or .vhd. Conversion is an offline operation; the virtual hard disk must not be attached when the operation is started.

Input Parameters

Name Type Required Description
VHD File Path String Yes Specifies the path to the virtual hard disk file to be converted. If a file name or relative path is specified, the path of the converted hard disk path is calculated relative to the current working directory
Parent VHD File Path String No Specifies the parent path for the destination-differencing virtual hard disk file.
New VHD File Path String Yes Specifies the path to the converted virtual hard disk file.
Convert to VHDX Boolean No Optionally, you can convert a VHD file to VHDX.
Delete Source Boolean No Optionally, you can delete a source VHD file.
File Block Size String No Specifies the block size, in bytes, of the virtual hard disk after conversion.

Output Parameters

Name Type Description
Result Number Returns a success value of zero or any value other than zero to indicate failure.

Example Input Parameters

Name Type Required Example
VHD File Path String Yes c:\test\childvhdx.vhdx
Parent VHD File Path String No c:\test\parentvhd.vhd
New VHD File Path String Yes c:\test\child1vhd.vhd
Convert to VHDX Boolean No Optionally, you can convert a VHD file to VHDX.
Delete Source Boolean No Optionally, you can delete a source VHD file.
File Block Size String No 33554432