In VirtualBox tech, the virtual disk is of .vdi format. So it’s very convenient to copy the .vdi files to make a new system. but when we add the copied .vdi file to the system, it say:
Failed to open the hard disk /xxx/xxx
Cannot register the hard disk ‘/xxx/xxx.vdi’ with UUID {c887f179-54b6-4d5e-9eb1-c0c60477f1df} because a hard disk ‘/xxx/xxx.vdi’ with UUID {c887f179-54b6-4d5e-9eb1-c0c60477f1df} already exists in the media registry (‘/root/.VirtualBox/VirtualBox.xml’).
since every device have it’s own unique uuid, when we copy the .vdi file, we copy the uuid also. in order to use the copied .vdi file in the same system at same time, we need to change the uuid of any of them to make them different.
use below command:
VBoxManage internalcommands setvdiuuid copied.vdi