VirtualBox 3.0.4 and Bridged Networking on XP Host with GUI

Photo: Wally Gobetz
Photo: Wally Gobetz

Editors Note:

While I was writing this, the solution to my problem struck me unexpectedly. Click here to skip the drama and jump right ot the solution.

Originally, this article started out as a complete rant and cry for help. I started to write about the failure and frustration of the installation and network configuration of a virtual machine in VirtualBox 3.0.4.  It just would not work. The problem, as it turned out, was that I was over thinking the process. BUT, that is not completely my own fault.

See, here’s the problem. Before starting anything new, I read, research, and read some more to get as much of an understanding as I can on the subject. In this case, the official documentation of VirtualBox 3.0.4 in my opinion is incomplete and did not include some of the specific details that would have made this setup much less painful. Combine that with the piles of information regarding networking configuration in previous versions, and it’s easy to get some wires crossed. Networking in version 3.0.4 was largely improved and simplified, meaning a lot of the information available online, in forums, on blogs, etc, is irrelevant to the new version and the current documentation does not do a great job of explaining the changes and how to set up networking, specifically bridging, in the new version.

In my research and troubleshooting I’ve seen many others who describe the same problems I had while trying to set this up under version 3.0.4, so in the spirit of passing on my experience and what I learned from it, I am going to keep my original writing here so you can see what I was doing and why it was wrong. If you want to skip to the solution, please click here.

The Original Post (the wrong way)

Ok, here it is. Frustration has finally gotten the best of me and I have no  idea where to go from here. What am I talking about, you ask? I’m talking about setting up a Virtual Machine (VM) using VirtualBox 3.0.4 on a Windows XP Host.

Let’s take a look at what has brought me to this state of utter frustration.

A while back, I downloaded and installed VirtualBox to set up VMs to test and play around with some different Operating Systems and Software. To be honest, it works Great for that purpose. But now, I want to take my virtualization experience to the next level and have been thinking about installing FreeNAS in a VM to serve as a NAS solution and making it available to all PCs  across a production LAN.

The Parts:

I have a Windows XP sp2 machine sitting at home that is not getting much use that would be perfect for trying this out.

Specs:

  • Windows XP sp2
  • 4 Gigs of RAM
  • 500 Gig HD
  • Intel Quad Core Processor
  • Single on-board G-bit network adapter.

I know there is a bit to cover and become familiar with when setting out to connect a Local LAN to a VM in the same address space, so I did my research first.

I downloaded and printed the VirtualBox user manual. Reading through it I highlighting the parts that I thought were important or significant. The documentation seems a little incomplete and is NOT all that well written for someone just getting started.  There are no guides or instruction that specifically marks the steps for setting up the different types of network options. So I figure, fine! After reading the manual, I should have some idea of the basic requirements. I can just do a search on the net and piece together the rest of the information.

That sounded like a good idea a first, but in practice..not so much. The web served up a LOT of information related to VirtualBox network bridging and configuration. The problem is that a lot of it was contradictory and there is almost no information specific to version 3.0.4. I read through forums, blogs, papers and anything else that looks like it might help. In the end, nothing was extraordinarily helpful.

Host OS (Windows XP)

Physical Network Adapter: Local Area Connection (2)  NVidia NForce Network Controller (Bridged /Connected)

Virtual Host Adapter: VirtualBox Host-Only Network

Bridged Adapter (Local Area Connection (2) + VirtualBox Host-Only Network):  Network Bridge (Network Bridge)

Note that the Host adapters were set to Compatible Mode as recommended by several forum posts and blogs.

Screen netsh bridge compatmode
Screen netsh bridge compatmode

Guest OS (FreeNAS/ Linux Based)

Network settings for the guest were set up using

Adapter Type: IntelPRO/1000 MT Desktop. This was selected based on recommendations that appeared repeatedly in forums and blogs.

Attached to: Bridged Adapter

Name: MAC Bridge Miniport – This was the only selection available in the menu.

VM Network Configuration
VM Network Configuration

Installing the Guest

