Pages

Saturday, May 8, 2010

How can we change the UUID of a VirtualBox Disk

clip_image002 

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:

clip_image004

In this case, you have to do the following:
VBoxManage internalcommands setvdiuuid /path/to/virtualdisk.vdi

clip_image006


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:
$ VBoxManage clonevdi Master.vdi Clone.vdi

No comments:

Post a Comment