Page 1 of 1

Copying a VM, saved state and snapshot to a other machine.

Posted: 21. Feb 2012, 22:03
by brumik
Here is my scenario
- I am running virtualbox 4.1.8 on Ubuntu.

I have a vm which I have a snapshot for, and is in "saved state"

I want to copy this vm, its snapshot and "saved state" to a solaris machine so I can have exactly the same on the solaris machine.

What I have done:

Installed virtualbox on the solaris machine
Copy the vdi to the solaris machine
Created new vm on the solaris machine with vboxmanage, and then attached the vdi.

VBoxManage createvm -name "kickstart" -register
VBoxManage modifyvm "kickstart" --vrde on
VBoxManage modifyvm "kickstart" --vrdeport 3900
#VBoxManage modifyvm "kickstart" --memory 512 --acpi on --boot1 dvd
VBoxManage modifyvm "kickstart" --memory 512 --acpi on --boot1 disk
VBoxManage modifyvm "kickstart" --nic1 bridged
VBoxManage modifyvm "kickstart" --bridgeadapter1 bnx1
VBoxManage storagectl "kickstart" --name "IDE Controller" --add ide
VBoxManage storageattach "kickstart" --storagectl "IDE Controller" --port 0 --device 0 --type hdd --medium /jumpstart/kickstart/images/LiveDVD.vdi

This works fine and I can boot from the original vdi.

Now heres the bit where things go wrong.

- I have a snapshot vdi and a .sav file. in the Snapshots directory on the original ubuntu machine, I copied this directory into my Solaris new VM directory.

I could not work out with Vboxmangage how to attch the snapshots to my new VM, I also tried to update the xml file with the details for the snapshot file and the .sav file (which existed in the orignal VM), when I started it it with these new details it complained with "UUID not found or unregistered"

How can I fix this please? do I need to register the snapshots and .sav files somehow? there must be a way.

I have looked about, but cant see instructions to do this.

Thanks for any help

Re: Copying a VM, saved state and snapshot to a other machin

Posted: 21. Feb 2012, 22:27
by Perryg
Actually transferring while the guest is in a saved state is asking for problems as well as manually trying to do this with snapshots.
The process that will more than likely work is to shut down the guest so there is no saved state, and then copy the entire guest folder to the other machine and then using the Add function to add the guest to the new location. Now you will need to totally remove the guest from the new location to achieve what you are wanting to do easily.

Note: This is taking into account that the first machine was created with VirtualBox => 4.*