Obsolete Releases > SME 8.x Contribs

VirtualBox 4.2.6 - save state of guests during shutdown

(1/1)

daniel:
I've installed Virtual Box 4.2.6 based on the following wiki http://wiki.contribs.org/VirtualBox_4.0_on_SME_Server_v8_beta_6.

I've looked in the forums and haven't found this answer. I thought someone who is using VirtualBox on their SME might have an answer.

Is there a code edit that  I can install so when a shutdown/reboot is started on the SME server, it will save the state of the virtualbox guests?  I would also like the SMEserver to restart the virtualbox guests after the shutdown/reboot.

I found this interesting article via google http://go2linux.garron.me/linux/2011/01/vboxmanage-control-and-manage-virtualbox-command-line-890  This shows the command lines to savestate, start, shutdown, pause, etc.  Is it possible to add some sort of custom template during startup or shutdown of the server?  Appreciate any feedback.

stephdl:
if you have installed phpvirtualbox, you can find a script in the tar.gz which is named vboxinit where the purpose is to start or to supend vm as you can read :

[quote#!/bin/bash
#
#  vboxinit: auto start sessions when booting and save
#                sessions when host is stopped
#
#  Based on vboxtool. Only tested in Debian.
#
# Debian install:
# copy this script to /etc/init.d
# run:
#    chmod u+rx /etc/init.d/vboxinit
#    update-rc.d vboxinit defaults

### BEGIN INIT INFO
# Provides:          vboxinit
# Required-Start:    vboxdrv $local_fs
# Required-Stop:     vboxdrv $local_fs
# Default-Start:     2 3 4 5
# Default-Stop:      0 1 6
# Description:       Controls VirtualBox sessions
### END INIT INFO
][/quote]

I do not test it and maybe it need some template

daniel:
Thank you, I will test this evening.

stephdl:
if you can have something interesting, you should to write it on the wiki please

Navigation

[0] Message Index

Go to full version