Generally speaking, I recommend setting the default front-end for all virtual machines to headless for the following reasons:
- Running virtual machines headless, as one typically would in a production environment, de-necessitates dependence on X11 and accompanying desktop environment baggage. On Oracle Solaris 11.4, the solaris-desktop set contains over 360 packages. However, given the practical benefits the VirtualBox Manageer GUI provides (don't be ashamed to use a GUI, especially in a crisis - time is of the essence!) I tend to indulge in the superfluity.
- Although it is possible to specify which front-end to use under the Start submenu in the GUI, the default front-end when you simply hit the Start toolbar button or context menu item is gui
- If you have started a VM with the gui front-end you will not have the option to close its window without shutting it completely down. This can be a costly oversight if you now have long-term processes running or other users accessing a VM
- You don't have to worry about what happens to your VMs if your session is logged out or otherwise lost or, heaven forbid, your X or DE crashes
- You can always attach a GUI window to the VM's framebuffer any time after the fact (use the Show toolbar button or context menu item in the Manager gui), with the benefit of the additional Continue running in the background option when you close the window that is otherwise missing
The documentation for VBoxManage startvm mentions the following pertaining to the detatched frontend:
Starts a VM with a 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, such as 3D acceleration.
...Starting 'headless' or 'detachable' causes any 3D acceleration that might be interfering due to bunged Guest Additions to not start, leaving only software-graphics in the guest...
Please take this under advisement if your particular use case depends on advanced graphics capabilities.
To change the frontend, as the VM's owner's user run:
$ VBoxManage modifyvm vmname --defaultfrontend headless
It should be noted that you can't make this change via the GUI and it is also not possible at this time to do it while a VM is running, you will encounter an error similar to:
VBoxManage: error: The machine 'vmname' is already locked for a session (or being unlocked)
VBoxManage: error: Details: code VBOX_E_INVALID_OBJECT_STATE (0x80bb0007), component MachineWrap, interface IMachine, callee nsISupports
VBoxManage: error: Context: "LockMachine(a->session, LockType_Write)" at line 554 of file VBoxManageModifyVM.cpp
Therefore it is important to try to make this modification before you first spin up a virtual machine in production.