Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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 1.2.3.4:3000 and get the webapp, on the remote browser I type in 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 github.com/nylen/openwesabe-installer

I've already found serverfault.com/questions/136715/how-do-i-access-a-web-server-on-a-virtualbox-from-the-host-machine which answers the host-VM part of the question.

share|improve this question

2 Answers 2

As for the question you quote , the best option is to configure the network adapter on the virtualbox VM as bridged. It will get its own IP address and you local network will be able to reach it. Please be sure that your windows host firewall allows connections

share|improve this answer

I havent played with Virtual Box in some time, we prefer KVM with libvirt. For remote management we enable vnc connection which connects directly to the console to the vm guest. This provides you with a way to recover the machine if you loose connectivity on the vm guest or it crashes. As golemwashere mentioned; use bridge mode.

We have something like this in our guest xml config (also can be done through virt manager). You shouldnt have an issue with converting your guests to a KVM image; kvm has been in the mainstream linux kernel since 2.6.20 .. or around.

Anyway, do some reading about kvm.

Regards,

Testlabs Team.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.