screen -S vm1 -d -m VBoxHeadless -s vm1 (UUID: aad05dae-75b1-4501-972d-a9a49fb5678d)
screen -S vm2 -d -m VBoxHeadless -s vm2 (UUID: 3cc90f04-22ca-477e-a75d-40af94a9c09a)
After starting the sessions, they show as "running" under showvminfo. I can also execute list runningvms and display the two UUIDs.
I open up two RDP connections to these vms.
Then I try the following:
Code: Select all
:~$ VBoxManage -nologo list runningvms
aad05dae-75b1-4501-972d-a9a49fb5678d
3cc90f04-22ca-477e-a75d-40af94a9c09a
Code: Select all
:~$ VBoxManage controlvm aad05dae-75b1-4501-972d-a9a49fb5678d savestate
VirtualBox Command Line Management Interface Version 2.1.4
(C) 2005-2009 Sun Microsystems, Inc.
All rights reserved.
0%...10%...20%...30%...40%...50%...60%...70%...80%...90%...100%
Code: Select all
:~$ VBoxManage controlvm 3cc90f04-22ca-477e-a75d-40af94a9c09a savestate
VirtualBox Command Line Management Interface Version 2.1.4
(C) 2005-2009 Sun Microsystems, Inc.
All rights reserved.
[!] FAILED calling a->virtualBox->OpenExistingSession (a->session, uuid) at line
2784!
[!] Primary RC = VBOX_E_INVALID_SESSION_STATE (0x80BB000B) - Current session state prohibits operation
[!] Full error info present: true , basic error info present: true
[!] Result Code = VBOX_E_INVALID_SESSION_STATE (0x80BB000B) - Current session state prohibits operation
[!] Text = The machine 'vm2' does not have an open session
[!] Component = Machine, Interface: IMachine, {ea6fb7ea-1993-4642-b113-f29eb39e0df0}
[!] Callee = IVirtualBox, {339abca2-f47a-4302-87f5-7bc324e6bbde}
Code: Select all
:~$ ps x
PID TTY STAT TIME COMMAND
1477 ? Sl 0:00 /usr/lib/virtualbox/VBoxSVC --automate
1504 ? Ss 0:00 SCREEN -S vm2 -d -m /home/vm/start-vm.sh vm2
1505 pts/3 Ss+ 0:00 /bin/bash /home/vm/start-vm.sh vm2
1506 pts/3 Sl+ 0:30 /usr/lib/virtualbox/VBoxHeadless -s vm2
If I 'savestate' in the reverse order, it works fine. It looks like they need to be 'saved' in the opposite order to what they were started. I tried starting them in the opposite order, and I experienced the same effect.
Is this a feature?