Skip to content

Instantly share code, notes, and snippets.

@silvae86
Created December 11, 2017 17:09
Show Gist options
  • Select an option

  • Save silvae86/0a87d4711f957b966fc4d1c88555322f to your computer and use it in GitHub Desktop.

Select an option

Save silvae86/0a87d4711f957b966fc4d1c88555322f to your computer and use it in GitHub Desktop.

Revisions

  1. silvae86 created this gist Dec 11, 2017.
    23 changes: 23 additions & 0 deletions script.md
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,23 @@
    ````bash
    sudo vim /etc/systemd/system/[email protected]
    ````

    ````config
    Requires=systemd-modules-load.service
    After=systemd-modules-load.service
    [Install]
    [Unit]
    Description=VBox Virtual Machine %I Service
    Requires=systemd-modules-load.service
    After=systemd-modules-load.service
    [Service]
    User=joaorocha
    Group=vboxusers
    ExecStart=/usr/bin/VBoxHeadless -s %I
    ExecStop=/usr/bin/VBoxManage controlvm %I acpipowerbutton
    [Install]
    WantedBy=multi-user.target
    ````