I can't for the life of me seem to figure out where to put this service to startup the vm I have pi-hole running in. I can't find a vbox or virtualbox service to find a way to slot this in after. What am I missing?
Code:
[sudo] password for gigatexal:
● pi-hole-vm.service - Start Pihole vm
Loaded: loaded (/etc/systemd/system/pi-hole-vm.service; enabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Sat 2019-03-16 21:36:05 CET; 11s ago
Process: 1112 ExecStart=/usr/bin/vboxmanage startvm pi-hole --type headless (code=exited, status=1/FAILURE)
Main PID: 1112 (code=exited, status=1/FAILURE)
Mar 16 21:35:59 devbox01 vboxmanage[1112]: WARNING: The character device /dev/vboxdrv does not exist.
Mar 16 21:35:59 devbox01 vboxmanage[1112]: Please install the virtualbox-dkms package and the appropriate
Mar 16 21:35:59 devbox01 vboxmanage[1112]: headers, most likely linux-headers-generic.
Mar 16 21:35:59 devbox01 vboxmanage[1112]: You will not be able to start VMs until this problem is fixed.
Mar 16 21:36:00 devbox01 vboxmanage[1112]: VBoxManage: error: The virtual machine 'pi-hole' has terminated unexpectedly during startup with exit code 1 (0x1)
Mar 16 21:36:00 devbox01 vboxmanage[1112]: VBoxManage: error: Details: code NS_ERROR_FAILURE (0x80004005), component MachineWrap, interface IMachine
Mar 16 21:36:00 devbox01 vboxmanage[1112]: Waiting for VM "pi-hole" to power on...
Mar 16 21:36:00 devbox01 systemd[1]: pi-hole-vm.service: Main process exited, code=exited, status=1/FAILURE
Mar 16 21:36:05 devbox01 systemd[1]: pi-hole-vm.service: Failed with result 'exit-code'.
Mar 16 21:36:05 devbox01 systemd[1]: Failed to start Start Pihole vm.
Code:
[Unit]
Description=Start Pihole vm
[Service]
ExecStart=/usr/bin/vboxmanage startvm pi-hole --type headless
Type=oneshot
RemainAfterExit=yes
User=gigatexal
[Install]
WantedBy=multi-user.target