虚拟化容器,大数据,DBA,中间件,监控。

Compiling the Realtek RTL8111 driver on XenServer

30 10月
作者:admin|分类:容器虚拟化

Compiling the Realtek RTL8111 driver on XenServer

I have been using Citrix XenServer for a short while now and it has become my virtual(is/iz)ation solution of choice.
Things were going great until I started to have problems after upgrading… It seems my onboard Realtek network interface (Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8111/8168B PCI Express Gigabit Ethernet controller (rev 02)) was not officially supported in XenServers HCL and became subjected to known driver problems.

RX packets:97840 errors:0 dropped:1203654335 overruns:0 frame:0

Although the network interface is still usable, as you can imagine – things are incredibly slow… especially if you rely on Remote Desktops/VNC/Terminal Services etc…
The solution was to use the Citrix XenServer Driver Development Kit (DDK) to compile the kernel module for the network interface card.

First we need to download the DDK VM, burn it to disk and then import it using XenCenter (this may seem an odd way of deploying a virtual machine – and although you could equally add the ISO to a CIFS or NFS ISO Storage Repository, It is always handy to have this ISO on a CD just in case).

Using XenCenter, you then need to import the DDK VM (Templates > Import Template… > Import type: Exported VM). When you browse the DDK CD, you need to select ‘XenServer Virtual Appliance Version 1 (ova.xml)’ and then you can set up a network interface, CPU(s) and memory for the Virtual Machine.

Once the DDK VM is up and running, you can use XenCenter to access its Console.

NOTE: Check the Realtek Drivers page for the latest version before proceeding.

wget ftp://WebUser:2mG8dBW@202.134.71.22/cn/nic/r8168-8.016.00.tar.bz2
tar vjxf r8168-8.016.00.tar.bz2
cd r8168-8.016.00
./autorun.sh

Using the autorun.sh script makes the compiling of the driver nice and easy but it does install the driver into the DDK VM root, so now we simply copy the driver for use in our XenServer installation.

NOTE: The following assumes that the kernel release is the same on both the XenServer and the DDK VM. Please replace ’192.168.1.1′ with your own XenServer IP address.

scp /lib/modules/$(uname -r)/kernel/drivers/net/r8168.ko 192.168.1.1:/lib/modules/$(uname -r)/kernel/drivers/net/

Next we can use XenCenter to access the XenServer Console and prepare the system to use the new driver.

cd /lib/modules/$(uname -r)/kernel/drivers/net/
mv r8169.ko r8169.ko.bak
insmod r8168.ko
depmod -a

Next we can edit /etc/modprobe.conf and change any reference of r8169 to r8168.

alias eth0 r8168

Everything is now ready to go, you need to reboot your XenServer for changes to take effect.


浏览2859 评论0
返回
目录
返回
首页
fsockopen函数被PHPDDOS利用攻击的解决办法 红旗Linux SP3 正确配置cmi8738声卡