Make a Copy of VirtualBox .vdi

Scenario / Question:

How do I make a copy of an existing VirtualBox .vdi disk file

Solution / Answer:

Use VBoxManage clonevdi

Copy VirtualBox .vdi

There are a few steps involved in order to make a copy of a VirtualBox .vdi disk file.

#1. Shutdown the Virtual Machine or make sure it is not start/on

#2. Release the .vdi file – File > Virtual Media Manager > Select the virtual machine disk to be copied > Click “Release”

#3. In a terminal or shell prompt (use the full location paths for .vdi locations)

VBoxManage clonevdi /root/.VirtualBox/Original.vdi /root/.VirtualBox/NewCopy.vdi

#4. Add the new virtual disk image – File > Virtual Media Manager > Add

#5. Re-attach original virtual disk image to its VM

1 Comment so far

  1. David Ramirez on November 3rd, 2009

    To release the .vdi file using the command line you can do:

    # remove disk from VM “moody”:
    sh0x@vbox:~# VBoxManage modifyvm moody -hda none

    # restore copied VDI and open medium in virtualbox
    sh0x@vbox:~# VBoxManage openmedium disk /opt/VBox/HardDisks/moody.vdi

    # add disk to VM
    sh0x@vbox:~# VBoxManage modifyvm moody -hda /opt/VBox/HardDisks/moody.vdi

Leave a reply