At work I have ReviewBoard running on VirtualBox on one of my development machines. This has been working great but every once in awhile I accidentally close the VirtualBox console because it’s sitting in my taskbar:

VirtualBox in Taskbar
I remember reading about a ‘headless’ mode in the VirtualBox documentation. This will setup VirtualBox running as a RDP server – it can run ‘invisibly’ and you can connect via Windows Remote Desktop to intact with the system.
You can either configure the remote settings within the VirtualBox GUI:

Remote Display Dialog
Or pass them in through the command line. I went this route and created a batch file called start-reviewboard.bat:
REM Batch script to start VirtualBox instance of ReviewBoard in headless mode
REM Connect via RDP (Remote Desktop Protocol) to port 8000
"C:\Program Files\sun\VirtualBox\VBoxHeadless.exe" -startvm ReviewBoard -p 8000
This starts VirtualBox in headless mode (VBoxHeadless.exe), starts my ReviewBoard vm, and sets up RDP (port 8000).
You can run this script and it should start VirtualBox – but you will still be left with a DOS box sitting there in your taskbar. Turns out it is fairly easy to write a small script to run a batch file silently as well. I created start-reviewboard.vbs:
REM 0 = hide window, 1 = show window (useful for debugging)
Set WshShell = CreateObject("WScript.Shell")
WshShell.Run chr(34) & "D:\scripts\start-reviewboard.bat" & Chr(34), 0
Set WshShell = Nothing
You use this script to run your batch file and pass in a parameter to hide the window (0). I’d recommend setting that to 1 while you get things setup so you can see what is going on and once you have worked out the kinks set it to 0.
When you run it – you should get a DOS window and a message “Listening on port 8000” (or whatever you set the port to). I changed the port to 8000 as I assume Windows is already using 3389 (default RDP port).
To connect I simply start Remote Desktop Connection and enter localhost:8000.
To stop VirtualBox simply issue the following command:
VBoxManage controlvm YOUR_VM_NAME poweroff