VirtualBox: How to change the UUID of Virtual Disk (vdi)
May 6th, 2009
Copying the image of Virtual Disk (.vdi file) is a convenient way to duplicate the disk, in cases you want to avoid re-installing an operating system from scratch.
However, simply copying the .vdi file into another location will make a verbatim copy of the virtual disk, including the UUID of the disk. If you try to add the copy in the Virtual Media Manager, you will get an error like this:
In this case, you have to do the following:
Since the old UUID is replaced with a new one, you can now add and use the virtual disk.
Please note, that you wouldn't have to follow this procedure if you had used the clonevdi function to copy the virtual disk image, in the first place. The clonevdi function makes sure that the new disk image will have its own unique UUID.
The syntax of the clonedvi goes like this:
However, simply copying the .vdi file into another location will make a verbatim copy of the virtual disk, including the UUID of the disk. If you try to add the copy in the Virtual Media Manager, you will get an error like this:

In this case, you have to do the following:
giannis@giannis-laptop:~$ VBoxManage internalcommands setvdiuuid /path/to/virtualdisk.vdi
VirtualBox Command Line Management Interface Version 2.2.2
(C) 2005-2009 Sun Microsystems, Inc.
All rights reserved.
UUID changed to: 9e89fe14-d010-469e-a737-cd65218c4acbSince the old UUID is replaced with a new one, you can now add and use the virtual disk.
Please note, that you wouldn't have to follow this procedure if you had used the clonevdi function to copy the virtual disk image, in the first place. The clonevdi function makes sure that the new disk image will have its own unique UUID.
The syntax of the clonedvi goes like this:
$ VBoxManage clonevdi Master.vdi Clone.vdi
September 21st, 2009 at 9:01 am Very nice stuff, it's saving time of re-installing an operating system from scratch.
it's working very nice ..... superba work !!!!!!!!!
October 31st, 2009 at 2:17 pm Thanks! It works :-)
November 4th, 2009 at 3:10 pm Thanks!
Just what I need it.
December 31st, 2009 at 12:22 am Worked beautifully. Thanks
January 24th, 2010 at 11:32 pm Thanks greatly (I've still not had to RTFM ;-} )
However, the clonevdi method does not work as VB keeps an .xml record of known disks/uuids and bounces attempts to clone. You'd have thought the response would be "Cannot create a duplicate UUID - OK to create a new UUID for the clone otherwise Cancel" ...it ain't rocket salad is it!
(can't guess what the --remember and --existing arguments mean so maybe I will rtfm after all...)
April 8th, 2010 at 6:44 pm Thanks! It saves us a lot of time to replicate complex environments for my clients quickly. (www.tychio.com)
November 23rd, 2010 at 8:20 am Still works!
December 1st, 2010 at 9:42 pm >Thanks greatly (I've still not had to RTFM ;-} )
Well, this command is actually not listed in commandline help.
Use: VBoxManage internalcommands help
CLONEHDis also listed there. Previously, it was a nightmare to convert vmware hard disks (vmdk) to vdi.
December 28th, 2010 at 10:18 am From command prompt go to virtual box installation folder then use this command
>vboxmanage internalcommands setvdiuuid vhddFileName.vdi
it will change the uuid of vhddFileName.vdi
March 18th, 2011 at 3:22 pm Thank you, very useful
May 28th, 2011 at 10:12 am vnc
June 14th, 2011 at 2:55 pm Thanks alot, it's save a big time.
June 24th, 2011 at 7:10 pm I copied my vdi to a USB stick and it took about 5 minutes, but then, naturally, it didn't work because I didn't clone it.
So then I cloned it ... that was about 3 hours ago and so far it's only on 70%
What does clone do, anyway?
July 24th, 2011 at 1:31 am Am wondering why VDI management / cloning isn't built into UI?
October 28th, 2011 at 11:02 pm For VMWare image disks
VBoxManage internalcommands sethduuid disk.vmdk
November 9th, 2011 at 6:41 pm Thanks! Clean solution!