Skip to contentSkip to conversation

No network device problem in -testing

DISCUSSION NAHieu 4 participants 8 messages Feb 3, 2006 – Feb 6, 2006

lore
Share & tools
lore

NAHieu

author
#0 lore raw

Hi,

I am running the latest Xen 3.0-testing tree, and have a trouble: my virtual machine cannot find the network device. Network in Dom0 is OK, but in DomU, "ifconfig -a" only shows the local interface. But here in the dmesg content, I found these line:

^^^
...
RAMDISK driver initialized: 16 RAM disks of 4096K size 1024 blocksize Xen virtual console successfully installed as tty1 Event-channel device installed.
netfront: Initialising virtual ethernet driver.
NET: Registered protocol family 2
Registering block device major 3
IP: routing cache hash table of 2048 buckets, 16Kbytes
TCP established hash table entries: 8192 (order: 4, 65536 bytes) TCP bind hash table entries: 8192 (order: 3, 32768 bytes)
TCP: Hash tables configured (established 8192 bind 8192)
NET: Registered protocol family 1
NET: Registered protocol family 17
^^^

The above messages convice me that the network was succesfully initialized, but why I dont see the "eth0" as normally? I am kinda stuck now. Anybody knows how to fix the problem, or tell me how to debug it myself?

I use the latest -testing tree, as below:

# hg tip
changeset:   8738:eff96462fde8
tag:         tip
user:        [email protected]
date:        Tue Jan 31 12:04:12 2006 +0100
summary:     Remove dummy definitions of __gpfn_to_mfn/__mfn_to_gpfn.

And here is my configuration file:
^^^
kernel = "/boot/vmlinuz-2.6-xenU"
memory = 200
name = "ubuntu"
disk = ['file:/home/hieu/xen/rootfs.swap,hda1,w',
'file:/home/hieu/xen/rootfs.ubuntu,hda2,w']
root = "/dev/hda2 ro"
^^^

Many thanks.
Hieu

#1 lore raw

try adding this to your config:

vif = [ '' ]

Christopher

Quoted 48 lines · NAHieu

Hi,

I am running the latest Xen 3.0-testing tree, and have a trouble: my virtual machine cannot find the network device. Network in Dom0 is OK, but in DomU, "ifconfig -a" only shows the local interface. But here in the dmesg content, I found these line:

^^^
...
RAMDISK driver initialized: 16 RAM disks of 4096K size 1024 blocksize Xen virtual console successfully installed as tty1 Event-channel device installed.
netfront: Initialising virtual ethernet driver.
NET: Registered protocol family 2
Registering block device major 3
IP: routing cache hash table of 2048 buckets, 16Kbytes
TCP established hash table entries: 8192 (order: 4, 65536 bytes) TCP bind hash table entries: 8192 (order: 3, 32768 bytes)
TCP: Hash tables configured (established 8192 bind 8192)
NET: Registered protocol family 1
NET: Registered protocol family 17
^^^

The above messages convice me that the network was succesfully initialized, but why I dont see the "eth0" as normally? I am kinda stuck now. Anybody knows how to fix the problem, or tell me how to debug it myself?

I use the latest -testing tree, as below:

# hg tip
changeset:   8738:eff96462fde8
tag:         tip
user:        [email protected]
date:        Tue Jan 31 12:04:12 2006 +0100
summary:     Remove dummy definitions of __gpfn_to_mfn/__mfn_to_gpfn.

And here is my configuration file:
^^^
kernel = "/boot/vmlinuz-2.6-xenU"
memory = 200
name = "ubuntu"
disk = ['file:/home/hieu/xen/rootfs.swap,hda1,w',
'file:/home/hieu/xen/rootfs.ubuntu,hda2,w']
root = "/dev/hda2 ro"
^^^

Quoted 8 lines

Many thanks.
Hieu

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel

author
#2 lore raw
Quoted 4 lines · Christopher Clark

try adding this to your config:

vif = [ '' ]

Thanks, Christopher. That works, but it surprises me: it seems that previously I didnt need to specify this parameter. Something changes recently in xend?

