Skip to content

Instantly share code, notes, and snippets.

@luisehk
Created September 12, 2017 00:27
Show Gist options
  • Save luisehk/24b6a1a9f48c96b4eab93b2f212241ed to your computer and use it in GitHub Desktop.
Save luisehk/24b6a1a9f48c96b4eab93b2f212241ed to your computer and use it in GitHub Desktop.
Start a virtualbox VM on boot
[Unit]
Description=Rancher VM
Requires=systemd-modules-load.service
After=systemd-modules-load.service vboxdrv.service
[Service]
User=user
ExecStart=/usr/bin/VBoxHeadless -s mac
ExecStop=/usr/bin/VBoxManage controlvm mac acpipowerbutton
KillMode=process
KillSignal=SIGWINCH
TimeoutStopSec=40
[Install]
WantedBy=multi-user.target
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment