Windows – VirtualBox: Can’t get Bridged Networking to work (Win7 host)

networkingvirtualboxwindows 7

I'm trying to set up a virtual LAMP server, including sharing files between the guest OS (Ubuntu Server) and the host OS (Windows 7) using samba. I think my problem is that I can't get Bridged (or Host-Only) networking to work in VirtualBox.

I can boot the Linux VM just fine with NAT, but then can't access any services on it directly (except after port-forwarding port 80)(my understanding is that port-forwarding works because I'm not running a web server on the host OS, and therefore it can forward traffic to the unused port 80).

I don't think that port-forwarding samba traffic (from the host to the guest) will work since I think that the host OS is using those ports.

When I turn off NAT and turn bridged networking on I get an error. The VM fails to boot, with a dialog popping up (title: VirtualBox – Error) that says "Failed to open a session for the virtual machine UbuntuServer. Configuration error: Failed to get MAC address (VERR_CFGM_VALUE_NOT_FOUND).

I'm hoping that once this is resolved then samba will work ok 🙂

Any advice on this would be great (how to fix it would be wonderful, next steps for troubleshooting would be great, too 🙂 )

Best Answer

So it looks like I happened upon an answer. I was fiddling around with the VM manager program (on the host OS) and made the 'Bridged' adapter #1 and now things work fine. Host-only also works once it's #1, too.

(I started with the default: NAT as adapter #1, then added the Bridged adapter as #2. Once I realized that the bridged/host-only adapter wasn't working I disabled adapter #1 (the NAT) leaving the Bridged adapter as #2)

Related Question