Creating and running virtual machines with VirtualBox is one thing. Managing them remotely, especially once you have more than a couple, is another.
Oracle links to a couple management solutions right from the VirtualBox homepage. One of them, phpVirtualBox, has tutorials all over the Internet. I love an underdog, so this guide will deal with the other package Oracle links to, Hyperbox, and how to get it running on a Windows host.
Despite being several years old, Hyperbox is currently at version 0.0.12. As such, don’t expect a blissful and totally intuitive experience. It’s a basic GUI that gets the job done once the configuration is completed. Its own documentation for Windows host machines is also, shall we say, slightly lacking if you’re not already a VirtualBox expert.
Getting started with remote management
First, if you haven’t already, download and install VirtualBox. Then, on the same machine, download and install the Hyperbox server software. You can also install the Hyperbox client on that machine, or on a remote machine with network access to the server, or both. I recommend installing the client software locally first because there will be fewer network communication issues to troubleshoot.
The Hyperbox server installation won’t result in any obvious new applications on your desktop. It’s just a service that runs at system boot, listening for connections from Hyperbox clients.
But even the Hyperbox server isn’t quite enough to enable access to your VirtualBox VMs. On Windows, Hyperbox relies on VirtualBox’s Web Services for remote administration. We need to turn those on first, through a Scheduled Task.
Start VBoxWebSrv.exe at system boot
VirtualBox includes a Web Services executable, but there’s no way to activate it via the GUI. Here’s how to start it automatically whenever the host machine is turned on or rebooted, using Windows Server 2008 R2 as a reference:
- Open Task Scheduler however you like - through Control Panel, MMC, Administrative Tools, whatever.
- Click Create Task
- In the General tab:
- Name the task “VirtualBox Web Services”
- Tick “Run whether user is logged on or not”
- Tick “Run with highest privileges”
- Tick “Hidden”
- In the Triggers tab:
- Click “New…”
- Select “At startup”
- Click “OK”
- In the Action tab:
- Click New…
- Set Action to “Start a program”
- Click “Browse…”
- Navigate to the VirtualBox directory - by default, C:\Program Files\Oracle\VirtualBox
- Select VBoxWebSrv.exe
- Click “Open”
- In the “Add arguments (optional)” box, fill in “-A null”; this step disables the need to provide a username and password when connecting to the hypervisor software later on
- Click “OK”
- In the Conditions tab, untick everything:
- In the Settings tab:
- Untick “Stop the task if it runs longer than:”
- Leave other settings as they are
- Click “OK”
Save the task and the VirtualBox Web Services will always start with your host machine.
With your host machine set up, it’s time to get the client software configured. Getting connected to your library of virtual machines is a two-step process.
Connect to Hyperbox remote management server
Here you’re connecting to the Hyperbox server software, hboxd.exe, running as a service, on the machine hosting your VirtualBox VMs. You won’t see your list of VMs just yet.
In the Hyperbox client interface, click Server > Add and fill in the details.
The Label can be anything you like. The Hostname can be the IP address or name of the host machine. The default User and Password are “admin” and “hyperbox”, respectively. Click OK and your first server is ready for a connection.
Right-click your server name and select “Connect”, or just double-click the server name. With luck, you’re connected within a few seconds. If you’re unlucky, the Hyperbox service doesn’t respond, and you’ll have to remotely restart the hboxd.exe service on your host, kind of negating the whole point of having a Hyperbox client in the first place.
Deep breath. Version 0.0.12.
Connect to hypervisor (VirtualBox)
Let’s assume your connection to the Hyperbox server is successful. You still need to connect to the hypervisor software, VirtualBox, via its Web Services component, VBoxWebSrv.exe.
Right-click your server name again, select Hypervisor, and then select Connect. You’ll get a small dialog box asking for some parameters.
My host has VirtualBox 5.0.20 installed, and its Web Services component were set up earlier, so from the dropdown I choose the “Oracle VirtualBox - vbox-5.0-ws” connector. Since I configured VBoxWebSrv to not require authentication, the Connector Options field can be left blank. If you choose to require authentication, fill in Connector Options like so:
The username and password are the Windows host machine credentials. Any special characters in the password, by the way, like a question mark or slash, will flummox the connector, so only use letters and numbers in the account password if possible.
The good news? Once you connect to the hypervisor for the first time, the connection will be made automatically every time you connect to the server.
Manage your virtual machines remotely
The graphical user interface that Hyperbox offers isn’t quite as pretty as the native VirtualBox GUI, but it tells you everything you need to know.
Well, almost. You might notice that if your VMs are running under VBoxVmService, Hyperbox won’t show that they’re running, just that they exist. Same as VirtualBox itself, actually.
Regardless, you can still view and edit your VM configurations, and even start and stop them if Hyperbox is your only add-on to VirtualBox.
One more oddity to note: since the Hyperbox client is actually a Java program, it might not show up in the Windows Task Manager’s list of running applications. Rather, it shows up underneath a listing for your Java platform.
How do you manage your virtual machines? Let us know in the comments!
Photo credit: Andres Athehortua