Probably it is better to leave this parameter "on" by default, so the virtual domain always has NIC, by default.

Hieu

Quoted 63 lines

Christopher

Quoted 56 lines · NAHieu

Hi,

I am running the latest Xen 3.0-testing tree, and have a trouble: my virtual machine cannot find the network device. Network in Dom0 is OK, but in DomU, "ifconfig -a" only shows the local interface. But here in the dmesg content, I found these line:

^^^
...
RAMDISK driver initialized: 16 RAM disks of 4096K size 1024 blocksize Xen virtual console successfully installed as tty1 Event-channel device installed.
netfront: Initialising virtual ethernet driver.
NET: Registered protocol family 2
Registering block device major 3
IP: routing cache hash table of 2048 buckets, 16Kbytes
TCP established hash table entries: 8192 (order: 4, 65536 bytes) TCP bind hash table entries: 8192 (order: 3, 32768 bytes)
TCP: Hash tables configured (established 8192 bind 8192)
NET: Registered protocol family 1
NET: Registered protocol family 17
^^^

The above messages convice me that the network was succesfully initialized, but why I dont see the "eth0" as normally? I am kinda stuck now. Anybody knows how to fix the problem, or tell me how to debug it myself?

I use the latest -testing tree, as below:

# hg tip
changeset:   8738:eff96462fde8
tag:         tip
user:        [email protected]
date:        Tue Jan 31 12:04:12 2006 +0100
summary:     Remove dummy definitions of __gpfn_to_mfn/__mfn_to_gpfn.

And here is my configuration file:
^^^
kernel = "/boot/vmlinuz-2.6-xenU"
memory = 200
name = "ubuntu"
disk = ['file:/home/hieu/xen/rootfs.swap,hda1,w',
'file:/home/hieu/xen/rootfs.ubuntu,hda2,w']
root = "/dev/hda2 ro"
^^^

Many thanks.
Hieu

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel

#3 lore raw
Quoted 6 lines · NAHieu
Quoted 4 lines · Christopher Clark

try adding this to your config:

vif = [ '' ]

Quoted 6 lines

Thanks, Christopher. That works, but it surprises me: it seems that previously I didnt need to specify this parameter. Something changes recently in xend?

Probably it is better to leave this parameter "on" by default, so the virtual domain always has NIC, by default.

This change was made on Dec 13. Previously, the nics= option and the vif option interacted in unexpected ways (nics=0 did not necessarily mean 0 vifs, for example). This way vif and vbd configuration behaves the same, and there are no concealed defaults to confuse people.

Ewan.

#4 lore raw
Quoted 4 lines · Ewan Mellor

This change was made on Dec 13. Previously, the nics= option and the vif option interacted in unexpected ways (nics=0 did not necessarily mean 0 vifs, for example). This way vif and vbd configuration behaves the same, and there are no concealed defaults to confuse people.

It seems that the options:
ip="blah"
netmask="blah"
gateway="blah"

still work, but now they can also be specified within the vif=[''] list as vif=['ip=blah, etc'].

Is this a bug, or is there just supposed to be two ways to apply an IP address etc. now?

#5 lore raw
Quoted 11 lines · Molle Bestefich
Quoted 4 lines · Ewan Mellor

This change was made on Dec 13. Previously, the nics= option and the vif option interacted in unexpected ways (nics=0 did not necessarily mean 0 vifs, for example). This way vif and vbd configuration behaves the same, and there are no concealed defaults to confuse people.

It seems that the options:
ip="blah"
netmask="blah"
gateway="blah"

Quoted 5 lines

still work, but now they can also be specified within the vif=[''] list as vif=['ip=blah, etc'].

Is this a bug, or is there just supposed to be two ways to apply an IP address etc. now?

Those ip, netmask, and gateway parameters specify options for the Linux kernel command line. With these, you can persuade the guest to use the specified details, without having the guest preconfigured, but in general it's not a good way to work -- you can't specify addresses for multiple interfaces this way, in particular. The vif options specify the details given to the hotplug scripts when the devices come up. These details are used to configure DHCP, routing, or whatever inside dom 0 -- they don't necessarily affect the guest. You still need the guest to configure itself appropriately.

