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

    How to use non-legacy virtio networking with libvirt?

    Scheduled Pinned Locked Moved Virtualization
    5 Posts 2 Posters 170 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.
    • nazar-pcN
      nazar-pc
      last edited by

      I just noticed all network interfaces are recognized by pfSense 2.8.0 as "VirtIO PCI (legacy) Network adapter".

      I then wondered why are they legacy and tried to make them non-legacy by adding -global virtio-blk-pci.disable-legacy=on -global virtio-blk-pci.disable-modern=false to QEMU CLI, but it didn't seem to make any difference.

      Am I missing something else?

      Performance of virtio network interface is quite bad right now, can't even saturate 2Gbps on 3.3 GHz CPU due to it being seemingly single-threaded (https://redmine.pfsense.org/issues/14802 / https://forum.netgate.com/post/807755).

      nazar-pcN 1 Reply Last reply Reply Quote 0
      • nazar-pcN
        nazar-pc @nazar-pc
        last edited by

        Experimented some with this. Looks like system need to boot with UEFI. With UEFI network interface is detected as "VirtIO PCI (modern) Network adapter".

        nazar-pcN 1 Reply Last reply Reply Quote 0
        • nazar-pcN
          nazar-pc @nazar-pc
          last edited by

          Small update: I had to re-create PCIe devices, including disk and network. Not sure why, but they remained "legacy" no matter what, so I copied and tweaked config from another VM that was recognized as "modern". Only bus and slot were different, yet it somehow made a big difference.

          So make sure VM is running as UEFI and re-create devices if necessary, then they'll be recognized as "modern".

          W 1 Reply Last reply Reply Quote 1
          • W
            wickeren @nazar-pc
            last edited by

            @nazar-pc

            Did you see a big performance improvement because of this? In the past I have seen bad performance and/or high CPU-usage, mainly IRQ.
            Is UEFI boot enough or did you still need the directives for the QEMU CLI mentioned in your first post?

            nazar-pcN 1 Reply Last reply Reply Quote 0
            • nazar-pcN
              nazar-pc @wickeren
              last edited by

              @wickeren Honestly, at least peak performance of the interface appears to be about the same.
              I was not using any explicit CLI options, including those above, just reconfigured all PCIe devices in libvirt's XML definition of the domain.
              It is still atrociously slow comparing to Linux performance, there I have no problem getting well over 10 Gbps on virtio network interfaces.

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