How can I start a VM without getting a window?

58

38

VirtualBox has a window showing the display of the guest OS. I am connecting to VirtualBox with Remote Desktop, so I don't need VirtualBox to show that window in the host OS.

Of course, I can minimize it, but is there a way to tell VirtualBox not to display that window?

avernet

Posted 2009-11-19T02:48:13.400

Reputation: 1 993

Question was closed 2015-04-22T17:21:57.733

Answers

52

First, make sure that the Virtual Box binaries are in your path. This is done by default on Linux, but in Windows, you might have to manually add the installation directory's bin folder to your path.

Then, you need to know either your Guest OS name or UUID number. You can find both of these by typing

VBoxManage list vms

into a terminal. From there, simply type

VBoxHeadless -s <Guest-OS-Name>

or

VBoxHeadless -s <UUID>

This launches the VM without attaching its display to a window. Now all you have to do is set this command as a boot-time service that runs in the background, and you'll be set.

Mies

Posted 2009-11-19T02:48:13.400

Reputation: 691

4Is there a way to add this as a parameter (or something) to the machines settings? – MrGlass – 2012-08-15T16:30:24.287

90

Old question, but an update is in order:

As of VirtualBox 4.2, you can start a headless machine from the GUI by holding Shift while you click the Start button.

Horribly unintuitive, but that, and other new features, are outlined in an Oracle blog post.

EDIT: As of VirtualBox 5.0, there's a dropdown on the Start button that allows you to choose how to start the VM, including in headless mode.

Tarka

Posted 2009-11-19T02:48:13.400

Reputation: 1 525

2In VirtualBox 5.0, there is a drop down arrow next to the start button. Using that, you can select between a normal, headless, or detachable start. – Bastian35022 – 2015-11-13T08:50:52.603

4How to open the window after I start a headless machine ? – wener – 2014-04-10T01:21:22.350

17

You can tell VirtualBox to start the VM in headless mode, not using the gui start button - but its the same.

VBoxManage startvm <guest-os-name> --type headless

Evgeny

Posted 2009-11-19T02:48:13.400

Reputation: 856

1Yes really good for windows! Launching from a startup script doesn't leave you with a command prompt window open. – Soth – 2014-08-08T02:31:32.880

1That solution is IMO better than the accepted one because it starts new VirtualBox instance in a background service process that better suits my needs. – ForNeVeR – 2015-01-10T06:42:32.163

That works excellent for windows. – antitoxic – 2013-04-03T19:17:47.390