VirtualBox clone a virtual drive image

Cloning a drive to a new drive is simple:

VBoxManage clonehd existing_current_version.vdi new_target.vdi

Or if you wish to clone to a existing drive use “–existing”

VBoxManage clonehd existing_current_version.vdi existing_target.vdi --existing

Note on using “–existing”: If the existing_target is smaller than the existing_current_version then only the part that will “fit” is copied … so this usually [for windows at least] means that the resulting virtual drive is corrupted; so make sure the target is as large or larger than the existing_version. To modify the size of a virtual drive image check out how to resize a drive.

Note: Older versions of VirtualBox used the command clonevdi instead. At the moment the manual says the following about this “For compatibility with earlier versions of VirtualBox, the “clonevdi” command is also supported and mapped internally to the “clonehd” command.”

3 thoughts on “VirtualBox clone a virtual drive image

  1. Pingback: VirtualBox resize an existing vdi file « Jontas

  2. Thanks for pointing that out, I have now updated the post to use clonehd instead.

Comments are closed.