Lost IP address

Discussions about using Linux guests in VirtualBox.
Post Reply
mark-d
Posts: 4
Joined: 14. Jan 2010, 09:42
Primary OS: MS Windows 7
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: SUSE 11.2

Lost IP address

Post by mark-d »

Hi,
I'm using Virtual box 3.1.6 running on Windows 7 Home Premium.
I have a Suse 11.2 guest VM using a bridged adapter.

Up until yesterday, I was happily using my linux VM accessing the internet. This morning my linux vm has no ethernet connection. I don't believe I have changed anything to do with virtualbox or the linux environment. The one thing I did do is reboot my windows host, router and cable modem. I have internet access from the host windows system. When I run ifconfig in the linux vm, eth0 has no ip address. I've tried rebooting the vm, rebooting the windows host, taking down and bring up eth0 in the vm, running dhclient.

Any ideas???

Thanks,
Mark.

Code: Select all

# /sbin/ifconfig
eth0      Link encap:Ethernet  HWaddr 08:00:27:DB:49:27  
          inet6 addr: fe80::a00:27ff:fedb:4927/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:10 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:0 (0.0 b)  TX bytes:1836 (1.7 Kb)
          Interrupt:10 Base address:0xd020 

lo        Link encap:Local Loopback  
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:20 errors:0 dropped:0 overruns:0 frame:0
          TX packets:20 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:1200 (1.1 Kb)  TX bytes:1200 (1.1 Kb)

#  ip link show eth0
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UNKNOWN qlen 1000
    link/ether 08:00:27:db:49:27 brd ff:ff:ff:ff:ff:ff

C:\Program Files\Sun\VirtualBox>VBoxManage showvminfo ss2 --details --machinerea
dable
Sun VirtualBox Command Line Management Interface Version 3.1.6
(C) 2005-2010 Sun Microsystems, Inc.
All rights reserved.

name="ss2"
ostype="OpenSUSE"
UUID="0a9e5162-6a6e-426a-8798-6d42c69d99ac"
CfgFile="C:\vbox\Machines\ss2\ss2.xml"
hardwareuuid="0a9e5162-6a6e-426a-8798-6d42c69d99ac"
memory=768
vram=12
cpus=1
synthcpu="off"
bootmenu="messageandmenu"
boot1="dvd"
boot2="disk"
boot3="none"
boot4="none"
acpi="on"
ioapic="off"
pae="on"
biossystemtimeoffset=0
hwvirtex="on"
hwvirtexexcl="off"
nestedpaging="off"
vtxvpid="off"
VMState="running"
VMStateChangeTime="2010-04-28T20:02:37.636000000"
monitorcount=1
accelerate3d="off"
accelerate2dvideo="off"
teleporterenabled="off"
teleporterport=0
teleporteraddress=""
teleporterpassword=""
storagecontrollername0="IDE Controller"
storagecontrollertype0="PIIX4"
storagecontrollerinstance0="0"
storagecontrollermaxportcount0="2"
storagecontrollerportcount0="2"
storagecontrollername1="Floppy Controller"
storagecontrollertype1="I82078"
storagecontrollerinstance1="0"
storagecontrollermaxportcount1="1"
storagecontrollerportcount1="1"
"IDE Controller-0-0"="C:\vbox\HardDisks\OpenSUSE 11.2 disk 2.vdi"
"IDE Controller-ImageUUID-0-0"="73d7cca5-d9de-439c-a52e-1301aaa2c62e"
"IDE Controller-0-1"="none"
"IDE Controller-1-0"="emptydrive"
"IDE Controller-1-1"="none"
"Floppy Controller-0-0"="emptydrive"
"Floppy Controller-0-1"="none"
bridgeadapter1="Generic Marvell Yukon 88E8057 PCI-E Gigabit Ethernet Controller"

macaddress1="080027DB4927"
cableconnected1="on"
nic1="bridged"
nic2="none"
nic3="none"
nic4="none"
nic5="none"
nic6="none"
nic7="none"
nic8="none"
uart1="off"
uart2="off"
audio="dsound"
clipboard="bidirectional"
VideoMode="1920,1135,32"
vrdp="off"
usb="on"
SharedFolderNameMachineMapping1="VBoxShared"
SharedFolderPathMachineMapping1="C:\vbox\Shared"
VRDPActiveConnection="off"
VRDPClients=0
GuestStatisticsUpdateInterval=0
StatGuestSample=0
mark-d
Posts: 4
Joined: 14. Jan 2010, 09:42
Primary OS: MS Windows 7
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: SUSE 11.2

Re: Lost IP address

Post by mark-d »

Update:
I checked my other guest VMs and none of them have IP addresses. My Windows XP guest fails on "Renewing your IP address".

This seems to suggest the problem is not with the guest VMs, but with my host system or virtualbox installation.

For the lack of anything better to do, I ran the Wireshark network sniffer on my host. I didn't see any V4 DHCP traffic while trying to renew the IP address on the guest vm. How is DHCP handled by virtualbox? Does it forward on the client requests or does it do its own DHCP serving. Should I see guest DHCP traffic on the "real" network?

Thanks,
Mark.
Perryg
Site Moderator
Posts: 34369
Joined: 6. Sep 2008, 22:55
Primary OS: Linux other
VBox Version: OSE self-compiled
Guest OSses: *NIX

Re: Lost IP address

Post by Perryg »

Look at the host Local Area Connection properties and make sure that you have the VirtualBox Bridged Network Driver and that it has a check mark in it.
mark-d
Posts: 4
Joined: 14. Jan 2010, 09:42
Primary OS: MS Windows 7
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: SUSE 11.2

Re: Lost IP address

Post by mark-d »

Hmmm,

If you mean Control panel > Network and Internet > Network and Sharing Center

It's showing two active networks. One is the normal internet connection. The other is "VirtualBox Host-Only Network". That sounds wrong since I'm using a bridged adapter for all my VMs. I don't remember ever playing with Windows drivers beyond the normal install. Forgive my ignorance, but how do I change this to be the right driver?

Thanks,
Mark.
Perryg
Site Moderator
Posts: 34369
Joined: 6. Sep 2008, 22:55
Primary OS: Linux other
VBox Version: OSE self-compiled
Guest OSses: *NIX

Re: Lost IP address

Post by Perryg »

The host-only is installed when you install VirtualBox. You can disable this on in the same area that you see it. You may want/need it so don't remove it. Disable will not load the drivers
  • Right click the network icon in the task bar and then click Open network and sharing center.
    Then click Change adapter settings.
    Right click on the host-only adapter and select disable.
    Then while you are there right click the Local Area Connections and select properties.
    Look for the VirtualBox bridged adapter driver and make sure that it is there and has a check mark in it.
    If it is not there then you will need to re-install VBox and select repair and make sure that you have the network adapters installed.
mark-d
Posts: 4
Joined: 14. Jan 2010, 09:42
Primary OS: MS Windows 7
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: SUSE 11.2

Re: Lost IP address

Post by mark-d »

Found it!!

I mentioned that I had rebooted my PC and router. What I actually did was move my computer and router to another room. When I reconnected everything I inserted the Ethernet cable into the *other* Ethernet interface of my PC. Doh!!

I now understand that when you use a bridged adapter you have to specify a single physical interface it should use. And if one of the interfaces is not in use, it really matters which one you pick. :oops:

Thanks for your help Perryg.

Mark
Post Reply