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

    PfSense virtio networking under KVM

    Scheduled Pinned Locked Moved Virtualization
    28 Posts 16 Posters 36.9k 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.
    • C
      cyr123
      last edited by

      Hi.

      I took it upon myself to compile the FreeBSD virtio network driver to use on my pfSense that I have running on a KVM host.

      The files and quick instructions are posted on the web:

      http://wp.area26.se/2011/03/24/virtio-for-pfsense-2-0rc1/

      Quick instructions:

      Make a backup of your pfSense VM!
          Download the driver files from the URL above.
          Unzip and then copy the files (*.ko) to your pfSense, and put them under /boot/kernel
          Edit the file /boot/loader.conf and add the following lines:
          virtio_load="YES"
          virtio_pci_load="YES"
          if_vtnet_load="YES"
          Shut down pfSense, change the NIC type to “virtio” and restart.
          Re-assign your interfaces in pfSense.

      It seems to work OK for me, so it may work for you as well - YMMV.

      The driver BTW was not written by me, this is where I found it:

      http://lists.freebsd.org/pipermail/freebsd-current/2011-January/022036.html

      All appropriate credit goes to the original author…

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

        We have added this driver to 2.0.  Please test a new snapshot and it should be present sometime tomorrow.

        1 Reply Last reply Reply Quote 0
        • K
          kobuki
          last edited by

          I've installed the latest snapshot from iso. The drivers are not included in the installed system (in /boot/kernel). If I install/configure them from the mentioned source, they work fine, but an update launched on the web interface deletes the drivers from /boot/kernel. I need to copy them back after every update and reconfigure the interfaces. It's rather tedious since I need to switch back and forth between e1000 and virtio in KVM… Can you suggest a solution?

          1 Reply Last reply Reply Quote 0
          • K
            kobuki
            last edited by

            Hasn't anyone tried a similar setup? For example Debian's kFreeBSD installs the virtio network drives by default, also working nicely. The reinstalling of drivers can be semi-automated with init scripts but I don't really think that would be the solution.

            1 Reply Last reply Reply Quote 0
            • H
              homa
              last edited by

              The download link isn't available any more.

              can anybody upload the driver.

              thanks

              1 Reply Last reply Reply Quote 0
              • P
                preview
                last edited by

                Same here.

                I will love to get a hand on these drivers.

                1 Reply Last reply Reply Quote 0
                • K
                  kobuki
                  last edited by

                  i386: http://www.multiupload.com/4TL8NFJRLN
                  amd64: http://www.multiupload.com/UGFE0L4MKB

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

                    rapidshare isn't serious man!

                    1 Reply Last reply Reply Quote 0
                    • K
                      kobuki
                      last edited by

                      I guess you can use the other six services to download.

                      1 Reply Last reply Reply Quote 0
                      • V
                        v1ad
                        last edited by

                        Apparently this mod breaks traffic shaper, the interfaces are not available under traffic shaper. I wonder if there is an easy way to fix it…

                        http://forum.pfsense.org/index.php/topic,37518.0.html

                        1 Reply Last reply Reply Quote 0
                        • jimpJ
                          jimp Rebel Alliance Developer Netgate
                          last edited by

                          Try adding it to the list at line 3520 of /etc/inc/interfaces.inc

                          It may not really be altq capable, but you can try.

                          Remember: Upvote with the 👍 button for any user/post you find to be helpful, informative, or deserving of recognition!

                          Need help fast? Netgate Global Support!

                          Do not Chat/PM for help!

                          1 Reply Last reply Reply Quote 0
                          • T
                            tyllee
                            last edited by

                            Will the virtio driver be included in the final release of PfSense 2.0?

                            It's mentioned in this thread that it's included since 2.0 but I won't get it working only by installing it manually.

                            "We have added this driver to 2.0.  Please test a new snapshot and it should be present sometime tomorrow."

                            1 Reply Last reply Reply Quote 0
                            • V
                              valshare
                              last edited by

                              Hello,

                              i would bump this topic and ask, are there now virtio drivers in the latest pfSense 2.0 RCx?

                              Regards, Valle

                              1 Reply Last reply Reply Quote 0
                              • V
                                valshare
                                last edited by

                                @jimp

                                can you please make a statement and tell us if in the final pfsense 2.0 will be virtio drivers for kvm?

                                Thanx for answer.

                                Valshare

                                1 Reply Last reply Reply Quote 0
                                • V
                                  valshare
                                  last edited by

                                  after a view tests, i can say that the actual virtio driver didn´t work correkt. More than 3 network interfaces didn´t work correct (routing)

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

                                    thanks for that information. did you also test the virtio disk driver?

                                    1 Reply Last reply Reply Quote 0
                                    • V
                                      valshare
                                      last edited by

                                      hi,

                                      no i didn´t test die virtio disc driver because of the trouble with the virtio net drivers. I think its better to wait for the offical, when there ever will be released.

                                      I have tested successfull the network e1000 and iscsi disc drivers with pfsense.

                                      1 Reply Last reply Reply Quote 0
                                      • P
                                        paolo_denti
                                        last edited by

                                        any news about that ?
                                        are the virtio drivers included in the 2.0 final release ?

                                        1 Reply Last reply Reply Quote 0
                                        • T
                                          toomeek
                                          last edited by

                                          Hello!
                                          Running pfSense-2.0-RELEASE-i386
                                          Same problem here :)
                                          On E1000 with KVM I'm getting 250-300Mbit/s
                                          This isn't enough for internal routing (for example when using pfSense to route traffic between 192.168.x.x and 10.x.x.x).
                                          I'm just curious about that.

                                          Okay. Some tests.
                                          Q1: why I have to exit shell and go into shell again (press 8…) to see new command (iperf) available after adding in packages?
                                          Q2: reaching about 240-250Mbit/s DebianVM+virtio-net -> pfSenseVM+e1000 and pfSenseVM+e1000 -> DebianVM+virtio-net
                                          Q3: there is no problem to reach about 900Mbit/s from DebianVM+virtio-net to the client.
                                          Q4: timeouts on IDE drive attached in pfSenseVM. No such thing when using virtio-storage in DebianVM.
                                          Both VM placed on the same storage - software mdadm RAID1 with 2 drives.

                                          pfSense2_release_DMA_timeouts.png
                                          pfSense2_release_DMA_timeouts.png_thumb
                                          pfSense2_release_from_pfSenseVM_to_DebianVM.png
                                          pfSense2_release_from_pfSenseVM_to_DebianVM.png_thumb
                                          pfSense2_release_iperf_from_DebianVM_to_pfSense.png
                                          pfSense2_release_iperf_from_DebianVM_to_pfSense.png_thumb

                                          1 Reply Last reply Reply Quote 0
                                          • W
                                            WetWilly
                                            last edited by

                                            maybe this could help:

                                            http://people.freebsd.org/~kuriyama/virtio/

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