Copy State Between Virtual Machines

Discussions related to using VirtualBox on Windows hosts.
Post Reply
nalandial
Posts: 1
Joined: 29. Apr 2009, 02:48
Primary OS: MS Windows Vista
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Finix (Debian Based)

Copy State Between Virtual Machines

Post by nalandial »

This is kind of a goofy question, and I'm not sure if there's really a proper answer. At the very least I think it's an interesting problem. Let me try and explain my situation. Apologies in advance for the length.

I'm running Vista x64 and Virtual Box 2.2.0 r45846. The guest OS is the latest version of Finnix (http://www.finnix.org/), a Debian based Live CD.

I am writing an application that executes other people's code. Naturally security is a huge problem. I want to try and overcome this by running the code in a VM, communicate its state back to the host machine, and then discard the VM, and do this for each piece of code it needs to run. I realize large scalability will quickly become an issue because of memory constraints, but that isn't a concern. Because the host machine will be managing all the VM instances and discarding them when its done, it will be starting and running several different VM instances at once. That means the VM must boot up very quickly (within seconds) and start doing its thing.

This is the solution I'm trying to aim for: I create a pristine, ready to go VM image from a Live CD (aka no virtual hard drive attached) with whatever I need on it, and save its state, then keep that state in some folder and name it say, cleanState.sav (the image now is ~150MB). I use VBoxManage.exe included with the install to manage VirtualBox. When I need to run code, I do the following:

1. Create a new VM and register it with VirtualBox:

Code: Select all

vboxmanage createvm --name Foo --ostype Debian --register
At this point I get output that gives me the new UUID. For this example lets say it's f0178dbf-1c86-4f81-982f-eba57c26f093.

2. Modify the VM to have the proper settings:

Code: Select all

vboxmanage modifyvm f0178dbf-1c86-4f81-982f-eba57c26f093 --memory 256 --vram 7 --bioslogodisplaytime 0 --hda none --dvd C:\Bar\.VirtualBox\finnix-92.1.iso --audio none
3. Load the state I created before (cleanState.sav):

Code: Select all

vboxmanage adoptstate 47b9dae9-eff9-47ee-b5ab-6a3ebf7e25e3 C:\Bar\.VirtualBox\default.sav
4. Start the VM:

Code: Select all

vboxmanage startvm 47b9dae9-eff9-47ee-b5ab-6a3ebf7e25e3
The VM boots up, starts loading the state, then crashes. I believe the error is this:

Code: Select all

SSM: LoadExec failed with rc=VERR_SSM_LOAD_CONFIG_MISMATCH for unit 'pgm'!
I attached the full log if it helps.

Am I doing something wrong, or is this not possible? Is there a way I can hack this together at all? If not, what other solutions would you propose?

Thanks in advance!
Attachments
VBox.log
log file from the vm after it crashes
(42.88 KiB) Downloaded 5 times
Post Reply