The best thing to do is probably to use vif=, have a DHCP server inside dom0 (dhcp=yes in a couple of places) and then preconfigure the guest to expect their addresses via DHCP.

The kernel command line options are probably most useful for developers, who just want to get things up and running quickly without configuring their guest properly.

Ewan.

#6 lore raw
Quoted 10 lines · Ewan Mellor

Those ip, netmask, and gateway parameters specify options for the Linux kernel command line. With these, you can persuade the guest to use the specified details, without having the guest preconfigured, but in general it's not a good way to work -- you can't specify addresses for multiple interfaces this way, in particular. The vif options specify the details given to the hotplug scripts when the devices come up. These details are used to configure DHCP, routing, or whatever inside dom 0 -- they don't necessarily affect the guest. You still need the guest to configure itself appropriately.

Quoted 3 lines

The best thing to do is probably to use vif=, have a DHCP server inside dom0 (dhcp=yes in a couple of places) and then preconfigure the guest to expect their addresses via DHCP.

Ah. Super, thanks. The above belongs in the Wiki if you ask me. If it's ok with you, I'll add it when I get some free time.

Quoted 3 lines

The kernel command line options are probably most useful for developers, who just want to get things up and running quickly without configuring their guest properly.

Personally I use it to assign domU IP addresses.
But then again, that's because I've never stumbled upon any well-written documentation that told me not to - I just googled and found something named 'ip=' which looked right, so I used that.

If you feel like doing more newbie tutoring (sorry....), another question:
It feels reasonable that Xen moves the physical ethernet interface to peth0 and creates a virtual eth0 interface in dom0 - after all, dom0 is a virtual machine, it should have virtual interfaces that I can play/do funky things with.

But:
1.) Why doesn't Xen do the same for eth1 and upwards? 2.) Why doesn't Xen do this when using the non-bridged setup?

Seems completely illogical to me. Plus the incoherency makes it really hard to write good documentation.

#7 lore raw
Quoted 11 lines · Molle Bestefich
Quoted 10 lines · Ewan Mellor

Those ip, netmask, and gateway parameters specify options for the Linux kernel command line. With these, you can persuade the guest to use the specified details, without having the guest preconfigured, but in general it's not a good way to work -- you can't specify addresses for multiple interfaces this way, in particular. The vif options specify the details given to the hotplug scripts when the devices come up. These details are used to configure DHCP, routing, or whatever inside dom 0 -- they don't necessarily affect the guest. You still need the guest to configure itself appropriately.

Quoted 6 lines
Quoted 3 lines

The best thing to do is probably to use vif=, have a DHCP server inside dom0 (dhcp=yes in a couple of places) and then preconfigure the guest to expect their addresses via DHCP.

Ah. Super, thanks. The above belongs in the Wiki if you ask me. If it's ok with you, I'll add it when I get some free time.

Go for it. We do have a manual as well -- if you added it to that too, then we'd certainly appreciate it (everyone knows that developers don't like to write docs ;-)

Quoted 8 lines

If you feel like doing more newbie tutoring (sorry....), another question:
It feels reasonable that Xen moves the physical ethernet interface to peth0 and creates a virtual eth0 interface in dom0 - after all, dom0 is a virtual machine, it should have virtual interfaces that I can play/do funky things with.

But:
1.) Why doesn't Xen do the same for eth1 and upwards?

Have you tried running the network-bridge script with vifnum=1? If that doesn't do it, then that's a bug. If you want to permanently configure your system so that both eth0 and eth1 are bridged, then see the workaround at the end of bug #332.

Quoted 4 lines

2.) Why doesn't Xen do this when using the non-bridged setup?

Seems completely illogical to me. Plus the incoherency makes it really hard to write good documentation.

I'm not sure, but I guess for performance. You don't want your packets to be taking an extra hop through the kernel if you can avoid it.

Ewan.