Xen Bridge Networking

Xen networking is well thought-out. It's highly flexible, and in the end, easy to configure and use. However, it took me a while to figure out the small little things you need to do to get it configured right.
After following the instructions for installing Xen on Ubuntu, I booted a domU, but its networking wasn't configured properly. It stopped working, after the first reboot of the VM, and it kept incrementing the eth interface number.

1. First, read this background info about Xen Networking, and confirm that Xen bridge networking is right for your application. (It probably is.)
2. Edit your domU's configuration (.cfg) file. It's probably located at /etc/xen/<domU-host-name>.cfg. Add/change the vif entry to look like:

# assign the domU's MAC address to locally-administered value=1, 2, 3, etc.
# this will avoid any MAC conflict issues
vif = [ 'mac=02:00:00:00:00:01' ]

3. Edit the /etc/udev/rules.d/70-persistent-net.rules file on the domU to use entries like
SUBSYSTEM=="net", DRIVERS=="?*", ATTRS{address}=="02:00:00:00:00:01", NAME="eth0"

4. The /etc/network/interfaces on the domU should already contain
# The primary network interface
auto eth0
iface eth0 inet dhcp

This should fix the problems related to: xen networking not working, xen networking stops working, increasing eth interface number, etc.

Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License