Netgate Discussion Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Search
    • Register
    • Login

    Citrix Xenserver 6.2SP1 and working virtio network drivers - increased speed

    Scheduled Pinned Locked Moved Virtualization
    6 Posts 6 Posters 11.0k Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • R
      radiogen
      last edited by

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

      1. 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.
      2. 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”

      1. shutdown pfsense
      2. 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 $newstring

      Then 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.
      Warning

      The "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

      1. 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 ???

      1 Reply Last reply Reply Quote 0
      • M
        MikeX
        last edited by

        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. :)

        1 Reply Last reply Reply Quote 0
        • L
          luismiparra
          last edited by

          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

          1 Reply Last reply Reply Quote 0
          • S
            semjek
            last edited by

            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?

            1 Reply Last reply Reply Quote 0
            • ?
              Guest
              last edited by

              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

              1 Reply Last reply Reply Quote 0
              • C
                cmb
                last edited by

                Locking this outdated thread, added note to not do this to original post.

                1 Reply Last reply Reply Quote 0
                • First post
                  Last post
                Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.