Page 1 of 1

VM has no network / virtual adapter on host disrupts NIC

Posted: 21. May 2009, 17:40
by Unimatrix01
Hi,

I'll start off with details of my setup:
- Windows XP SP3 host
- nVidia network card
- VirtualBox 2.2.2
- Ubuntu 9.04 guest

The problem: In the Ubuntu guest, there's no network at all (ifconfig => no eth0 device). This happens when using NAT mode and also in bridged mode. It was like that at the first time I booted the guest already. I should probably mention that I am using a copy of an existing virtual harddisk that I copied from another machine. On that machine, running Windows Vista, it works fine using bridged networking. I created the VM by creating a new VM and selecting the existing virtual harddisk.

Additionally, there's something wrong with the virtual network adapter (VirtualBox Host-Only Network). If I enable it, my normal network connection immediately stops working, without any errors; when I disable it, it starts working again. On the normal connection I have the VirtualBox Bridged Network Driver installed, on the VirtualBox adapter not. That is just like it is configured on the Vista machine where it works fine. I have fixed IPs setup on both adapters. I tried different IP addresses in the 192.168.x.x range but it doesn't make a difference. If I change the IP address of the virtual adapter, it might work sometimes, but after a reboot the problem returns.

I should probably mention that I had VMware Workstation 6.0 installed on this machine previously. However, I removed it thoroughly, including the virtual network adapters and drivers, and ran two registry cleaners repeatedly, so I hope this has nothing to do with it. On the Vista machine, I currently have a copy of VMware Workstation 6.5, and that is still installed, so I wonder if that has anything to do with it.

Lastly, I read that many had trouble with bridged networking after upgrading from 2.1.4 to 2.2.2, but this is not the case here. This is my first install of VirtualBox ever on this machine. The drivers for the netfilter are available in the install directory too.

If anyone has any idea of what might be wrong here, or has some suggestions, please let me know.

Thanks!

Re: VM has no network / virtual adapter on host disrupts NIC

Posted: 21. May 2009, 19:25
by baf
if you run ifconfig -a in the guest do you then see your network card?
If so check /etc/udev/rules.d/70-persistent-net.rules and either change that file so your macaddresses match or change mac-address in virtualbox.

Re: VM has no network / virtual adapter on host disrupts NIC

Posted: 21. May 2009, 22:27
by Unimatrix01
Thanks for the tip! I didn't know that. Indeed that was the problem.

ifconfig -a showed that it "shifted" to eth2. After editing the rules file it worked normally.

As for the virtual adapter, it suddenly works fine... just hope it keeps going :-).

Thanks again.

Re: VM has no network / virtual adapter on host disrupts NIC

Posted: 21. May 2009, 23:36
by Sasquatch
As long as you don't change the virtual NIC MAC address, you'll be fine. Linux generates new names for interfaces when a different MAC address is found. It doesn't matter if you have only one NIC, the moment you would hit the "Generate MAC address" button, you will have a new NIC in Linux. Or use the VDI on a different Host or for a new VM.