VBoxHeadlessTray is simple Windows app that runs a VirtualBox VM as a tray icon:
Common commands are readily available from the context menu:
- VBoxHeadlessTray610Setup.exe - for VirtualBox 6.1.0
- VBoxHeadlessTray604Setup.exe - for VirtualBox 6.0.4
- VBoxHeadlessTray52Setup.exe - for VirtualBox 5.2
- VBoxHeadlessTray51Setup.exe - for VirtualBox 5.1
- VBoxHeadlessTray50Setup.exe - for VirtualBox 5.0 (Thanks to Andy Hawkins who did almost all the work on this).
- VBoxHeadlessTray43Setup.exe - for VirtualBox 4.3
- VBoxHeadlessTray42Setup.exe - for VirtualBox 4.2
- VBoxHeadlessTray41Setup.exe - for VirtualBox 4.1
- VBoxHeadlessTray40Setup.exe - for VirtualBox 4.0
- VBoxHeadlessTray32Setup.exe - for VirtualBox 3.x
- VBoxHeadlessTraySetup.exe - for earlier versions of VirtualBox
Download and Install
From Start menu -> Programs run VBoxHeadlessTray
Select a machine from the displayed list. VBoxHeadlessTray will powerup the machine.
Right click the tray icon to start/stop/save etc...
If a VBoxHeadlessTray machine is running when Windows is shutdown, it will automatically save the machine's state and on Windows restarting, VBoxHeadlessTray will restart itself automatically and resume the VM.
To prevent a machine starting at windows logon, exit VBoxHeadlessTray before shutting down windows, or use the -np option.
VBoxHeadlessTray [-?|-h] [-np] <machinename>
- -np: don't power on the machine
- -h: show help
VBoxHeadlessTray 3.2 requires VirtualBox 3.2 to be installed. VBoxHeadlessTray 1.2 requires VirtualBox 3.1.2 to be installed.
Machine execution, machine management and all other functionality is still supplied by Virtual Box. VBoxHeadlessTray is a simple front end that hosts VirtualBox runtime.
Testing on Windows XP, Windows Vista and Windows 7.
Custom Menu Commands
It is possible to customize the context menu that appears when clicking on the VBoxHeadlessTray tray icon. This is done through VBox Guest Properties.
Say the of the VM being hosted was running a web site and you want a quick way to launch a web browser for it. At the command prompt, use the VBoxManage tool (see VirtualBox documentation) to add the following guest properties.
In this this example my VM is running a website toptensoftware.ulamp and my machine name is devvm
VBoxManage guestproperty set devvm "VBoxHeadlessTray\ContextMenus\browse\menutext" "Open Web Browser..." VBoxManage guestproperty set devvm "VBoxHeadlessTray\ContextMenus\browse\command" "https://toptensoftware.ulamp" VBoxManage guestproperty set devvm "VBoxHeadlessTray\ContextMenus\browse\verb" "open"
If verb is empty, the command is executed (CreateProcess) otherwise it's launched with ShellExecute.
You can optionally set another property to specify the context under which the commmand is available (either Running or Stopped).
VBoxManage guestproperty set devvm "VBoxHeadlessTray\ContextMenus\browse\context" "Running"
Source Code and Build Instructions
Source code for VBoxHeadlessTray is available from github.
Get and build SimpleLib - git://github.com/toptensoftware/SimpleLib.git
Get the VirtualBox SDK
Get VBoxHeadlessTray - git://github.com/toptensoftware/VBoxHeadlessTray.git
Open and build VBoxHeadlessTray.sln
Expected folder structure is:
\YourProjectsFolder \SDKs \VirtualBox4 \sdk \SimpleLib \VBoxHeadlessTray
To build setup program:
Build both x64 and Win32 Release configs
Download and install NSIS
Right click on the VBoxHeadlessTraySetup.nsi file in Visual Studio project and select properties
Set Excluded from Build to No
Right click .nsi file again and choose Compile.
Set the .nsi file properties back to Excluded from Build.
This manual building of the setup is due to the fact that we need both x64 and Win32 exe's for the setup program and Visual Studio doesn't provide a way to do this easily.
VBoxHeadlessTray by Topten Software is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 2.5 Australia License.