Tag Archives: xenserver

Switching from load-balancing to active-backup on XenServer

By default, the NIC bonding in XenServer is load balancing (SLB); apparently every 10-30 seconds it switches the NIC it’s using, and the default setting is an up-delay of 3.1 seconds** (see here).

To change to active-backup, you need to do the following (this requires a reboot by the way):

  1. Have your bonds set up in XenServer (use the XenCenter GUI)
  2. Find the UUID of the bond (something like: bd25429f-f7ff-3206-e5b2-4c027c51947c)
    1. Get the network UUID of your bond: xe network-list
    2. Get the pif UUID by matching the network-uuid parameter with the one you found in the step above: xe pif-list
  3. Run the following command: xe pif-param-set uuid=<bond_pif_uuid> other-config:bond-mode=active-backup
  4. Reboot the XenServer
  5. Check your bond settings: cat /proc/net/bonding/bond0; the Bonding Mode should say “fault-tolerance (active-backup)”

I’ve not yet figured out how to set a primary NIC for the bond (it’s not officially supported*), will report back when have done.

 

*UPDATED: found this “Can be configured with one fast path, and one slow path for cost savings; in this scenario, the slow path should only be used if there is a failure on the fast path” – but that’s the only documentation I can find about it, so it may or may not be officially supported…Ref: http://support.citrix.com/article/CTX124421

**UPDATED: in the admin manual, they say this about the up-delay:
“Bonding is set up with an Up Delay of 31000ms and a Down Delay of 200ms. The seemingly
long Up Delay is purposeful because of the time taken by some switches to actually start
routing traffic. Without it, when a link comes back after failing, the bond might rebalance
traffic onto it before the switch is ready to pass traffic. If you want to move both connections
to a different switch, move one, then wait 31 seconds for it to be used again before moving
the other.”

It also says that XenServer supports Active-Passive NIC bonding which is derived from active-backup (ie, they state that it’s not actually active-backup), and that a fast path and slow path can be configured.  However, the steps to configure active-passive state to use “other-config:bond-mode=active-backup” (so the steps above are correct, only they set the server to XenServer’s implementation of active-backup which they call active-passive).  The manual also doesn’t mention how to configure the fast and slow paths, and while it lists PIF commands, it doesn’t even mention the other-config:bond-mode command…

Setting up Ubuntu 10.04 using XenCenter 5.6 experimental Ubuntu template

After a while of getting errors while trying to install an Ubuntu ISO to a new Ubuntu template VM, I got it working using the following URL for the install from web:

http://mirror.yandex.ru/ubuntu/
UPDATE: this URL also works – http://www.mirrorservice.org/sites/archive.ubuntu.com/ubuntu/
(The path they’re looking for is /dists/lucid/main/installer-i386/current/images/netboot/xen/vmlinuz)

Not sure why, but all of the mirrors I found apart from this had the wrong folder structure, and XenCenter wanted to find the ISO itself a few folders deep, rather than let me give it the exact location of the ISO to install.

 

Installing XenServer Tools is also easy.  Put the tools into the virtual drive, mount it, navigate to it and into the Linux directory, pick your package (64 or 32 bit) and install:

mkdir /media/cdrom
mount /dev/cdrom /media/cdrom
cd /media/cdrom/Linux
dpkg -i xe-guest-utilities_5.6.100-651_i386.deb