Weblog entry #4 for shortpath

etch and xen
Posted by shortpath on Thu 21 Dec 2006 at 23:32
Tags: ,
I spent a lot of time scratching my head over why the default Xen configuration in etch using network-dummy worked, but network-bridge did not. Following Steve's article on using Xen and Sid, I got everything going -- except networking and a running DomU. Doh.

Today, I fired up the box, had networking on Dom0 working but using the network-dummy script and used xen-tools to install a DomU using debootstrap. When I started the DomU, it failed on the network device. Doh. Set network-bridge in the xen config file, restart xend, and it worked. Right on. So now I have an amd64 etch Dom0 running an amd64 etch DomU.

Watching kernel messages, it seemed that the xen bridge and virtual interfaces are not brought up until a DomU is started. Networking was fine as soon as I had a guest running. Maybe one day I'll know enough to sort it out, but I bet someone beats me to it.

 

Comments on this Entry

Posted by mvanbaak (80.126.xx.xx) on Thu 21 Dec 2006 at 23:46
[ Send Message ]
I had the same thing.
What helped me was removing the hotplug stuff from /etc/networking/interfaces and declare them 'auto ethX' instead.

[ Parent | Reply to this comment ]

Posted by shortpath (71.116.xx.xx) on Fri 22 Dec 2006 at 07:34
[ Send Message | View Weblogs ]
I forgot to do that the first time through, but realized my mistake pretty quickly. The hotplug function is nice, but not having 'auto' in there means that the interface isn't brought up on boot or whenever the /etc/init.d/networking script is started (or restarted.) That's kind of a pain.

[ Parent | Reply to this comment ]

Posted by shortpath (71.116.xx.xx) on Thu 4 Jan 2007 at 04:04
[ Send Message | View Weblogs ]
It turns out that not all was well, as networking on the Dom0 was flaky while the DomU worked fine. After some discussion on the xen-users list, I was told that using network-dummy (which is the default in the installed xend-config.sxp) and editing /etc/network/interfaces to bring up the bridge (and not the attached interfaces) on boot Just Works. Thanks to Gemes Geza for pointing it out.

[ Parent | Reply to this comment ]

Posted by Grugs (130.226.xx.xx) on Mon 5 Mar 2007 at 10:41
[ Send Message ]
How do you "edit /etc/network/interfaces to bring up the bridge (and not the attached interfaces)" ? Can you please post your /etc/network/interfaces file?

[ Parent | Reply to this comment ]

Posted by shortpath (139.182.xx.xx) on Mon 5 Mar 2007 at 16:53
[ Send Message | View Weblogs ]
This is what I got from Gemes on the xen-users mailing list:

I bring up the bridge via /etc/network/interfaces:

auto xenbridge-e1000
iface xenbridge-e1000 inet static
address 172.16.0.2
netmask 255.255.255.0
network 172.16.0.0
bridge_ports eth-e1000

(I've renamed the interfaces via udev, but it should work as well with
bridge_ports eth0, or something like that)

And have in my /etc/xen/xend-config.sxp:

(network-script network-dummy)


Network is working from the bootup regardless of any DomU running or not.

I did the same and it worked fine, without the udev renaming.

[ Parent | Reply to this comment ]

Posted by Grugs (85.82.xx.xx) on Mon 5 Mar 2007 at 20:51
[ Send Message ]

Thanks for your response.

Not knowing how to rename the interfaces via udev, and seeing that it should work as well with bridge_ports eth0, I've now changed my /etc/network/interfaces from what it was originally . . .

# The loopback network interface
auto lo
iface lo inet loopback

# The primary network interface
allow-hotplug eth0
iface eth0 inet dhcp

auto eth0

. . . to:

# The loopback network interface
auto lo
iface lo inet loopback

# The primary network interface
iface xenbridge-e1000 inet dhcp
bridge_ports eth0

auto xenbridge-e1000

(What's xenbridge-e1000?)

I've left out the address, netmask and network lines on the assumption that they are inappropriate given that I'm using DHCP. Just a guess, really.

Anyway, long story short: still no connection. I won't have time to look at this for another week but thanks for your help.

[ Parent | Reply to this comment ]

Posted by shortpath (71.116.xx.xx) on Tue 6 Mar 2007 at 06:19
[ Send Message | View Weblogs ]
I'll post my config file when I get in to work tomorrow. xenbridge-e1000 is the name set by a udev rule for the xen bridge. Sorry I didn't post mine earlier, work got a little hectic. I had two problems getting my set up to work: the ethernet interfaces were named backwards (some known Dell problem) and getting the bridge to work in etch (the docs didn't mention the interfaces fix).

[ Parent | Reply to this comment ]

Posted by shortpath (139.182.xx.xx) on Tue 6 Mar 2007 at 16:35
[ Send Message | View Weblogs ]
Here's the important part of my /etc/network/interfaces file:

auto xenbr0
iface xenbr0 inet static
address xxx.xxx.xxx.xxx
netmask xxx.xxx.xxx.xxx
network xxx.xxx.xxx.xxx
bridge_ports eth0

The address, netmask, and network settings were the static settings for eth0, so now the bridge is brought up using those settings with eth0 as a part of the bridge. You said you were using dhcp, so you could probably do something like

auto xenbr0
iface xenbr0 inet dhcp
bridge_ports eth0

Heh, now that I look back at your post, that's exactly what you're doing. I think all you need to change is 'xenbridge-e1000' to 'xenbr0' (the default name for the xen bridge).

[ Parent | Reply to this comment ]

Posted by Grugs (85.82.xx.xx) on Sat 10 Mar 2007 at 08:50
[ Send Message ]

So now /etc/network/interfaces looks like this:

# The loopback network interface
auto lo
iface lo inet loopback

# The primary network interface
iface xenbr0 inet dhcp
bridge_ports eth0

auto xenbr0

Running ifconfig xenbr0 returns this:

xenbr0    Link encap:Ethernet  HWaddr 00:00:00:00:00:00
          inet6 addr: fe80::200:ff:fe00:0/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:31 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:0 (0.0 b)  TX bytes:9018 (8.8 KiB)

Note: still no IP address after running /etc/init.d/networking restart

What strikes me at this point is the HWaddr 00:00:00:00:00:00. All those 0's look curious.

But before you spend any more time helping me, I'll just let you know that I'm going to re-direct my efforts to something else I've just discovered: Qemu. Given that installing Xen involves installing (and keeping up-to-date) its own kernel and that Qemu doesn't, I'm thinking now that Xen might be overkill for the effect I'm looking for: having a Linux machine on which I can switch to Windows from time to time without re-booting.

Thanks again for your blog entry and responses.

[ Parent | Reply to this comment ]

User Login

Username:

Password:

[ Advanced Login ]

Register Account

Quick Site Search