During the installation of  FreeNAS, I used static IP information

  • IP Address: 192.168.15.115
  • Netmask: 255.255.255.0
  • Gateway: 192.168.15.3 (LAN Router private IP)
  • DNS Server: ISP DNS IP

Errrrrrttttttt….

(that’s my best screatching to a stop text effect).

It’s amazing how when you step away from a problem and look at it from another angle, how easy the solution comes to you. By writing out my thoughts here and stepping through all the little details, something hit me and it is THE key piece of information that is missing between setting up older versions of VirtualBox and Version 3.0.4.

There were a number of references that said networking and bridging in the new version was completely refigured and the process was very simple. Basically, just create a bridge – But no details were ever provided on what that meant exactly. Based on all the “old” information and lack of new detailed explainations, I figured it meant to create bridged connections on the host and use that as the Guest bridged adapter. What if the solution is even simpler  than that. It’s worth a try…Soooo

I went back to my Host settings (Windows XP Network settings) and tore down the bridge and restored my original adapters and IP information. Now I only have Local Area Connection (2) and VirtualBox Host-Only Network shown. From here I went back to the VirtualMachine Network settings and listed in the “Name” menu instead of  “MAC Bridge Miniport” I now had the two Host adapters listed. (Local Area Connection (2)  and VirtualBox Host-Only Network).

I selected the physical Host Adapter (Local Area Connection (2)), restarted the VM and to my amazement.. It all worked.

(the right way)

In the end, this is how you set up bridged networking between Virtual Machines and the LAN with VirtualBox 3.0.4

Windows XP Hosted VirtualBox – using the GUI:

Host Network Settings:

This part is easy. Do nothing. That’s right, nothing! No changes are necessary for the host’s interfaces or network settings (as long as you already have a working interface).

DO NOT create or bridge any interfaces on the host system. Leave the network interfaces on your host OS (physical) alone.

Guest Network Settings:

Start VirtualBox and highlight the Virtual Machine you want to modify from the list on the left. Once highlighted, select “network” under the “details” tab on the right.

Select VM
Select VM

You should now see a window displaying the Network settings for your VM.  From here, the Adapter 1 tab and make sure the “Enable Network adapter” checkbox is selected.

Virtual_FreeNAS_Network_settings_1

Next to “Adapter Type” select “Intel Pro/1000 MT Desktop” or “Intel Pro/1000 MT Server” from the menu. These have a higher rate of success when used in this way. I had some trouble with the PCnet II and PCnet III adapter Types.

Select Adapter Type
Select Adapter Type

Next to “Attached to” select “Bridged Adapter” from the menu.

Select Bridged Adapter
Select Bridged Adapter

Finally, next to “Name” select your Host system’s network interface from the menu. In this case, my host system interface is the on-board “NVIDIA nForce Networking Controller”. Your options will likely be different based on the interface installed of in use.

Select Host System interface to be bridged.
Select Host System interface to be bridged.

That is all there is to it. Just hit the “OK” button in the main settings window and start your VM. As long as the Guest OS on your VM hs been configured with the correct IP/network information for your LAN, you should now be able to ping and access it from any PC on your network.

Conclusion: So simple, even a Caveman can do it!

Initial frustration aside, in the end, I really have to give props to Sun/VirtualBox for actually making this incredibly simple to set up. On the other hand, they lose points for failing to make this clear in the documentation.

Final Note:

Since posting this, VirtualBox 3.0.6 has been released. Considering how easy this is to set up in 3.0.4, I can only guess that it is just as simple in 3.0.6. After all, it would not make much sense to make any changes that would make the process more difficult.

I hope you find this information helpful or useful and hopefully can use it to avoid the mistakes I made. Have a question, suggestion, better way of doing this or just want to leave some feedback? Please leave a comment.

Updates:

VirtualBox 3.0.6 – Confirmed / Working
VirtualBox 3.1.8 – Confirmed / Working

