Page 1 of 1

How do you copy a virtual machine/hard drive?

Posted: 30. Oct 2010, 06:37
by jhsu
VirtualBox doesn't allow me to copy a virtual hard drive installation of a Linux distro. I'm experimenting with minimal Debian installations. What I'd like to do is start of with a bare-bones Debian installation and start adding packages. Unlike other distros (like antiX Linux and Puppy Linux), Debian does NOT install in a hurry, so I don't want to have to redo the installation every time just to try something different. I just want to go back to the original bare bones installation. Is that too much to ask? How do you get around this restriction?

Re: How do you copy a virtual machine/hard drive?

Posted: 30. Oct 2010, 11:31
by mpack
You should choose a better forum for questions like this (e.g. Linux hosts), as the optimal answer and potential issues may vary depending on the particular host or guest.

In the case of your Linux host, use the facilities of your host OS to copy the VDI file. Then use "VBoxManage internalcommands sethduuid <vdi filename>" to change the UUID inside the VDI. The latter step is necessary to allow it to be registered on the same host as the original. Once the VDI copy is registered you create a new VM around it, similar to the first VM.

I have skipped some important caveats related to this procedure in Linux since "Using VirtualBox" is not an appropriate forum for that discussion.