Skip to content

Avian Bone Syndrome

An exercise in futility by Daniele Nicolucci

Menu
  • About ABS
Menu

Headless virtual machines with Oracle VirtualBox

Posted on 2010-07-092010-07-14 by Daniele Nicolucci

Like any other well-respected geek, I would love to have many computers all around me. However, money constraints make that hard, yet it’s still possible to have extra machines around… if they are virtual.

For those unfamiliar with the concept, virtualization is exactly what it sounds like: an entire computer is created in software, possibly with some help from the hardware. In practice, what this means is that you are able to have a “computer in a window,” as if it were any other program. The actual physical computer is called the host, and the virtual machine is called the guest. Note that virtualization is radically different from emulation; the former takes place when the host and the guest share their architecture (e.g. x86/amd64), the latter implies that they are different (e.g. a PowerPC host with an x86 guest.)

A very retro-futuristic word to describe the virtualization software on the host is hypervisor. Go figure.

My host of choice is, as it should be clear by now, MacOS X. As for my hypervisor, I like Oracle’s VirtualBox. It lacks Bootcamp support and is less polished than its commercial cousins, but it is distributed for free. With the current state of affair, that’s nice. Besides, I only need it for the occasional Windows test and for Unix-like guests, so I don’t have to rely on any fancy 3D acceleration (which VirtualBox apparently supports, anyway.) One last thing to note: VirtualBox runs on MacOS X, Linux, Windows and Solaris. I am going to refer to its OS X version, even though it shouldn’t be that different on other platforms.

Let’s get to the point. When you run a virtual machine (VM from now on) you usually get the “computer in a window” I described earlier. That’s great for graphical operating system such as Windows or Linux with X, but if you are running a text-only system such as Linux without X, what’s the point? You could save precious CPU and GPU time on your host by not having it display anything, effectively by running in the background, and accessing the VM through SSH or something similar. That’s when you want to use a headless VM.

Running it is astonishingly simple. VBox gives specific terminal commands to handle any aspect of the VMs. A list of available VMs can be obtained as follows:
octavarium:~ jollino$ VBoxManage list vms
Oracle VM VirtualBox Command Line Management Interface Version 3.2.6
(C) 2005-2010 Oracle Corporation
All rights reserved.

"Windows 7" {933835d0-d0d8-4bfc-83bc-85531e756cdd}
"Slack" {3a4f9f6a-da6b-40b5-8f4d-850937ffcd21}
"Debian" {2a0647aa-6444-4429-b022-42e76ee1bade}

The string in quotes is the human-readable name (that the user chooses when creating the VM), and the funny numbers are a unique ID for that machine.

Starting any of them in headless mode is as simple as running the VBoxHeadless command:
octavarium:~ jollino$ VBoxHeadless -s Slack &
[1] 425
octavarium:~ jollino$ Oracle VM VirtualBox Headless Interface 3.2.6
(C) 2008-2010 Oracle Corporation
All rights reserved.

FreeTSD: failed to destroy key: Undefined error: 0
VBoxHeadless(425,0xb058b000) malloc: *** error for object 0x11c700: double free
*** set a breakpoint in malloc_error_break to debug
Listening on port 3389.

Note that it doesn’t fork to the background by default. Forcing it to do so avoids abruptly stopping the VM should the terminal itself be accidentally closed. The errors mentioned are harmless.

If you need the “computer in a window” function, you can access the VM by using any RDP client and having it connect to port 3389 on the host. On OS X, I suggest CoRD. It’s important to make sure that the RDP client’s configuration matches the video output of the VM. I stumbled on this at first: CoRD expected a 1280 x 1024 screen, but the Linux console was set to 1024 x 768. This led to weird visual glitches, since VBox doesn’t seem to correctly communicate the screen resolution to the RDP client. The nice thing is that the RDP pipe is active even when the machine rebooting, because it’s handled by VBox itself.

Of course, if you run a VM in headless mode, you’ll typically only use RDP when needed. SSH works just as fine, and trust me, the whole thing feels faster without a chunky VM window in the way!

Post navigation

← Most gamers prefer physical media
Analysis of a misspelling →

Written by a human

All text in this blog was written the old-fashioned way, without going through an AI / LLM. Any typos, mistakes and inconsistencies are proudly mine.

If you like this…

Did you enjoy reading this post without ads? If so, you may consider supporting this blog via Ko-fi!

Where was that?

Time travel

  • June 2026 (1)
  • May 2026 (1)
  • April 2026 (1)
  • November 2022 (1)
  • March 2022 (1)
  • December 2021 (1)
  • October 2020 (1)
  • August 2020 (1)
  • May 2020 (1)
  • March 2020 (3)
  • February 2020 (1)
  • April 2019 (1)
  • March 2016 (1)
  • July 2015 (1)
  • May 2015 (3)
  • April 2015 (2)
  • November 2014 (1)
  • August 2014 (2)
  • September 2013 (2)
  • April 2013 (1)
  • March 2013 (1)
  • October 2012 (1)
  • June 2012 (1)
  • March 2012 (1)
  • December 2011 (1)
  • November 2011 (3)
  • October 2011 (2)
  • July 2011 (1)
  • April 2011 (1)
  • January 2011 (1)
  • December 2010 (2)
  • November 2010 (1)
  • October 2010 (3)
  • September 2010 (16)
  • August 2010 (12)
  • July 2010 (10)
  • June 2010 (1)
  • May 2010 (7)
  • April 2010 (3)

Categories

  • Business (2)
  • Culture (13)
  • Electronics (4)
  • Huh? (1)
  • iOS (4)
  • Linguistics (11)
  • Music (8)
  • Personal (5)
  • Photography (10)
  • Podcast (5)
  • Science (7)
  • Society (28)
  • Technology (50)
  • Travel (2)
  • Tutorials (13)
  • TV (7)
  • Video games (6)

Tags

1984 (3) absp (3) apple (11) bluray (3) camera (4) communication (3) coronavirus (5) covid19 (5) culture (4) death (3) dream theater (4) ebooks (5) english (4) facebook (3) ios (8) ipad (4) iphone (10) iphone os (4) italian (3) italy (6) james labrie (3) jordan rudess (3) language (6) languages (3) linguistics (6) lockdown (5) mac (6) memories (3) mike portnoy (3) opus (4) orwell (3) os x (6) personal (4) photography (10) podcast (6) projects (3) rant (4) reading (4) spanish (3) the big bang theory (3) tutorial (12) tv (5) twitter (3) video games (6) work (3)
© 2026 Avian Bone Syndrome | Powered by Minimalist Blog WordPress Theme
We use cookies on our website to give you the most relevant experience by remembering your preferences and repeat visits. By clicking “Accept”, you consent to the use of ALL the cookies.
Do not sell my personal information.
SettingsAccept
Privacy & Cookies Policy

Privacy Overview

This website uses cookies to improve your experience while you navigate through the website. Out of these, the cookies that are categorized as necessary are stored on your browser as they are essential for the working of basic functionalities of the website. We also use third-party cookies that help us analyze and understand how you use this website. These cookies will be stored in your browser only with your consent. You also have the option to opt-out of these cookies. But opting out of some of these cookies may affect your browsing experience.
Necessary
Always Enabled
Necessary cookies are absolutely essential for the website to function properly. This category only includes cookies that ensures basic functionalities and security features of the website. These cookies do not store any personal information.
Non-necessary
Any cookies that may not be particularly necessary for the website to function and is used specifically to collect user personal data via analytics, ads, other embedded contents are termed as non-necessary cookies. It is mandatory to procure user consent prior to running these cookies on your website.
SAVE & ACCEPT