How to change cpu mode on KVM managed instance. Feature request?

Hi

It looks like MaaS provisioned instances on top of Virsh enabled machines are configured by default with libvirt cpu mode qemu64. This mode lacks cpu extensions like avx, avx2 which are required to run modern apps, like MongoDB 5+.
As a workaround, I managed to edit the libvirt domain, setting cpu to host-passthrough then restart the VM.
Is there a setting in MaaS than would configure the libvirt cpu to host-passthrough, or a setting to add cpu features like avx, avx2?

Cheers

Hi @jeanfabrice

Unfortunately there is no such setting that would allow you configuring Virsh host this way.

Configuration comes from predefined XMLs available at src/provisioningserver/drivers/pod/virsh.py

But you can adopt that configuration to your needs and then build your own MAAS
HACKING.rst might help you to start hacking.