Difference between revisions of "Updating a kernel module for XenServer 7"

From PDP/Grid Wiki
Jump to navigationJump to search
(Created page with "We recently bought a new server cluster equipped with Intel X722 10Gbps SFP+ cards. These cards were not recognised by the XenServer 7.0 driver because it is too old. The tri...")
 
Line 1: Line 1:
We recently bought a new server cluster equipped with Intel X722 10Gbps SFP+ cards. These cards were not recognised by the XenServer 7.0 driver because it is too old.
+
We recently bought a new server cluster equipped with Intel X722 10Gbps SFP+ cards. These cards were not recognised by the XenServer 7.0 driver because it is too old; the [https://cateee.net/lkddb/web-lkddb/I40E.html Linux Kernel Driver Database] lists it as
 +
vendor: 8086 ("Intel Corporation"), device: 37d3 ("Ethernet Connection X722 for 10GbE SFP+")
 +
since kernel 4.7.
  
The trivial solution is to upgrade to a later version of XenServer 7, but unfortunately Citrix [https://xenserver.org/blog/entry/xenserver-7-3-changes-to-the-free-edition.html changed it's licensing] so that was not an option.
+
The trivial solution is to upgrade to a later version of XenServer 7, but unfortunately Citrix [https://xenserver.org/blog/entry/xenserver-7-3-changes-to-the-free-edition.html changed it's licensing] which removed some essential features from the free edition, so that was not an option.
 +
 
 +
The old XenServer 7.0 [https://www.citrix.com/support/product-lifecycle/product-matrix.html will receive updates until May 2019], but without the fast network interfaces we were stuck. As we wanted to migrate away from older hardware with live migration, choosing another platform was not a favourable option (although we do plan to migrate away from XenServer in 2018).
 +
 
 +
We were ready to install older network cards in the servers, but there was one other option: build an up-to-date driver for the old kernel.
 +
 
 +
Helpfully, Citrix offers a [https://www.citrix.com/downloads/xenserver/product-software/xenserver-70-standard-edition.html DDK ISO] and  [https://docs.citrix.com/content/dam/docs/en-us/xenserver/xenserver-7-0/downloads/xenserver-7-0-supplemental-packs-guide.pdf documentation] to do just these kind of things.
 +
 
 +
I obtained the latest i40e driver from [https://sourceforge.net/projects/e1000/files/i40e%20stable/ SourceForge] (then 2.4.3 dated 2017-12-07) and uploaded the tarball to a fresh machine imported from the DDK iso. Then building the RPMs was simply a matter of
 +
rpmbuild -ta <tarball>
 +
since there is already a spec file inside the tarball.
 +
 
 +
The resulting RPM contains the module as an update:
 +
/lib/modules/3.10.0+10/updates/drivers/net/ethernet/intel/i40e/i40e.ko.new
 +
which, on installation, will override the original driver.
 +
 
 +
Installing the driver was simply a case of running <code>rpm -i</code>, but <code>modprobe i40e</code> had the effect that the names of the interfaces were weird, like "side-12345-eth2" with different hex numbers for each port. Rebooting the servers resolved this and they now receive the simple names eth2 through eth5 (the 1Gbps card has ports eth0 and eth1).
 +
 
 +
To save others the trouble of going through the same chores, here is a link to the drivers:

Revision as of 11:10, 21 December 2017

We recently bought a new server cluster equipped with Intel X722 10Gbps SFP+ cards. These cards were not recognised by the XenServer 7.0 driver because it is too old; the Linux Kernel Driver Database lists it as

vendor: 8086 ("Intel Corporation"), device: 37d3 ("Ethernet Connection X722 for 10GbE SFP+")

since kernel 4.7.

The trivial solution is to upgrade to a later version of XenServer 7, but unfortunately Citrix changed it's licensing which removed some essential features from the free edition, so that was not an option.

The old XenServer 7.0 will receive updates until May 2019, but without the fast network interfaces we were stuck. As we wanted to migrate away from older hardware with live migration, choosing another platform was not a favourable option (although we do plan to migrate away from XenServer in 2018).

We were ready to install older network cards in the servers, but there was one other option: build an up-to-date driver for the old kernel.

Helpfully, Citrix offers a DDK ISO and documentation to do just these kind of things.

I obtained the latest i40e driver from SourceForge (then 2.4.3 dated 2017-12-07) and uploaded the tarball to a fresh machine imported from the DDK iso. Then building the RPMs was simply a matter of

rpmbuild -ta <tarball>

since there is already a spec file inside the tarball.

The resulting RPM contains the module as an update:

/lib/modules/3.10.0+10/updates/drivers/net/ethernet/intel/i40e/i40e.ko.new

which, on installation, will override the original driver.

Installing the driver was simply a case of running rpm -i, but modprobe i40e had the effect that the names of the interfaces were weird, like "side-12345-eth2" with different hex numbers for each port. Rebooting the servers resolved this and they now receive the simple names eth2 through eth5 (the 1Gbps card has ports eth0 and eth1).

To save others the trouble of going through the same chores, here is a link to the drivers: