mirror of
https://github.com/clue/docker-phpvirtualbox.git
synced 2026-04-25 03:55:47 +03:00
[GH-ISSUE #5] Documentation on a *very* simple setup #5
Labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/docker-phpvirtualbox#5
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @miseqsprime on GitHub (May 13, 2015).
Original GitHub issue: https://github.com/clue/docker-phpvirtualbox/issues/5
I'm new to docker, so I apologize if this is an ignorant question.
I've got an Ubuntu 14.04 server running virtualbox - installed directly on the host. It's mostly used in a headless state over ssh, but I'd really love to be able to remotely work with virtualbox on it via a web interface.
I installed docker and pulled down your images:
But I'm having trouble figuring out exactly how to get them up and running so that they're using the local virtualbox installation on the server and are accessible from another host on the network.
Again, I apologize for my lack of experience - any suggestions?
@clue commented on GitHub (May 13, 2015):
Welcome and no worries! :) Arguably, this is one of the more complex docker setups, so let's try to clear up some things first :)
Did you follow the README? If so, are you stuck at any particular step? See also #1 which might give you some additional background information.
I understand that the setup experience might be frustrating, so please feel free to share your results and/or improvements on our setup instructions. Thanks!
@miseqsprime commented on GitHub (May 13, 2015):
Thanks!
TL;DR:
Yup, I read through both READMEs and the phpvirtualbox wiki.
The version of virtualbox I'm using is
4.3.10_Ubuntuon Ubuntu 14.04.02 desktop (with an attached monitor, but it's basement and I work on it remotely over ssh, or when necessary VNC).I've not used
vboxwebsrvor phpVirtualBox before, so I'm trying to figure out a couple things at once.What I've done so far:
At this point the guides I've seen say to start it up with:
However, I don't have a
vboxweb-servicestartup script - though there is avirtualboxstartup script.I ran
sudo service virtualbox start, which says the kernel modules started up successfully (I'm assuming I need to do this to get vboxwebsrv running).There is also a
vboxwebsrvbin, which is a symbolic link to the shell script:/usr/share/virtualbox/VBox.sh. At this point I tried to setup and get vboxwebsrv running (without success), but then realized that docker-vboxwebsrv is supposed to do this for me (so I killed that vboxwebsrv process).So I attempted to run:
But I get the message:
The machine is using DHCP (it's actually a portable server that I take to customer sites) - so it won't ever have a hardcoded IP. It looks like you can't reference
localhostfrom inside a docker container - and the common answer is to use the hardcoded IP ... but I can't. I haven't been able to an answer to that yet, but it's a docker question, not a docker-vboxwebsrv question.I'm assuming that (if I've got things right so far), once I have docker-vboxwebsrv running, I just need to run clue/phpvirtualbox and link it to the vboxlocal container.
It looks like I do this with something like:
However, since I'm running it locally, I'm not sure what the value of
MyComputershould be.@clue commented on GitHub (May 13, 2015):
Thanks for your elaborate description, this certainly helps troubleshooting this.
Indeed, the
clue/vboxwebsrvimage needs to be able to connect to the PC that runs VirtualBox via SSH. There are several options:--dns IPoption to the container.--net=hostoption to the container and connect tolocalhost.Correct. The option
--link vboxlocal:MyComputermeans "link the container named 'vboxlocal' with a local alias of 'MyComputer' ". The alias can be anything you want - we only use it as a display name in the phpVirtualBox's dropdown menu for available VirtualBox instances.@miseqsprime commented on GitHub (May 14, 2015):
Hah! I finally got it. My biggest problem was getting vboxwebsrv running - there have been lots of changes to how it runs in the last couple versions of virtualbox. I ended up purging it and installing with:
Then, I found that starting vboxwebsrv with
--net=hostgot it running (no more SOAP errors), but when I attempted to link to it with docker-phpvirtualbox, I got the error:I found this solution though:
... which does work. Then I was able to start up docker-phpvirtualbox with:
And everything ran perfectly.
So now I'm working on a few more issues:
Ctrl-p Ctrl-Q)I'm not exactly sure how the storage works. I'm assuming if I create a virtual machine using the phpvirtualbox interface running inside the docker container then that virtual machine only exists in the docker container. Being new to docker, I'm not sure if it's removed if I restart the container, or just if I remove the container - but either way, I'd like to store the virtual machines outside the container (like at /srv/virtualbox, running as an NFS share), but I'm not sure how to do this yet either.After playing around a little bit more, it appears that since virtualbox is not running in the container, it has full access to the host, and they aren't being stored inside the phpvirtualbox container. Sorry!Do these things seem possible? Any advice?