Skip to content

Instantly share code, notes, and snippets.

@possibilities
Forked from elasticskyx/headlessvm.md
Last active June 10, 2021 23:59
Show Gist options
  • Save possibilities/422437d0354599df963dcde062d074f5 to your computer and use it in GitHub Desktop.
Save possibilities/422437d0354599df963dcde062d074f5 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 "work" --vrdeextpack default
VBoxManage modifyvm "work" --vrde on
VBoxManage modifyvm "work" --vrdeport 3391
VBoxManage modifyvm "work" --vrdeaddress 127.0.0.2

2. Start the Guest VM in headless mode

VBoxManage startvm "work" --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