How to start some virtual machines as Headless by default

Discussions related to using VirtualBox on Windows hosts.
Post Reply
abcuser
Volunteer
Posts: 599
Joined: 10. May 2007, 20:03
Primary OS: Ubuntu other
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Ubuntu, Windows XP

How to start some virtual machines as Headless by default

Post by abcuser »

My system:
- Host: Windows 11
- VM: VirtualBox 7.0.14

I have several virtual machines. Some of them are GUI like Ubuntu desktop, but some of them are text only machines with some servers on them.

In VirtualBox GUi a lot of time I click on virtual machine and then I click Start, then I realize I forgot to click on "Headless Start" button and I need to close down virtual machine and start it again in headless mode.

How can I set for individual virtual machine to be started as "Headless Start" when I click on Start button?

Regards
multiOS
Volunteer
Posts: 1262
Joined: 14. Sep 2019, 16:51
Primary OS: Mac OS X other
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Windows, Linux, BSD
Location: United Kingdom

Re: How to start some virtual machines as Headless by default

Post by multiOS »

When using the VirtualBox Manager, instead of clicking the Start icon, click the down arrow next to it and select the headless start option. (2 clicks instead of 1)
abcuser
Volunteer
Posts: 599
Joined: 10. May 2007, 20:03
Primary OS: Ubuntu other
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Ubuntu, Windows XP

Re: How to start some virtual machines as Headless by default

Post by abcuser »

@mutiOS, I know it looks trivial. I do exactly that every time, but time to time I forgot to select "Headless Start" from Start button option, and I need to power off the machine and do the 2-clicks.

What I am thinking is, some of my virtual machines should always start as headless, I always SSH into the machine from Windows host. That is why I would just like to have some guest specific setting to set and every time I click on "Start" button and guest always starts in single click.

Maybe looks trivial, but I get into this trap all the time. Specially when I reboot Windows host and I start several guests.
kabu
Posts: 33
Joined: 1. Mar 2023, 01:25

Re: How to start some virtual machines as Headless by default

Post by kabu »

VBoxManage modifyvm "vmname" --defaultfrontend headless

--defaultfrontend default|<name>:
The following values are allowed:
gui
Starts a VM showing a GUI window. This is the default.
headless
Starts a VM without a window for remote display only.
sdl
Starts a VM with a minimal GUI and limited features.
separate
Starts a VM with detachable UI (technically it is a headless VM with user interface in a separate process). This is an experimental feature as it lacks certain functionality at the moment (e.g. 3D acceleration will not work).

OR you can set to start all VM as headless by default:

VBoxManage setproperty defaultfrontend headless

And then change startup as "gui" only for some machines, which needs gui:

VBoxManage modifyvm "vmname" --defaultfrontend gui
madera2
Posts: 1
Joined: 7. May 2024, 11:11

Re: How to start some virtual machines as Headless by default

Post by madera2 »

kabu wrote: 2. May 2024, 00:21 VBoxManage modifyvm "vmname" --defaultfrontend headless

--defaultfrontend default|<name>:
The following values are allowed:
gui
Starts a VM showing a GUI window. This is the default.
headless
Starts a VM without a window for remote display only.
sdl
Starts a VM with a minimal GUI and limited features.
separate
Starts a VM with detachable UI (technically it is a headless VM with user interface in a separate process). This is an experimental feature as it lacks certain functionality at the moment (e.g. 3D acceleration will not work).

OR you can set to start all VM as headless by default:

VBoxManage setproperty defaultfrontend headless

And then change startup as "gui" only for some machines, which needs gui:

VBoxManage modifyvm "vmname" --defaultfrontend gui
What are the different options available for setting the frontend mode when starting a VirtualBox VM using VBoxManage, and how can the default frontend mode be configured to start all VMs as headless by default while selectively enabling GUI mode for specific machines?
Post Reply