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 yours.

The latest version of Citrix XenServer Express Edition misses support for Realtek RTL8111/8168B-based Gigabit network adapters, which are quite common. When trying to install XenServer on a system equipped with this card, the installation will stop reporting the error “No Network interfaces found on this host.”

Even though the issue was reported several months ago, no updates have been released for XenServer since the 17th of August 2007, date of the 4.0.1 release. The official procedure for installing additional drivers—also suggested 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.

Cheers!

15 Comments

  1. hello,
    if there is somebody who have also the problem that the nic of more nic’s disappeared after installation of XenServer 5.5 or 5.6, I’ll tried the above solution and it also works fine.
    I did this for working:
    mount /dev/sdb1 storage (for non linux people also me, sd_ the third letter is the new storage, watch in the installation storage what the highest letter is and take then the letter after the highest, for example if you have sdf for a drive then you must mount the usb as sdg1)
    What I also did I downloaded al the drivers that I saw on this site and after also the update on the given link above and copied all the files to the location sow other drivers also can be found.
    If you see ./lib/modules/2 .xxxxxx/ the xxxx are the numbers you see after you pressing TAB after typing 2. Sow you have the correct numbers.
    The directory extra doesn’t exist sow you must also create it!
    for copy I did the other way because I got errors
    sow:
    #> ls storage
    #> cp *.* ./lib/modules/2 .xxxxxx/
    after I made a directory extra because it doesn’t exist
    sow:
    #> cd /lib/modules/2.xxxxx/
    #> mkdir extra
    Going back to the storage and copy the drivers to extra
    #> cd /storage
    #> cp *.* /lib/modules/2.xxxxx/extra

    After I go back and started the installation and booted the pc and I saw my nic’s back (both of them). If something doesn’t work after 48h I’l do the other steps also and post a comment of it.

    ps: I also copied the files to /lib and in the 2.xxx directory, I don’t know if it is necessary but I’m a Microsoft user and have basic knowledge of Linux.

    But thanks for the solutions above and the linked website where I also downloaded the files for using in 5.5 ! don’t forget to go looking there also!.

  2. For XS5.0, an r8168.ko file for Realtek RTL8111/8168B based Gigabit Network adapters, can be found here:
    http://forums.citrix.com/message.jspa?messageID=1346495

  3. Thank for all, nice job.

  4. Thanks! Made my day

  5. David Thomas

    9 June 2008 at 14:09

    Hi Alessandro

    My Realtek 3189 NIC turned out to be Dead. I replaced with a D-Link DGE-530T NIC and Xenserver installed as ok.

    Thanks

  6. David Thomas

    4 June 2008 at 12:24

    Hi,

    Im trying to install Xen 4.1 onto a shuttle PC. I have installed a generic PCI LAN card with the realtek 3189 chipset, but install if failing saying no NIC card installed. will the process detailed here likely work for this card ?

    thanks
    David Thomas
    http://www.thinworld.net
    http://www.snaggings.co.uk

    • Alessandro

      4 June 2008 at 12:51

      I did not test this procedure on XenServer 4.1, and I will probably not do it since I am working on something else right now. I am actually surprised that XenServer 4.1 still lacks support for this NIC.
      Anyway, the prodedure should not change that much, but a different kernel module compiled for the kernel shipped with XerServer 4.1 is needed. You should ask about it in the XenServer support forum.

      Let me know if you have any luck. 😉

  7. Do you have the instructions for making this driver? Or do you have one for XenServer 4.1.0?

  8. Same issue and halt as Warren,when i did modprobe r8168 i get FATAL Error inserting r6168 (…location) Unknown symbol in module, or unknown parameter (see dmesg) Any answer or thoughts?

    • Alessandro

      17 April 2008 at 11:55

      Honestly I do not know what the problem can be. In general unknown symbols errors are reported when a module has been compiled on a different kernel version.
      Are you using XenServer 4.0.1?
      This is the only version I tried and I did not experience those problems.

  9. the command is mount -t vfat for USB devices
    like
    mount -t vfat /dev/sda1 storage

    this work fine with my system, but the installer doesn’t work

  10. dirk, did you (or anyone) come up with solution when it states ‘you must specify filesystem type’? I am stuck.

    • i got around that, but when i did modprobe r8168 i get FATAL Error inserting r6168 (…location) Unknown symbol in module, or unknown parameter (see dmesg) so 2 steps forward one step back.

  11. Thanks! Works great for 4.0.1
    However, it won’t work on the 4.1 beta (4.0.96)
    Any ideas?

  12. Hi,
    I’m trying to follow the script you wrote, however when I issue the
    mount /dev/sdb1 storage
    command, I get an error saying that I have to specify the filesystem.
    I suppose that when you talk about “removable storage” that you mean something like a USB stick?

    dirk.

Leave a Reply to Randall Cancel reply

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.