- SUSE Linux Enterprise Server 10 SP1
- openSUSE 10.3
Written and Compiled by:
The easiest way we found to test this setup is to split this up into two sections. First we will be setting up the host machine (Dom0). The second section will go over changing the Xen configuration in order to allow the guest machine (DomU) to use the same NIC bonding that we configured for Dom0.
Note: Since this document goes over setting up NIC bonding with Xen virtualization then it is assumed that you have already booted into Xen kernel. If not, please do so at this time. It is also important to note that no guest VMs should be running when you make the changes to the
network in Dom0.
Some updates came out after SLES 10 SP1 through the update channel so be sure that you are fully updated from the update channel. Otherwise ARP problems will occur during failover.
Dom0 (Host) Setup
- We start by making modifications to the host machines network setup. These modifications cannot be performed in Yast until the Xen network has been stopped. This is done by executing the following commands in a terminal:
- Once the Xen network has been stopped, go into Yast, Network Devices, Network Card and make sure it is set for traditional method.
- You should see your two interfaces that you are going to bond together. It is recommended that the two NIC cards are of the same type and version.
- Click Edit on the first interface and on the Address tab select None Address Setup.
- Now select the General tab and change the Device Activation to Never. Then click Next to finish the setup.
- Repeat steps 4 and 5 for the second interface and then save those setting by clicking Finish.
**NOTE** If you don't click finish, you interfaces will not show up under the bond interface configuration.
- Go back into Yast, Network Devices, Network Card and again leave the setting at traditional method.
- Add a new interface and change the Device Type to bond.
- You should then see both interfaces under the Bond Slaves section. If you don't see both interfaces then you need to go back and follow steps one through six again.
Configure your address setup (static or dhcp) and make sure that you select both interfaces under the Bond Slaves section. Select appropriate Bond Driver Option. In this example we will be using active-backup. Then add to the same line the following parameters: miimon=100 use_carrier=1
If these parameters are not set properly, the fail over will not occur on one of the devices. There are different parameters that you might need to use depending on the type of router you have, but these are the options that work in most cases.
Be sure to also configure the Host and Name Server and Routing sections appropriately.
- You should then see the configuration in the summary screen.
- Now you can test it out by opening a terminal and starting a ping. Then unplug each interface and make sure the ping continues.
Xen Setup for Guest Usage
The default script that comes with SLES 10 SP1 will not work with bonding. We will be downloading some new scripts for bonding. If you are using openSUSE 10.3 then you don't need to download the script since it is already included with the OS. However openSUSE 10.3 doesn't use this configuration file by default, therefore the rest of the document will need to be followed. It is important to note that these scripts are not officially supported by Novell at this time, although an attempt at getting them included in the official code is being made.
- Go to http://thepenguinpriest.com/linux/scripts/network-multinet.html and download the network-multinet and the xend files.
- Open a terminal and su to root.
- Copy the the network-multinet script to the /etc/xen/scripts directory.
cp network-multinet /etc/xen/scripts
- Make sure that the script has execute rights
chmod 755 /etc/xen/scripts/network-multinet
- Copy the xend script to the /etc/sysconfig directory
cp xend /etc/sysconfig/
- Edit the /etc/xen/xend-config.sxp
- Go into Edit, Preferences within gedit and enable the display line numbers and highlight current line options.
- Change line 128 from (networt-script network-bridge) to (network-script network-multinet) and save the file. You could also copy it so that you have the old setting as shown below. However be sure you comment out the old line.
- Make sure the firewall is turned off on DomO (host machine). This can be done by going into Yast, Security and Users, Firewall, and choose Stop Firewall Now and set the Service Start section to Manually start.
- Modify the /etc/sysconfig/xend file. Change the BRIDGE_NETDEV_LIST=?eth0? to BRIDGE_NETDEV_LIST=?bond0?
- Start the new network script:
- The Guest VMs (DomUs) will now communicate through the bonded interface in Dom0.
Disclaimer: As with everything else at Cool Solutions, this content is definitely not supported by Novell (so don't even think of calling Support if you try something and it blows up).
It was contributed by a community member and is published "as is." It seems to have worked for at least one person, and might work for you. But please be sure to test, test, test before you do anything drastic with it.