1. Copy the VDI file: Vboxmanage Clonehd
Because VirtualBox does not allow the registration of duplicate UUID, each VDI file has a unique UUID. So to copy a VDI file again in the VBox register, simple copy is not. At this point we need to use the command Vboxmanage Clonehd, which will set a UUID to the new file when cloning a VDI file "Note: To run this command, first open the command prompt line and go to Virtual box's installation directory." Examples are as follows:
[Plain]View Plaincopyprint?
- D:\Program files\oracle\virtualbox>vboxmanage Clonehd "E:\VirtualBox\Ubuntu 12.04\ubuntu 12.04.vdi" "E:\ Virtualbox\ubuntu 12.04\ubuntu_12.04.vdi "
D:\Program files\oracle\virtualbox>vboxmanage Clonehd "E:\VirtualBox\Ubuntu 12.04\ubuntu 12.04.vdi" "E:\ Virtualbox\ubuntu 12.04\ubuntu_12.04.vdi "
The results are as follows:
0% ... 10% ... 20% ... 30% ... 40% ... 50% ... 60% ... 70% ... 80% ... 90% ... 100%
Clone hard disk created in format ' VDI '. Uuid:cf70d484-a3f0-4a87-953b-d1c8ec602c59
2, modify the VDI uuid:vboxmanage internalcommands sethduuid
When the same error occurs with two VDI uuid, you can use the command vboxmanage internalcommands sethduuid to modify the UUID of the VDI file, as shown in the following example:
[Plain]View Plaincopyprint?
- D:\Program files\oracle\virtualbox>vboxmanage internalcommands Sethduuid E:\VirtualBox\Win7_Ultimate_SP1_1\Win7 _ultimate_sp1.vdi
D:\Program files\oracle\virtualbox>vboxmanage internalcommands Sethduuid E:\VirtualBox\Win7_Ultimate_SP1_1\Win7 _ULTIMATE_SP1.VDI results are as follows:
UUID changed to:3b5f507c-dda7-409c-a2ef-ee075435558d
But when there are spaces in the path, enclose the path in double quotation marks, as follows:
[Plain]View Plaincopyprint?
- D:\Program files\oracle\virtualbox>vboxmanage internalcommands sethduuid "E:\VirtualBox\Ubuntu 12.04.vdi"
D:\Program files\oracle\virtualbox>vboxmanage internalcommands sethduuid "E:\VirtualBox\Ubuntu 12.04.vdi" results are as follows:
UUID changed TO:04094FB4-0A42-413A-A25D-9D02D804BD2A
Note: When using the Vboxmanage command, you need to switch to the VirtualBox installation directory on the command line first.
From for notes (Wiz)
VirtualBox copying VDI files and modifying the UUID of VDI