Enabling Multi-Queue for VirtIO Net and SCSI in KVM VMs via MAAS 3.4

Hello MAAS Community!

I’m planning to use MAAS 3.4 to deploy Ubuntu 22.04 or Oracle Linux 9 on bare metal hosts, with the intention of using them as KVM hosts. I’m also considering the possibility of using LXD Containers, provided they are adequately supported in MAAS.

My primary interest lies in the current status of the VirtIO drivers in MAAS, specifically for Libvirt and LXD. More specifically, I’m curious about the support for VirtIO Net and SCSI multi-queue features. Is there a way to enable these features when composing VMs in MAAS?

Additionally, having the ability to customize the composition of Libvirt’s XML would be beneficial. I’m looking to enable more Libvirt features such as Shared Memory, CPU type, OpenvSwitch bridges, and potentially DPDK. I’m also interested in GPU passthrough or VirtIO GPU with 3D enabled (VirGL), which I currently manage to do manually outside of MAAS with IOMMU and NVIDIA cards. I know that MAAS is NUMA-aware and supports SR-IOV, which is fantastic!

Could anyone provide information on how to enable multi-queue for both VirtIO Net and SCSI for KVM Virtual Machines (LXD or Libvirt) composed via the MaaS UI? Any guidance or references to relevant documentation would be greatly appreciated. Alternatively, should I manually create the Libvirt VMs and then let MAAS Commission and Deploy them?



MAAS supports VirtIO drivers for virtualization, but i haven’t looked at those in a couple of years, so YMMV. we’re kinda not doing a lot of libvirt stuff these days.

as far as customizing libvirt XML, i’m thinking that to enable specific libvirt features like Shared Memory, CPU type, OpenvSwitch bridges, DPDK, GPU passthrough, and VirtIO GPU with 3D enabled (VirGL), it will probably require manual configuration outside of the MAAS UI. just a hunch.

Hello again,

Thank you for your response, @billwear. I now understand that Libvirt in MAAS is not the primary focus and that no new features will be added to it. Given this, I agree that it would be more beneficial to focus on LXD KVM instead.

Assuming that LXD KVM supports VirtIO, I’m wondering how to compose LXD VMs in MaaS with at least multi-queue for both VirtIO-Net and VirtIO-SCSI? Is there a specific process or set of steps to follow to enable these features?

As for the Libvirt VMs, I understand now that I can compose the VMs outside of MAAS by editing their XML definitions to add the features I need, and then commission them normally in MaaS. However, I’m not sure how to do something similar with LXD VMs. Is there a way to customize LXD VMs in a similar manner within MAAS, or is this something that would be better addressed in the LXD Discourse forum?


@tmartins, read through this LXD bug and see if it helps at all. you know more about your config than i do…

Hi @billwear! Thanks again for your reply.
That bug report seems unrelated to VirtIO Multi-Queue for Network and SCSI on LXD KVM.
I’ll ask on the LXD forum instead!

1 Like

@tmartins, this sounds like a good plan. keep us apprised if you can.