I have been trying to get my virtual machines to run as a service to allow things like clean shutdowns during a reboot, however while I have been able to create the systemd unit file easily enough, VirtualBox Manager still reports the machine as 'Aborted' after a reboot.
I have searched the forums and found other instances where people have reported this, but nothing much was done with it, so I figured I'd post it as a dedicated topic to see if anyone was able to help.
My systemd unit file looks like this:
Code: Select all
[Unit]
Description=*vmname* Virtual Machine
After=network.target
[Service]
Type=simple
User=*vm_owner_name*
StandardOutput=journal
TimeoutSec=60
ExecStart=/usr/bin/VBoxHeadless --startvm *vmname* --vrde on
ExecStop=/usr/bin/VBoxManage controlvm *vmname* savestate
[Install]
WantedBy=multi-user.target
Does anyone have any suggestions?
Cheers;
wraeth