LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Virtualization and Cloud (https://www.linuxquestions.org/questions/linux-virtualization-and-cloud-90/)
-   -   Retaining saved state of a VirtualBox VM between two hosts (https://www.linuxquestions.org/questions/linux-virtualization-and-cloud-90/retaining-saved-state-of-a-virtualbox-vm-between-two-hosts-4175461139/)

DeeGee 05-08-2013 06:14 AM

Retaining saved state of a VirtualBox VM between two hosts
 
I run Ubuntu on my home computer and Windows XP at office.

I have a Debian VM on my ntfs USB drive and run it from both computers. It runs fine when the machine is powered off and restarted.

The problem is when I save the machine's state.

When I change to the other host, it reboots when I start the VM, without restoring the saved state.

Any workarounds, please? All help is greatly appreciated :).

parnmatt 05-08-2013 06:49 AM

When you save the state, it will create a snapshot file to:
Code:

[VirtualBox Directory]/[VM Name]/Snapshots/*.sav
Which has a time index; the latest time index should be read first.

For example I just made one, it's stored on my machine:
Code:

~/VirtualBox VMs/Arch Linux/Snapshots/2013-05-08T11-39-00-247704000Z.sav
You can either bring these with you on a USB, and put them into the snapshot folder on your host; or use a service like Dropbox to automatically sync them, using soft links:
Code:

$ ln -s <LINK> <TARGET>
or in Windows:
Code:

> mklink /d <LINK> <TARGET>
or for a directory junction
Code:

> mklink /j <LINK> <TARGET>
Where <LINK> would be in your dropbox folder, and <TARGET> would be the directory for Snapshots.
You would have to do this on both machines.

Depends on how comfortable you are in Command Line.

Hope that helps.
If it doesn't, I hope it guides you to the right path.

jefro 05-08-2013 03:54 PM

Is the hardware like cpu exactly the same?


All times are GMT -5. The time now is 11:17 PM.