[Resolved] Autostart VM on Debian 10.x in "headless" mode?

Discussions related to using VirtualBox on Linux hosts.
Post Reply
jmar83_the2nd
Posts: 341
Joined: 9. Mar 2012, 00:14

[Resolved] Autostart VM on Debian 10.x in "headless" mode?

Post by jmar83_the2nd »

Hi

Does somebody know how to Autostart a VirtualBox VM on Debian 10.x in "headless" mode?

Many tutorials in the Internet are for older version, and they don't support the headless mode yet.

Thank you very much for your feedbacks.
Last edited by socratis on 14. Aug 2019, 06:03, edited 1 time in total.
Reason: Marked as [Resolved].
regards, jan
RandomName123
Posts: 7
Joined: 15. Apr 2015, 02:02
Primary OS: Debian other
VBox Version: OSE other
Guest OSses: all

Re: Autostart VM on Debian 10.x in "headless" mode?

Post by RandomName123 »

Hope this helps. :D

Code: Select all

$ vboxmanage --help startvm
Oracle VM VirtualBox Command Line Management Interface Version 6.0.10
(C) 2005-2019 Oracle Corporation
All rights reserved.

Usage:

VBoxManage startvm          <uuid|vmname>...
                            [--type gui|sdl|headless|separate]
                            [-E|--putenv <NAME>[=<VALUE>]]
... or better yet:

Code: Select all

$ vboxheadless 
Oracle VM VirtualBox Headless Interface 6.0.10
(C) 2008-2019 Oracle Corporation
All rights reserved.

Usage:
   -s, -startvm, --startvm <name|uuid>   Start given VM (required argument)
You need only create a SystemD service file to perform the actual launch.
socratis
Site Moderator
Posts: 27330
Joined: 22. Oct 2010, 11:03
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Win(*>98), Linux*, OSX>10.5
Location: Greece

Re: Autostart VM on Debian 10.x in "headless" mode?

Post by socratis »

@RandomName123
That's the interactive headless solution, not the autostart one. BTW, there's also 'VBoxHeadless', but again, it won't help with the original question... ;)

Code: Select all

$ VBoxHeadless
Oracle VM VirtualBox Headless Interface 6.0.10
(C) 2008-2019 Oracle Corporation
All rights reserved.

Usage:
   -s, -startvm, --startvm <name|uuid>   Start given VM (required argument)
   -v, -vrde, --vrde on|off|config       Enable or disable the VRDE server
                                           or don't change the setting (default)
   -e, -vrdeproperty, --vrdeproperty <name=[value]> Set a VRDE property:
                                     "TCP/Ports" - comma-separated list of
                                       ports the VRDE server can bind to; dash
                                       between two port numbers specifies range
                                     "TCP/Address" - interface IP the VRDE
                                       server will bind to
   --settingspw <pw>                 Specify the settings password
   --settingspwfile <file>           Specify a file containing the
                                       settings password
   -start-paused, --start-paused     Start the VM in paused state
   -c, -record, --record             Record the VM screen output to a file
   -w, --videowidth                  Video frame width when recording
   -h, --videoheight                 Video frame height when recording
   -r, --videobitrate                Recording bit rate when recording
   -f, --filename                    File name when recording. The codec used
                                     will be chosen based on file extension
@jmar83_the2nd
Instead of relying on random 3rd party, most probably outdated blogs, why don't you look at the authority on the subject, the User Manual?

You should have a searchable PDF included with your installation (Help » Contents). If not, there's the on-line manual in PDF format, again searchable. Take advantage of that fact, and use it to search the PDF for the terms that interest you.

Searching for "autostart" and/or "boot" for example will lead you to two major chapters:
Do NOT send me Personal Messages (PMs) for troubleshooting, they are simply deleted.
Do NOT reply with the "QUOTE" button, please use the "POST REPLY", at the bottom of the form.
If you obfuscate any information requested, I will obfuscate my response. These are virtual UUIDs, not real ones.
jmar83_the2nd
Posts: 341
Joined: 9. Mar 2012, 00:14

Re: Autostart VM on Debian 10.x in "headless" mode?

Post by jmar83_the2nd »

Thank you!!
regards, jan
RandomName123
Posts: 7
Joined: 15. Apr 2015, 02:02
Primary OS: Debian other
VBox Version: OSE other
Guest OSses: all

Re: Autostart VM on Debian 10.x in "headless" mode?

Post by RandomName123 »

socratis wrote:That's the interactive headless solution, not the autostart one. BTW, there's also 'VBoxHeadless', but again, it won't help with the original question... ;)
Oops, you're right. Yes, I included 'vboxheadless' too. :D

As you mentioned, it looks like:

Code: Select all

modifyvm <uuid|vmname> [--autostart-enabled on|off]
... is the right way to go.

It's odd this option isn't included as a VM setting via the GUI. :?
jmar83_the2nd
Posts: 341
Joined: 9. Mar 2012, 00:14

Re: Autostart VM on Debian 10.x in "headless" mode?

Post by jmar83_the2nd »

Nice, thank you very much!! :-)
regards, jan
socratis
Site Moderator
Posts: 27330
Joined: 22. Oct 2010, 11:03
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Win(*>98), Linux*, OSX>10.5
Location: Greece

Re: Autostart VM on Debian 10.x in "headless" mode?

Post by socratis »

Marking as [Resolved].
Do NOT send me Personal Messages (PMs) for troubleshooting, they are simply deleted.
Do NOT reply with the "QUOTE" button, please use the "POST REPLY", at the bottom of the form.
If you obfuscate any information requested, I will obfuscate my response. These are virtual UUIDs, not real ones.
Post Reply