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

Share and Enjoy:
  • Print
  • Digg
  • Sphinn
  • del.icio.us
  • Facebook
  • Mixx
  • Google Bookmarks
  • Blogplay
Fabio Milano has written 79 articles for us. Fabio Milano is a certified RHCE, MCP, and CFOI. He runs an IT consulting and services company called RDS Support inc. Website:http://www.rdssupport.com
The information provided is for educational purposes only. All content including links and comments is provided "as is" with no warranty, expressed or implied. Use is at your own risk and you are solely responsible for what you do with it.

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