You get a bonus - 1 coin for daily activity. Now you have 1 coin

Xen 4.1 and multiple network cards

Practice



So, after happily clapping our hands following the installation of Xen 4.1.x (for example, 4.1.2) and rejoicing that "it built and works", we start feeling pretty good about ourselves. But then comes the turn to configure such a virtual machine server that uses two or more network cards - and "oops", we're stuck.

The thing is, the network-bridge script, familiar and standard for Xen versions 4.0.x and below, refuses to create more than one network bridge (by the way, this isn't a bug but an intentional condition - a check on the number of created network bridges was specifically built into the script).

On the Xen Wiki there's a post on this topic here:
http://wiki.xensource.com/xenwiki/HostConfiguration/Networking

After reading and digging into it, you can arrive at the conclusion: from now on, the Xen developers propose that the system administrator handle the creation and configuration of network bridges themselves, using regular Linux tools. In reality there's no disaster here at all - it's just that before we used a wrapper script, and now we'll configure the network ourselves.


So, in order for two or more network cards to work and be available to virtual machines, you need to use the operating system's own tools - specifically, the configuration of that OS's network cards - to create two or more network bridges, one for each network card. As I already said, before this was handled by the network-bridge script and the homegrown network-bridge-wrapper; now you need to declare and configure the network bridges yourself.


1) First, let's turn off network-bridge in the Xen config file.

Open the file /etc/xen/xend-config.sxp and find the line "(network-script network-bridge)" in it. Put a "#" comment mark before this line and check that it isn't declared anywhere else.


2) Second, let's create the bridge using Linux's own tools. You should be able to do this yourself (you just need to create regular bridges).

For Debian, for example, you can read about network configuration in our other articles.

By the way, the thread linked above contains various configurations for both Debian and CentOS/RedHat.


3) Reboot. Well, essentially, after that the guest systems can use them. For example, if your network bridges are called "br0" and "br1" - then these are exactly the names you need to specify in the Xen machines' configuration files (and not "eth0", "eth1" as was customary in Xen 4.0.x and earlier).

Comments

To leave a comment

If you have any suggestion, idea, thanks or comment, feel free to write. We really value feedback and are glad to hear your opinion.
To reply

Lectures and tutorial on "Computer networks"

Terms: Computer networks