12

This question already has an answer here:

I'm using Oracle VirtualBox to run a CentOS7 VM. I then normally ssh into the VM and do all work through my terminal. Thus I don't really need the GUI and I'd like to disable it to improve performance.

Is there a way to start a VM in VirtualBox without GUI?

marked as duplicate by phuclv, Ben N, Ramhound, JakeGould, a CVn Dec 7 '16 at 16:32

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

  • Sure. But given that it is different for each host, what OS is your host on? – LPChip Dec 7 '16 at 12:21
  • Hi @LPChip, my host OS is Windows 10 – SergeyOvchinnik Dec 7 '16 at 12:23
24

From VirtualBox manual 7th chapter (Remote virtual machines):

To start a virtual machine with VBoxHeadless, you have three options:

  • You can use

    VBoxManage startvm "VM name" --type headless

The extra --type option causes VirtualBox to use VBoxHeadless as the front-end to the internal virtualization engine instead of the Qt front-end.

  • One alternative is to use VBoxHeadless directly, as follows:

    VBoxHeadless --startvm <uuid|name>

This way of starting the VM helps troubleshooting problems reported by VBoxManage startvm ... because you can see sometimes more detailed error messages, especially for early failures before the VM execution is started. In normal situations VBoxManage startvm is preferred since it runs the VM directly as a background process which has to be done explicitly when directly starting VBoxHeadless.

  • The other alternative is to start VBoxHeadless from the VirtualBox Manager GUI, by holding the Shift key when starting a virtual machine or selecting Headless Start from the Machine menu.

The mentioned menu is here:

Headless menu

8

Virtualbox guests can be run without a visible host window with these methods:

• In the main Virtualbox window's list of guests, click the guest then click the dropdown next to the Start button at the top, and choose "Headless Start"

• Right-click the guest in the guest list, and choose Start, then "Headless Start"

• Hold down Shift on the keyboard, then double-click the guest in the guest list.

• In a command prompt or desktop shortcut, running in the directory where Vboxmanage.exe exists, run the command 'Vboxmanage startvm "vmname" --type headless'

Virtualbox cannot disable the guest's GUI to improve performance.

In Virtualbox, "headless" means 'no window showing on the host monitor', not 'no video card in the guest "computer" '.

Virtualbox always provides a guest video card and availability for a guest OS GUI, even when the guest is run "headless" ie with no guest window showing, and even if the guest OS is a text-only guest. This can be seen by running any GUI-based guest headless then remoting into it either through Virtualbox RDP or a remote-in service within the guest OS. The GUI will still be calculated and still be completely ready to use, as if the guest were being run with a normal window.

To run a guest without CPU cycles wasted in calculating a GUI, you need to run a guest OS that doesn't run a GUI, like a text-only DOS-like command-line OS, or an OS that expects to boot on a server that does not have a video card.

  • This does not provide an answer to the question. Once you have sufficient reputation you will be able to comment on any post; instead, provide answers that don't require clarification from the asker. - From Review – DavidPostill Dec 7 '16 at 17:41
  • 2
    Thanks, David, for your thoughts. Could you please tell me how my post does not answer the OP's question? Sergey wants to start his guest headless so as to disable the guest's GUI and improve guest performance. Virtualbox can start a guest without a visible window but will still calculate the guest OS's GUI if the guest OS has one. It is not possible to 'disable the guest's GUI' just with Virtualbox commands. If the guest OS launches a GUI, Virtualbox will calculate it even in headless. – Triple_Fault Dec 7 '16 at 20:11
  • It's more a comment on the other answers. The only bit that attempts to be an answer is the last paragraph, which could do with expanding to explain what you mean by an SSH-only OS (something I've never heard of). – DavidPostill Dec 7 '16 at 20:33
  • OK, that makes sense. I'm more used to Virtualbox forum, where previous answers may be referred to, but not necessarily repeated. It occurs to me the order of SE answers change sometimes so they should be self-contained. Thanks! – Triple_Fault Dec 8 '16 at 12:02

Not the answer you're looking for? Browse other questions tagged or ask your own question.