Citrix Xenserver 6.2SP1 and working virtio network drivers - increased speed
-
admin edit: Leaving for historical purposes, but this is outdated - DON'T FOLLOW THIS. 2.2.x releases have virtio built in.
I have managed to enable virtIO network drivers for Citrix XenServer 6.2SP1 on pfsense 2.1-RELEASE (i386).
- just install pfsense normally through “other” template and add 2 nics.
ones you boot it - assign LAN interface and open web gui of pfsense to make changes. - from this how to (https://doc.pfsense.org/index.php/VirtIO_Driver_Support) make changes in /boot/loader.conf I had to add to the end of file:
virtio_load="YES"
virtio_pci_load="YES"
if_vtnet_load=“YES”- shutdown pfsense
- Enabling virtIO emulation in Citrix (based on well known article http://www.netservers.co.uk/articles/open-source-howtos/citrix_e1000_gigabit)
You'll need to ssh into your Citrix server and become root. Then do the following:
First rename /usr/lib/xen/bin/qemu-dm to /usr/lib/xen/bin/qemu-dm.orig
mv /usr/lib/xen/bin/qemu-dm /usr/lib/xen/bin/qemu-dm.orig
Then make a replacement /usr/lib/xen/bin/qemu-dm file like this
#!/bin/bash
oldstring=$@
newstring=${oldstring//rtl8139/virtio}
exec /usr/lib/xen/bin/qemu-dm.orig $newstringThen chmod (to make it executable) and chattr it (to stop it being overwritten):
chmod 755 /usr/lib/xen/bin/qemu-dm
chattr +i /usr/lib/xen/bin/qemu-dm
If you now shutdown and re-start your Citrix virtual machines, they will have an emulated e1000 device.
WarningThe "chattr" line above makes the replacement file "immutable". This means that the file cannot be overwritten, prevents the loss of this modification in the event of a system update.
However, this may cause updates provided by Citrix to fail at the point of installation. An alternative approach would be leave the file unprotected, and re-applying this modification after Citrix-supplied updates have been applied.
The remove the protection from the file, do the following:
chattr -i /usr/lib/xen/bin/qemu-dm
- boot pfsense and assign VirtIO networking adapters and test new level of speed.
I’ve got increased network performance in 3 times compare to e1000 drivers !!!!
when pfsense make Citrix Xenserver support out of the box ???
- just install pfsense normally through “other” template and add 2 nics.
-
Even more odd for me… I've been replicating data to my new XenServer farm over the past two weeks.
I used a virtual pfsense instance in the old space to create an IPSec tunnel between there and the new network... Then started up replication.
I have never been able to exceed 40Mb/s with the broken virtualized pfsense image (XS6.0); however, I was able to hit 90-95Mb/s sustained and ended up cutting my estimated replication time in half.
I didn't really ask questions... and just took it as a gift. :)
-
Thanks you for the post,
Works perfect for me now I am in 80-90Mb/100Mb (connection) before I was in 40-50Mb
BEFORE AND AFTER CHANGE in a load test
-
Hi Guys,
this works for me as well, but I'm facing weird behavior of openvpn server hosted by pfsense 2.2. The client keeps disconnecting in different intervals of time with no errors or other obvious reasons. I tried both tcp and udp, with or w/o compression and some other stuff with 0 result.
Did anybody of face the issue?
-
Don't use this method, use normal pfSense 2.2 and normal Xen with normal VirtIO instead, and apply this: https://forum.pfsense.org/index.php?topic=88467.0
-
Locking this outdated thread, added note to not do this to original post.