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

With the 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.

For immutable (differencing) hard disks only, the modifyhd autoreset onoff 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”.

In addition, the modifyhd --compact command can be used to compact disk im- ages, i.e. remove blocks that only contains zeroes. For this 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

This command 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 Virtual Disk 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 VDIVMDKVHDRAW<other>]

 

[--variant Standard,Fixed,Split2G,Stream,ESX]

 

[--type normalwritethroughimmutable]

 

[--remember]

where the parameters mean:

118

Page 118
Image 118
Sun Microsystems 3.0.0 user manual VBoxManage modifyhd, VBoxManage clonehd