I am having problem hibernating and suspending my Dell Laptop while virtualbox is running( XP Guest). I have tried default kernel method, uswsusp and tuxonice and none of them works. But if I close virtualbox, then hibernation and suspend works fine. Following are system specs. OS : Ubuntu 10.10 64bit (completey updated) Ram : 4GB Swap : 8 GB Root : 500 GB (of which, about 79% is free)
My laptop model is Dell Inspiron N5010. It has ATI HD 5000 series graphic chipset and I am used proprietary Drivers for it, installed via jockey.
Thanks.
I had the same problem, "pause" the virtual-guest-XP (HostKey-P) did work some times but often NOT. Putting the VM-Guest-XP in "saved-state" let the system hibernate again with no problems.
I wrote a small script, put it in
/etc/pm/sleep.d/05_virtualbox
(don't forgetchmod a+x 05_virtualbox
) and power-management will do the save-machine-state and start procedure on VMs automatically...As per the comments to the original question:
This feature is known as
Save Machine State
.@ Lutz L. First thank you for the script. I've the same problem on Xubuntu 14.04 with VB 4.3.10 and a Xubuntu 12.04 or a Windwos XP Guest is running on hibernate.
At the first try the script seems to work perfect. But the next time the VMs do not automatically resume when main system returns from the hibernate state.
This is the message that i find in the "pm-suspend.log" file:
I can manually resume the Guests, this works without a problem, but that is not as comfortable.
P.S.: The problem has been known for a long time as you can see here: https://www.virtualbox.org/ticket/7716
EDIT: There is a similar script:
(Save this script as /etc/pm/sleep.d/02-VirtualBox, and make sure that it's executable)
Source: http://angryfifer.blogspot.de/2012/02/linux-hibernation-and-virtualbox.html
Sadly the same issue with this script...
@TuKsn
The problem is very simple to be solved - variable DISPLAY must be set.
VirtualBox uses it while starting vms in mode gui. The same problem occurs when I log via ssh and want to start a vm in mode gui.
Thanks for your script, it works great!
However I had to add some modification in order to store the mode in which the vms work (i.e. 'gui' or 'headless' or 'sdl') needed to properly restart the vms.
Below there is the script with my correctnesses included: