I am going to be running a webapp [1] on a VirtualBox virtual machine, and I want to be able to access it (via a browser) from the host, and from another machine on the same network. (That is, on the host browser I type in http://1.2.3.4:3000 and get the webapp, on the remote browser I type in http://1.2.3.4:3000 and get the webapp. No need to access the webapp on the VM itself.)
The ideal setup will be Windows 7 host, Ubuntu Server 10.04 VM, and I want to access the app over the network from an Ubuntu 10.04 machine.
Only if this is impossible, I'll swop them and run an Ubuntu 10.04 host, Ubuntu Server 10.04 VM, and access the app over the network from the Windows 7 machine.
What VirtualBox settings do I need to enable to make this happen? What settings do I need to enable on the host to make remote access to the VM possible? (NB, Windows 7 host ideal, Ubuntu host only if this is impossible.)
[1] Mesabe, the private open-source version of Wesabe, a personal finance tool. Code at http://wiki.github.com/wesabe/mesabe/ and installation script at http://github.com/nylen/openwesabe-installer
Accessing VirtualBox from host/remote machine
-
MarkCranness
- Volunteer
- Posts: 875
- Joined: 10. Oct 2009, 06:27
- Primary OS: MS Windows 7
- VBox Version: VirtualBox+Oracle ExtPack
- Guest OSses: Windows Server 2008 R2; Ubuntu 11.04; Windows 2000 Server; Windows XP
Re: Accessing VirtualBox from host/remote machine
Two options:
- Set the VM to use Bridged networking. It will look to your local network like a physical PC with it's own IP address (assigned either via DHCP on your network, set set statically in the VM).
- Set the VM to use NAT and port forward port 3000 to the VM (see section 'Configuring port forwarding with NAT' on the user manual : http://www.virtualbox.org/manual/ch06.html#natforward) AND connect to the VirtualBox hosts's external IP to access Wesabe.
- Set the VM to use Bridged networking. It will look to your local network like a physical PC with it's own IP address (assigned either via DHCP on your network, set set statically in the VM).
- Set the VM to use NAT and port forward port 3000 to the VM (see section 'Configuring port forwarding with NAT' on the user manual : http://www.virtualbox.org/manual/ch06.html#natforward) AND connect to the VirtualBox hosts's external IP to access Wesabe.