XenServer 5.6 FP1 – Config NIC settings & Multipathing

During the installation of your XenServer, you only configure basic settings for your management Network Interface Card (NIC). Further, and maybe even more complex, configuration of your NICs can be set with the XenCenter GUI or with the xe CommandLine Interface (CLI). The xe CLI can be run locally at the command prompt of the XenServer Console within XenCenter or you can use the ex.exe, which is part of the XenCenter installation and allows and administrator to remotely manage a XenServer from the command prompt of the Windows desktop. With the CLI you can also easily script some of the common tasks to perform on a XenServer.

This post contains additional xe CLI examples that are used for NIC settings on your XenServer.

Basic settings for remote connections with xe.exe:

Each xe.exe command starts with the connection settings for the XenServer (Pool Master), followed by the specific command(s) to be performed.

xe-commands: the commands to be performed after the connection to the XenServer (Pool Master) is made.

To uniquely identify all objects in a XenServer configuration, each object is given an uuid, a unique identifier to use in all commands, so let’s look at the xe commands, to retrieve the uuid’s for different objects.

Retrieving the required object identifiers

The following commands show you how to retrieve the required unique identifiers for the different XenServer objects that are used for the configurational changes.

Gives a list of all physical NICs in the specified XenServer and their uuid.

If the XenServer is part of a Pool and the XenServer is NOT specified, all physical interfaces from all XenServers within the Pool are shown. Specify the XenServer to ensure you are retrieving the right uuid for the physical interface (pif).

Changing speed and duplex-mode of an interface

The following commands are used to change the speed and duplex settings for a NIC.

In order to set the speed and duplex-mode of the NIC, you need to turn off auto negotiation, so this setting is added to the command as well.

* Apply the new settings for the specified NIC:

xe pif-unplug uuid=[uuid-pif]
xe pif-plug uuid=[uuid-pif]

Which uses the following additional syntax:

uuid-pif: unique identifier of the physical NIC in a XenServer.

You need to unplug and plug the interface in order to activate the new settings. If for some reason you cannot perform these actions, the new settings will not be activated untill the XenServer is rebooted. Modifying speed and duplux-mode can also be performed with ethtool, which changes the settings on the fly. The changes made with ethtool are however not persistent and will be discarded after a reboot.

Creating a NIC bond

The following commands are used to team (or bond) two NICs into a single interface for network redundancy purposes.

* Create a new pool-wide (virtual) network for use with the bonded NICs:

xe network-create name-label=[network-name]

Which uses the following additional syntax:

network-name: name for the (virtual) network that is newly created.

This command returns the uuid of the newly created network. Make sure that you write it down for further reference.

Enable storage multipathing

Some storage solutions support the use of multipathing. Multipath I/O is a fault-tolerance and performance enhancement technique whereby there is more than one physical path between the XenServer and the Storage device. Dynamic multipathing support is available for Fibre Channel and iSCSI storage backends. By default, it uses roundrobin mode load balancing, so both routes have active traffic on them during normal operation.

Before attempting to enable multipathing, verify that multiple targets are available on your storage server. For example, an iSCSI storage backend queried for sendtargets on a given portal should return multiple targets.

To disable multipathing, first unplug your VBDs, set the host other-config:multipathing parameter to false and then replug your PBDs as described above. Do not modify the otherconfig:multipathhandle parameter as this will be done automatically.

After finishing my Master of Science in Computer Science, I started working in the IT consultancy business in 1997. I’ve learned different diciplines, like web development, database administration, server administration and specialized in Server Based Computing solutions in 2007. Nowadays I’m designing new IT infrastructures as a Citrix Architect, specializing in Virtualization solutions.