Public | Automated Build

Last pushed: 2 years ago
Short Description
phpVirtualBox is a modern web interface designed to allow users to administer VirtualBox in a headless environment - mirroring the VirtualBox GUI through its web interface.
Full Description

docker-phpvirtualbox

phpVirtualBox is a modern web interface that allows
you to control remote VirtualBox instances - mirroring the VirtualBox GUI.
This is a docker image that eases setup.

About phpVirtualBox

From the official description:

An open source, AJAX implementation of the VirtualBox user interface written in PHP.
As a modern web interface, it allows you to access and control remote VirtualBox instances.
phpVirtualBox is designed to allow users to administer VirtualBox in a headless
environment - mirroring the VirtualBox GUI through its web interface.

Usage

This docker image is available as a trusted build on the docker index.
Using this image for the first time will start a download automatically.
Further runs will be immediate, as the image will be cached locally.

This image provides the phpVirtualBox web interface that communicates with any
number of VirtualBox installations on your computers.

As per the above diagram the following examples assume we have two computers PC2 and PC3
in our cluster that we want to manage through a single installation of phpVirtualBox.

Applying the same scheme to any number of computers running Virtualbox should be fairly straight forward.
Also, the same scheme applies if you only want to manage a single PC, which hosts both VirtualBox and
this image.

Internally, the phpVirtualBox web interface communicates with each VirtualBox installation through the
vboxwebsrv program that is installed as part of VirtualBox.
So for every computer connected to the phpVirtualbox instance, we're going to use a minimal container
that eases exposing the vboxwebsrv.

For PC2:

$ docker run -it --name=vb2 clue/vboxwebsrv vbox@10.1.1.2

And for PC3:

$ docker run -it --name=vb3 clue/vboxwebsrv myuser@10.1.1.3

This will start an interactive container that will establish a connection to the given host.
To establish an encrypted SSH connection it will likely ask for your password for each user. This is the user that runs your virtual machines (VMs). See clue/vboxwebsrv for more details.

Some background: The official phpVirtualBox readme describes setting up the vboxwebsrv daemon so
that it is automatically started when the machine boots up and is exposed over the network.
Instead of requiring this upfront configuration, we only spawn the vboxwebsrv on demand
and expose its socket only through an encrypted SSH tunnel.

In fact, if you already have your vboxwebsrv set up, you don't have to rely on
the clue/vboxwebrv container. In this case, you can substitute the following link by
supplying ENV variables instead. You can also pass a visual name like this:

-e VB3_PORT_18083_TCP=10.1.1.4:18083 -e VB3_NAME=MyServer

Now that all vboxwebsrv instance are up, we can link everything together and start our actual phpVirtualBox container.
The recommended way to run this container looks like this:

$ docker run -d --link vb2:FirstPC --link vb3:MyLaptop -p 80:80 clue/phpvirtualbox

You can now point your webbrowser to this URL:

http://localhost

This is a rather common setup following docker's conventions:

  • -d will run a detached session running in the background
  • -p {OutsidePort}:80 will bind the webserver to the given outside port
  • --link {ContainerName}:{DisplayName} links a vboxwebsrv instance with the given {ContainerName} and exposes it under the visual {DisplayName}
  • clue/phpvirtualbox the name of this docker image
Docker Pull Command
Owner
clue
Source Repository

Comments (5)
clue
2 years ago

Hey @markusschiel, in fact, this very project does run "completely" on any platform capable of running docker containers :) However, it deliberately only contains the phpVirtualBox web interface – which requires a VirtualBox elsewhere. This allows this image to be used in a wide variety of setups.

Linking a local VirtualBox setup if currently being evaluated (https://github.com/clue/docker-phpvirtualbox/issues/4). Feel free to share your results if you happen to come up with a solution :)

markusschiel
2 years ago

hey clue,

I think i missunderstand your solution as a package that completly runs on synology without PCs.

Do you have a solution to install virtualbox and phpvirtualbox together on synology ds1515+ without PCs?

I will only run phpvirutalbox on synology ds1515+ without PCs.

regards,
Markus

clue
2 years ago

Hey @markusschiel, not sure what's wrong with your setup. Can you file a ticket in the source repository and perhaps provide some more details (versions and commands used etc.)? Thanks!

markusschiel
2 years ago

i have synology DS1515+ :)

markusschiel
2 years ago

Hey clue,
today i tested phpvirtualbox on Synology DSM5.2 but it doesn't work. After i installed the package the docker container failed by starting with error ... unexpected stopped.

Whats wrong?

Regards,
Markus