Duplicating a VirtualBox Hard Disk on Mac Host

I’m running VirtualBox on a Mac OS X host, and I had one .VDI hard disk file that I needed to duplicate into three and use them all at the same time. When I tried to load them all into different VMs inside VirtualBox, I got an error that a hard disk with that UUID was already in use.

Turns out that you can’t just duplicate the hard disk file–you need to use a command called VBoxManage to do it. But it took me a while to find out how to run that command on a Mac.

Here’s what you need to do in a console window:


/Applications/VirtualBox.app/Contents/MacOS/VBoxManage clonevdi path/to/yourold.vdi path/to/vditocreate.vdi

It will probably take a while, and it will only update the progress indicator every 10% or so, so have some patience and you should be set. Once the duplicate is made, just create a new VM in VirtualBox, and choose your new .VDI file.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: