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

Discussions related to using VirtualBox on Linux hosts.

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

Postby jmar83_the2nd » 22. Jul 2019, 14:28

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
jmar83_the2nd
 
Posts: 135
Joined: 9. Mar 2012, 00:14

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

Postby RandomName123 » 30. Jul 2019, 10:35

Hope this helps. :D

Code: Select all   Expand viewCollapse view
$ 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   Expand viewCollapse view
$ 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.
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?

Postby socratis » 30. Jul 2019, 10:53

@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   Expand viewCollapse view
$ 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:
If you obfuscate any information requested, I will obfuscate my response. These are virtual UUIDs, not real ones.
Do NOT reply with the "QUOTE" button, please use the "POST REPLY", at the bottom of the form.
socratis
Site Moderator
 
Posts: 25308
Joined: 22. Oct 2010, 11:03
Location: Greece
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Win(*>98), Linux*, OSX>10.5

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

Postby jmar83_the2nd » 30. Jul 2019, 12:51

Thank you!!
regards, jan
jmar83_the2nd
 
Posts: 135
Joined: 9. Mar 2012, 00:14

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

Postby RandomName123 » 31. Jul 2019, 01:12

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   Expand viewCollapse view
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. :?
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?

Postby jmar83_the2nd » 5. Aug 2019, 21:27

Nice, thank you very much!! :-)
regards, jan
jmar83_the2nd
 
Posts: 135
Joined: 9. Mar 2012, 00:14

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

Postby socratis » 14. Aug 2019, 06:03

Marking as [Resolved].
If you obfuscate any information requested, I will obfuscate my response. These are virtual UUIDs, not real ones.
Do NOT reply with the "QUOTE" button, please use the "POST REPLY", at the bottom of the form.
socratis
Site Moderator
 
Posts: 25308
Joined: 22. Oct 2010, 11:03
Location: Greece
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Win(*>98), Linux*, OSX>10.5


Return to VirtualBox on Linux Hosts

Who is online

Users browsing this forum: No registered users and 6 guests