8 VBoxManage reference
remember Keep the destination image registered after it was successfully written.
Note: For compatibility with earlier versions of VirtualBox, the “createvdi”
command is also supported and mapped internally to the “createhd” com-
mand.
8.15 VBoxManage modifyhd
Withthe modifyhd command, you can change the type of an existing image between
the normal, immutable and write-through modes; see chapter 5.3,Configuring image
write operations, page 78 for details.
Note: For compatibility with earlier versions of VirtualBox, the “modifyvdi”
command is also supported and mapped internally to the “modifyhd” com-
mand.
Forimmutable (differencing) hard disks only, the modifyhd autoreset on|off
command determines whether the disk is automatically reset on every VM startup
(again, see chapter 5.3,Configuring image write operations, page 78). The default is
“on”.
Inaddition, themodifyhd --compactcommand can be used to compact disk im-
ages, i.e. remove blocks that only contains zeroes. Forthis operation to be effective,
it is required to zero out free space in the guest system using a suitable software tool.
Microsoft provides the sdelete tool for Windows guests. Execute sdelete -c in
the guest to zero the free disk space before compressing the virtual disk image. Com-
paction works both for base images and for diff images created as part of a snapshot.
8.16 VBoxManage clonehd
Thiscommand duplicates a registered virtual hard disk image to a new image file with
a new unique identifier (UUID). The new image can be transferred to another host
system or imported into VirtualBox again using the VirtualDisk Manager; see chapter
3.5,The Virtual Disk Manager, page 43 and chapter 5.4,Cloning disk images, page 80.
The syntax is as follows:
VBoxManage clonehd <uuid>|<filename> <outputfile>
[--format VDI|VMDK|VHD|RAW|<other>]
[--variant Standard,Fixed,Split2G,Stream,ESX]
[--type normal|writethrough|immutable]
[--remember]
where the parameters mean:
118