How to install XenServer 4 on systems with Realtek RTL8111/8168B based network adapters

Disclaimer: These instructions are provided on as-is basis. The procedure has been tested on two different hardware configurations, but do not blame me if it does not work on your’s.

The latest version of Citrix XenServer Express Edition (formerly XenSource XenExpress) misses support for Realtek RTL8111/8168B based Gigabit Network adapters, which are actually quite common. Trying to install XenServer on system equipped with this card, the installation program will stop reporting that an error occurred: “No Network interfaces found on this host.”

Even though the problem has been signaled several months ago, no updates have been released for XenServer since the 17 of August 2007, date of the 4.0.1 release. The official procedure for installing additional drivers — suggested also by Citrix in the support forum — seems overcomplicated and at least with my systems it did not work. So I decided to write this article about how to install the last version of XenServer on systems equipped with Realtek based Gigabit network adapters.

Just follow these steps:

  1. Download the r8168.ko kernel module here;
  2. Copy the r8168.ko file to a removable storage;
  3. Boot the XenServer 4.0.1 Installation CD;
  4. Select the Keymap;
  5. Once in the “Welcome to XenServer” page press Alt+F2; (you should get a bash shell with root access)
  6. Issue the following commands:
    #> mkdir storage
    #> mount /dev/sdb1 storage (I assume that the removable storage is /dev/sdb1, change it accordingly to your configuration if this is not the case)
    #> cp ./storage/r8168.ko /lib/modules/2.6.18-8.1.8.el5.xs4.0.1.125.163xen/extra/
    #> depmod –a
    #> modprobe r8168
  7. Press Alt+F1;
  8. Complete the XenServer installation and reboot;
  9. Boot the system; (you can ignore the errors caused by missing network adapter)
  10. Login as root;
  11. Issue the following commands:
    #> mkdir /mnt/storage
    #> mount /dev/sdb1 /mnt/storage
    #> cp /mnt/storage/r8168.ko /lib/modules/2.6.18-8.1.8.el5.xs4.0.1.125.163xen/extra/
    #> cp /mnt/storage/r8168.ko /lib/modules/2.6.18-8.1.8.el5.xs4.0.1.125.163kdump/extra/
    #> depmod –a
    #> reboot

Now XenServer should finally boot with the network card up and running.

That’s all!