dhclient fails in domU

Bug #127215 reported by Rob Wilco
8
Affects Status Importance Assigned to Milestone
xen-3.0 (Ubuntu)
Expired
Undecided
Unassigned
xen-3.2 (Ubuntu)
Expired
Low
Unassigned

Bug Description

Xen was installed from the feisty repositories, the domU system was installed with debootstrap using the "debian lenny" template and later with the "ubuntu feisty" template. The installation is detailed later on this page. This recipe used to work fine but now show shortcomings. The eth0 interface is configured in the domU to dynamically retrieve its IP address.

The domU boots but can't get an IP address:

root@azalee:~# dhclient eth0
Internet Systems Consortium DHCP Client V3.0.4
Copyright 2004-2006 Internet Systems Consortium.
All rights reserved.
For info, please visit http://www.isc.org/sw/dhcp/

socket: Address family not supported by protocol - make sure
CONFIG_PACKET (Packet socket) and CONFIG_FILTER
(Socket Filtering) are enabled in your kernel
configuration!

DomU installation step:
 1. create a partition {{{
lvcreate -n azalee -L 2G hd && mkfs.ext3 /dev/mapper/hd-azalee
mkdir /mnt/azalee && mount /dev/mapper/hd-azalee /mnt/azalee}}}

 1. install a minimum debian system: {{{
debootstrap feisty /mnt/azalee}}}

 1. configure the minimum debian system : {{{
chroot /mnt/azalee
cat > /etc/hostname <<.
azalee
.
cat > /etc/fstab <<.
/dev/hda1 / ext3 defaults 0 1
.
cat > /etc/network/interfaces <<.
auto lo eth0
iface lo inet loopback
iface eth0 inet dhcp
.
exit
umount /mnt/azalee
}}}

 1. create a "xen domain" ie a vm {{{
cat > /etc/xen/azalee <<.
name = "azalee"
kernel = "/boot/vmlinuz-2.6.19-4-server"
ramdisk = "/boot/initrd.img-2.6.19-4-server"
root = "/dev/hda1"
disk = [ 'phy:/dev/hd/azalee,hda1,w' ]
vif = [ 'mac=00:16:3E:00:01:03']
memory = 200
.}}}

Rob Wilco (rob.wilco)
description: updated
Revision history for this message
Andrew Sharpe (andrew-sharpe-79) wrote :

Check if the af_packet.ko module is available in the domU

excerpt from net/packet/Kconfig:
The Packet protocol is used by applications which communicate
directly with network devices without an intermediate network
protocol implemented in the kernel, e.g. tcpdump

Revision history for this message
Todd Deshane (deshantm) wrote :

loading af_packet module into the initrd worked on a hardy domU.

Revision history for this message
randall (randall-redigital) wrote :

i resolved this issue by upgrading to 2.6.24-18-xen (on both dom0 and then domU - you don't have to create a new image for the domU, just copy over the modules from the dom0)

Daniel T Chen (crimsun)
Changed in xen-3.2:
importance: Undecided → Low
Revision history for this message
Nick Moffitt (nick-moffitt) wrote :

I am seeing this bug in Hardy using 2.6.24-23-xen and a Hardy domU with the exact same kernel packages installed as the dom0.

Revision history for this message
Nick Moffitt (nick-moffitt) wrote :

If this worked in 2.6.24-18, then this may be a regression.

$ sudo dhclient eth0
There is already a pid file /var/run/dhclient.pid with pid 134519072
Internet Systems Consortium DHCP Client V3.0.6
Copyright 2004-2007 Internet Systems Consortium.
All rights reserved.
For info, please visit http://www.isc.org/sw/dhcp/

socket: Address family not supported by protocol - make sure
CONFIG_PACKET (Packet socket) and CONFIG_FILTER
(Socket Filtering) are enabled in your kernel
configuration!
$ sudo modprobe af_packet
FATAL: Error inserting af_packet (/lib/modules/2.6.24-23-xen/kernel/net/packet/af_packet.ko): Invalid module format
$ uname -a
Linux servera 2.6.24-23-xen #1 SMP Mon Jan 26 03:09:12 UTC 2009 x86_64 GNU/Linux

Revision history for this message
Nick Moffitt (nick-moffitt) wrote :

I'm seeing this with 2.6.24-18 as well:

 * Configuring network interfaces...
modprobe: FATAL: Error inserting af_packet (/lib/modules/2.6.24-18-xen/kernel/net/packet/af_packet.ko): Invalid module format

randall, were there any other steps you had to take to make this work?

Revision history for this message
Nick Moffitt (nick-moffitt) wrote :

Naturally this was PEBCAK on my part: I didn't bother to check that the kernel arch matched the domU's arch :)

Revision history for this message
Clint Byrum (clint-fewbar) wrote :

Can somebody please confirm that this still affects a supported release of Ubuntu? Marking Incomplete pending response. Thanks!

Changed in xen-3.0 (Ubuntu):
status: New → Incomplete
Changed in xen-3.2 (Ubuntu):
status: New → Incomplete
Revision history for this message
Launchpad Janitor (janitor) wrote :

[Expired for xen-3.0 (Ubuntu) because there has been no activity for 60 days.]

Changed in xen-3.0 (Ubuntu):
status: Incomplete → Expired
Revision history for this message
Launchpad Janitor (janitor) wrote :

[Expired for xen-3.2 (Ubuntu) because there has been no activity for 60 days.]

Changed in xen-3.2 (Ubuntu):
status: Incomplete → Expired
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.