by aghamemnun » 17. Jul 2007, 19:32
I think the easies way to do it is via the GUI of VirtualBox. The VM to be copied has to be stopped.
I am using the German version, so I don't know how theEnglish menu reads. Anyway, I will try. In the menu, go on File > VM Drive Manager.
Select the virtual drive to be copied and klick "Release" (this is absolutely crucial!!!). The -vdi file is now detached from the VM! The disk Then make a copy of the .vdi file in a different directory.
Now, reattach the .vdi to its old VM: Close the Manager, and in the main window chose the VM, klick on "Change" (the button with the yellow toothed wheel). In the left part of the now opening preferences window, klick on "Hard drives", activate "Primary Master" and select the virtual HD in the drop down menu.
And then, how to attach the copy of the virtual HD you made to a different VM? Move the copied .vdi file to the directory where you want to have it. Then establish a new VM on any computer. In the wizard, choose the .vdi file as virtual HD for this VM. When you start the VM for the first time, you will be asked where the HD or disk image resists. Now, just klick on "Cancel". The VM will now start from the .vdi file attached.
Important: Any .vdi file can only be attached to one VM. So, if you want to make that .vdi file available to different VMs, you first have to make as many copies of the RELEASED .vdi file as you need and then attach each of them to its VM.