These are simple utilities to manipulate Microsoft Virtual Hard Disks (VHD/VHDX) from the command line.
Windows 7 / Server 2008 R2 or newer is required. Windows 8 / Server 2012 or newer is required for in-place resizing (resizevhd
) and VHDX support.
makevhd [-d] vhd size [source] -d Use dynamic allocation for the virtual disk. vhd Path of the VHD file to be created. size Maximum size, in bytes, of the VHD; must be a multiple of 512. Alternatively, DVD or BD can be specified for preset sizes. If set to 0, the size of the source disk, if available, will be used. source Path of an optional source whose data will populate the new VHD.
makevhd -f vhd parent -f Create a differencing VHD. vhd Path of the differencing VHD file to be created. parent Path of an existing disk to be associated as the parent.
resizevhd [-f] vhd size -f Forcibly truncate the data stored within the VHD, if necessary. vhd Path of the VHD file to be resized. size Maximum size, in bytes, of the VHD; must be a multiple of 512. Alternatively, DVD or BD can be specified for preset sizes. If set to 0, reduce the VHD to the smallest possible size.
Note: In-place resizing of a virtual disk using resizevhd
can only be used to enlarge .vhd
files; .vhdx
files can be either enlarged or shrunken using resizevhd
. To shrink a .vhd
file or to resize a disk on Windows 7, use makevhd
instead (see Usage Examples below).
makevhd example.vhd BD
makevhd -d example.vhd 0x200000000
makevhd -d resized.vhd 8589934592 original.vhd
resizevhd example.vhd 8589934592
makevhd full.vhd 0 dynamic.vhd
makevhd -d dynamic.vhd 0 full.vhd
makevhd -f diff.vhd parent.vhd
makevhd -d merged.vhd 0 diff.vhd
makevhd merged.vhd DVD diff.vhd
Name | Last modified | Size | Description | |
---|---|---|---|---|
Parent Directory | - | |||
vhdutils-1.0.0-redist.7z | 2013-09-11 02:15 | 10K | ||
vhdutils-1.0.0-redist.md5 | 2013-09-11 02:15 | 60 | MD5 hashes |