Copying VirtualBox hard disks

If you take a copy of a VirtualBox hard disk (.vdi file), in the hope of attaching it as another VM, you may receive an error similar to this:

Failed to open the hard disk /home/blah/blah/blah.vdi.

Cannot register the hard disk 'home/blah/blah/blah.vdi' {some-guid} because a 
hard disk 'home/blah/blah/foo.vdi' with UUID {some-other-guid} already exists.

Result Code: NS_ERROR_INVALID_ARG (0x80070057)
Component: VirtualBox
Interface: IVirtualBox {c28be65f-1a8f-43b4-81f1-eb60cb516e66}

Thankfully the internets soon provided an answer, although the syntax has changed slightly:

VBoxManage internalcommands sethduuid blah.vdi

(Although the correct solution, of course, is to use VBoxManage clonehd in the first place!)

5 thoughts on “Copying VirtualBox hard disks

  1. WhiteHotaru September 23, 2012 / 2:07 pm

    Hi! Thank’s for the hint. It was very helpful!

  2. anónimo October 26, 2012 / 10:09 pm

    Muchísimas gracias, funcinó perfectamente! :D

    Windows XP en virtualbox :P

    ————

    A Lot of tanks, runs very well ;)

  3. laky April 2, 2013 / 8:54 am

    thx

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