Take the 2-minute tour ×

I'm running a dev server on a VirtualBox installation running Windows Server 2003. I'd like to access the virtual machine from my host machine's browser (i.e http://virtualhost/) - anyone know how I can set this up?

share|improve this question

1 Answer 1

Broadly, you have a couple of options:

  1. Configure the virtual machine to use bridged networking. This will essentially put the VM onto the same LAN as your host, so you should provide for its IP configuration either via your LAN's DHCP server, or a static assignment.

  2. Configure the virtual machine to use the host-only network. This will put the VM onto a virtual LAN that exists ONLY inside the host machine. For convenience, VirtualBox provides a built-in DHCP server on the host-only network, but you are also free to configure your host-only virtual NICs statically, of course.

The only remaining hitch is getting the 'virtualhost' name to resolve to the correct IP address, so that http://virtualhost/ will function as you expect. If you statically configured your VM's NIC, then you can put it into your host's hosts file (at %SYSTEMROOT%\system32\drivers\etc\hosts). Otherwise, you'll have to figure out a way to dynamically update your DNS with your VM's IP.

share|improve this answer
The name isn't important, an IP address would work just as well - I tried connecting to the local IP on the vurtual machine from my host, but it timed out. –  user57875 Oct 22 '10 at 1:20
Perhaps you could update your question with the details about your virtual network configuration? "It timed out" isn't enough to go on, since that is a symptom of any of a number of misconfigurations. –  Steven Monday Oct 22 '10 at 1:41
It's really simple, I just have one virtual machine running and I want to connect to it from the host machine. I tried connecting to the virtual server's IP from my host after configuring the machine to sue both bridged and host-only networking, but neither one worked. –  user57875 Oct 22 '10 at 1:51

Your Answer

