Created
July 31, 2012 23:35
-
-
Save narkisr/3221727 to your computer and use it in GitHub Desktop.
Loading phpvirtualbox and vms on boot using upstart
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#/etc/init.d/vboxdrv, add to the end of the start function | |
/sbin/initctl emit vboxdrv-started | |
# this triggers two upstart jobs | |
# /etc/init/phpvirtualbox.conf | |
description "php virtualbox server" | |
# emmited by vboxdrv init file | |
start on vboxdrv-started | |
stop on runlevel [!2345] | |
exec su -s /bin/sh -c 'exec "$0" "$@"' phpvirtualbox -- /usr/bin/vboxwebsrv -H 192.x.x.x --background | |
# /etc/init/graylog2-vm.conf | |
description "graylog2 vm" | |
start on vboxdrv-started | |
stop on runlevel [!2345] | |
exec su -s /bin/sh -c 'exec "$0" "$@"' phpvirtualbox -- /usr/lib/virtualbox/VBoxHeadless --startvm {VMUUID} --vrde config | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment