Just a quick and simple post. This will be helpful to clone virtual machines in Oracle VirtualBox without third party tools. The virtual hard disk VDI file can be copied by normal Windows explorer copy and paste. But later when we try to add to Virtual Media Manager, it gives error on UUID because duplicate UUIDs can not be added to Media Manager. Therefore, to make the cloning correctly we use cloneVDI GUI or command line tool to create unique ID while copying. This post shows one more method to copy VirtualBox VDI in Windows explorer and change the UUID by simple command.
Cloning virtual machines in VirtualBox can be done only by cloning hard disk VDI files. There are two methods already published here,see below.
sethduuid command will generate new unique UUID for a VDI files. The error message ‘ Cannot register the hard disk…with UUID” can be solved by this command when you try to add copied VDI to media manager.
In this example, I wanted to clone Fedora13 virtual machine. So, I copied the main ( F:\Fedora13.vdi) by Windows explorer copy and paste. Adding copied Fedora13_copy.vdi to virtual media manager gave the above error.
Now, run the below command and create new UUID for this virtual hard disk.
Note – Make sure Windows Path is configured properly to VirtualBox program folder to recognize VBoxManage commands.
Otherwise, run from program folder with correct path names of VDI files.
VBoxManage internalcommands sethduuid Fedora13_copy.vdi
The command set the new UUID and I can add to Virtual Media Manager without any issues.
As expected, copied fedora 13 virtual machine booted well. This makes the cloning very easy by Windows explorer and small command.
Personally I feel this is easier than earlier two methods to clone in virtualbox. Thanks to HubTou for reminding this command.