]> Xen network bridge 🌐:aligrant.com

Xen network bridge

Alastair Grant | Tuesday 30 August 2011

Since VMWare have stopped supporting VMWare Server 2.0 and it no longer seems to be possible to get working under the latest Linux Kernels without some serious tinkering I'm being forced to look at alternatives.

I've been playing about with the Xen Hypervisor as it comes bundled with openSUSE (I'm on 11.4). It works in a slightly different way than VMWare, and I'm not convinced of it's reliability yet. But more on this later when I've settled on my final decision.

My main stumbling block in setting things up was getting networking to play-ball. The installation did a good job of getting it half-way there, but didn't quite set everything up and instead broke the networking on my host. After some digging and yet more IRC conversations I got it working and thought I'd note it here.

The problem I was having was the virtual network device on my guest machine was not getting an IP address from DHCP (which runs on the host).

Xen requires a "bridged" network device on the host to allow your guests to access the network as-if they were connected directly. The YaST Xen installation process will add a bridge for each of your physical devices. So if you have eth0, it'll create a br0. The Xen documentation covers all this in detail if you're not using something like YaST to do it for you.

It will also try and apply all the settings from eth0 to br0, but might not be entirely successful. So this is where you have to pick up the pieces. In the br0 configuration you have to "encapsulate" the physical device, eth0; which now for all intents and purposes becomes a duff redundant device. eth0 will need setting to no IP address or (whichever floats your boat). I don't know why bridging works like this in Linux, and I don't really care.

The main problem I had was that my gateway and all my services were setup on eth0, so this all failed. You will need to manually change your default gateway and rebind your services to br0. Essentially eth0 doesn't exist, it's been replaced with br0.

My lack of IP address stemmed from the fact that I had setup br0, but not rebound dhcpd to said device. Once this had been fixed and restarted everything sprung into life.

Breaking from the voyeuristic norms of the Internet, any comments can be made in private by contacting me.