Skip to content

Instantly share code, notes, and snippets.

@elasticskyx
Created August 28, 2012 11:15
Show Gist options
  • Star 18 You must be signed in to star a gist
  • Fork 6 You must be signed in to fork a gist
  • Save elasticskyx/3497312 to your computer and use it in GitHub Desktop.
Save elasticskyx/3497312 to your computer and use it in GitHub Desktop.
Run VirtualBox Virtual Machines in Headless Mode #virtualbox #windows #vm

Setup a Headless Virtual Machine on Windows using Oracle VirtualBox

If you are concerned with having many windows open when running several virtual machines on your Windows server or workstation, then have them run headless using VirtualBox commandline tools. Additionally, you can manage these VM's using RDP (Mircrosoft Terminal Server Connection - mstsc.exe) or SSH access (if enabled)

Install VirtualBox and Extension Packs

  • Download the latest version and install of [Oracle VirtualBox] vbox
  • Download the [VirtualBox Extension Pack] vbox and install for the same version
  • Create your virtual machine using GUI or command line tools - refer to [VirtualBox Manual] manual

Configure Guest VM for Remote Desktop Access (RDP)

1. Setup VM environment variables

In a command promt window run the following:

VBoxManage modifyvm "VM name" --vrdeextpack default
VBoxManage modifyvm "VM name" --vrde on
VBoxManage modifyvm "VM name" --vrdeport 3391
VBoxManage modifyvm "VM name" --vrdeaddress 127.0.0.2

2. Start the Guest VM in headless mode

This command will show any errors while starting the guest VM on the terminal

VBoxHeadless --startvm "VM name"

Alternate Command

VBoxManage startvm "VM name" --type headless

3. Launch Microsoft RDP Viewer

mstsc /v:127.0.0.2:3391
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment