Koozali.org: home of the SME Server

VirtualBox 4.2.6 - save state of guests during shutdown

Offline daniel

  • ****
  • 146
  • +0/-0
  • Platinum Sponsor
    • http://www.charton-mgmt.com
VirtualBox 4.2.6 - save state of guests during shutdown
« on: February 27, 2013, 08:43:42 PM »
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.

Offline stephdl

  • *
  • 1,523
  • +0/-0
    • Linux et Geekeries
Re: VirtualBox 4.2.6 - save state of guests during shutdown
« Reply #1 on: February 27, 2013, 09:39:16 PM »
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
See http://wiki.contribs.org/Koozali_Foundation
irc : Freenode #sme_server #sme-fr

!!! Please write your knowledge to the Wiki !!!

Offline daniel

  • ****
  • 146
  • +0/-0
  • Platinum Sponsor
    • http://www.charton-mgmt.com
Re: VirtualBox 4.2.6 - save state of guests during shutdown
« Reply #2 on: February 27, 2013, 09:46:57 PM »
Thank you, I will test this evening.

Offline stephdl

  • *
  • 1,523
  • +0/-0
    • Linux et Geekeries
Re: VirtualBox 4.2.6 - save state of guests during shutdown
« Reply #3 on: February 27, 2013, 09:55:14 PM »
if you can have something interesting, you should to write it on the wiki please
See http://wiki.contribs.org/Koozali_Foundation
irc : Freenode #sme_server #sme-fr

!!! Please write your knowledge to the Wiki !!!