On an HVM domain, the guest OS will always automatically detect your virtual network device as a buggy and slow Realtek RTL8139. You can maximize your network performance with Netfront driver which is now built into latest Redhat / CentOS kernel. For older releases, you needed the kmod-xenpv package to do this, but it’s built in as of RHEL/CentOS 5.3 I believe. The method is highly undocumented from my research so hopefully this saves someone.
1. In /etc/modprobe.conf, change 8139cp to xen-kniv using this following command:
sed -i 's/8139cp/xen-vnif/g' /etc/modprobe.conf
2. Then blacklist the rtl8139 drivers
echo 'blacklist 8139cp' >> /etc/modprobe.d/blacklist echo 'blacklist 8139too' >> /etc/modprobe.d/blacklist
3. After a reboot, you can test that it worked by first making sure you’re online (duh!), then check lsmod and make sure you’re rid of Realtek junk at last:
lsmod | grep 8139
The output should return nothing (blank).
Now let’s activate the Xen SCSI driver to maximize disk performance by inserting the following in /etc/modprobe.conf:
alias scsi_hostadapter xen-vbd
Be sure to remove the existing scsi_hostadapter entry… if you use both, you’ll zap your disk.
Now reboot to activate.