I have usually used VboxHeadless to start vm's via systemd unit files,
But I guess some use it for some vrdp functionality.

Anyway, VboxManage can do almost the same thing. For me the only change
was adding RemainAfterExit=yes in my unit file and changing VboxHeadless
--startvm debian to VboxManage command instead. Just wanted to add this
in. I briefly looked into Oracle's documentation and also found an old
post on there forums mentioning VboxHeadless is the preferred way to
start vm's this way. Anyway, works for now.

""This is the recommended way, because when starting the headless
interface through VBoxManage, you will not be able to view or log
messages that VBoxHeadless may have output on the console. Especially in
case of startup errors, such output might be desirable for problem
diagnosis.""


Requires=systemd-modules-load.service
After=systemd-modules-load.service

[Service]
Type=simple
User=sleepy
Group=vboxusers
ExecStart=/usr/bin/vboxmanage startvm debian --type headless
RemainAfterExit=yes
ExecStop=/usr/bin/VBoxManage controlvm "debian" poweroff

[Install]
WantedBy=multi-user.target [/code]

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1875271

Title:
  Virtualbox install via apt install has errors

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/virtualbox/+bug/1875271/+subscriptions

-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to