Tuesday, 13 December 2011

Access Web Server on VirtualBox Guest

I have a Windows computer where I use Oracle VirtualBox to allow me to run Ubuntu Linux.
I just found out how to access the web server on the virtual machine from the Windows Host.
You need to use the vboxmanage command that comes with virtualbox:
First do:
vboxmanage list vms
to list the names all of the virtual machines on the computer, then do:
vboxmanage modifyvm "[virtual machine name]" --natpf1 "http,tcp,,8080,,80"
You can then point your web browser on the windows host to http://localhost:8080 to see the web server on the virtual machine.

I don't know the syntax - see the VirtualBox Manual, Chapter 6 for details.

Post a Comment