15 Replies to “VirtualBox 3.0.4 and Bridged Networking on XP Host with GUI”

  1. Hi Ed,

    Great info. This will save a lot of work and frustration from others who are looking to install VirtualBox on XP. If you wouldn’t mind posting a quick review/rating on our site, http://www.myitprojects.net, please let me know and I will add “VirtualBox” on our list of VM products.

    Also, I’m looking forward with great anticipation to your Ubuntu install posting. I checked VirtualBox’s site, and under Ubuntu, it says, “Works with additions” and “Works partially, with additions.” It certainly makes your Ubuntu post more compelling.

    Thanks for sharing your knowledge and experience.

    Best regards,

    Reigneer

  2. @Reigneer Nabong
    Reigneer,

    Thanks for stopping by and commenting. The VBox Additions won’t do much for a headless VM Server, but they do add some features and function between the Guest and Host when run in a graphical environment.

    Add VirtualBox as a product to your list and I will be happy to add my comments.

    Thanks Again

    -Ed

  3. Hi Ed,

    There was a review submitted under Virtual Machine – Sun Microsystems, and it was for VirtualBox. We decided to re-classify the page to be Java Virtual Machine / VirtualBox. If you wouldn’t mind posting your review/rating on VirtualBox, I would greatly appreciate it.

    Please let me know if I can provide additional information.

    Thank you and have a great weekend.

    Best regards,

    Reigneer

  4. Hi

    I have this working fine except that I can do no web browsing from within XP. I have Ubuntu 9.10, VirtualBox 3.0.8 and have installed Windows XP SP1.

    From XP I can ping both internal and external IP addresses and can also ping external domains such as google.com. However, when I launch IE6 and try browsing I get ‘Page cannot be displayed’ and the titlebar is ‘Invalid Syntax Error’.

    I am using Bridged adapter to eth0 and have tried all the Adapter types.

    Regards
    Andrew

  5. Hi Andrew. Based on the fact you can ping external IPs and host names from both the host and the guest, I’m guessing your networking settings are correct. I don’t have a XP guest running on an Ubuntu Host to poke around with.

    Some thoughts.
    Have you tried another browser? (firefox, opera, safari)
    Does the error happen for all/every page you try to open?
    Have you tried to connect to other services (ftp, ssh, telnet) on remote systems?

    I googled ‘Page cannot be displayed’ and the titlebar is ‘Invalid Syntax Error’ and there were a lot of results with different cause/solutions available but it appears that there is a problem with IE somewhere. Sorry I couldn’t be more help.

  6. Great post as like yopu point out the manual is vague and most posts out there are for older versions. I was 99% there after changing to bridged mode, but your note on changing the network adapter kicked it home for me – THANKS!

  7. Configuration on my host and VM are exactly as you have described but I am having the same issue as Andrew M.
    Host: Windows 7
    VBox: Fedora 11 x64

    If the Network for the Vbox machine is set to Bridged Mode I can get to IPs all day long but am not able to get DNS to function in the Vbox machine. Strange that its only DNS that does not work. nslookup, dig @, ping, on the VBox host all fail.

    If the network is changed to use NAT then DNS works fine.

  8. Well this is strange…
    For kicks n giggles I changed the Bridged Host interface to my Wireless LAN Device and started up Fedora11. Now Bridged mode is working. So it would appear, possibly there is an issue with Win7 host Intel NIC driver not passing DNS. If I figure it out, I’ll be sure to post.

  9. Ed,

    Thanks!!

    Switched to Vbox as vmware wouldn’t address wireless (ubuntu server guest) (vista host); Vbox worked immediately. After 2 months (time allowing) still couldn’t get
    get either talking to each other.

    Followed your suggestions, 2 minutes later & everything is working!!!

    Great post!!

  10. I was struggling for almost 2 weeks now and this approach Worked for me like charm.. thanks alot

  11. Excellent !!! This really Helped me…I was fiddling around with redhat & centOS on Virtual box 4.04..

  12. Hi all
    I have some difficulties configuring network for a Windows2003 guest on Windonws7 host. I have 2 NICs configured on host (as bridged adapters in virtualbox) but none of them is working correctly on guest windows2003. I tried to enable only on adapter, seen by the guest but never connected. DHCP client is activated on windows 2003 but it can’t reach the dhcp server. All firewalls are disabled.
    The strangest thing is that the same guest is working fine on another XP host…
    Can anyone help me ?
    thanks in advance

Comments are closed.