Tuesday, November 22, 2011

A trivial systemd unit script: vboxservice.service

In a VirtualBox guest, VBoxService (which is for example responsible for setting the time after a host suspend/resume) is not started on boot. I thought about writing a simple init script to doit (editing the vboxadd init script seemed like a bad idea, since it might get overwritten on updates).
Then I decided to try the "native systemd" way.
Executive summary: it is much easier than with old style SysV init:

# cat /etc/systemd/system/vboxservice.service
Description=VirtualBox guest services

ExecStart=/usr/bin/VBoxService -f


Activate with systemctl enable vboxservice.service.

1 comment:

  1. Also


    Comes handy to ensure it is never started in a non virtualbox guest.