XML with qemu.conf

Hello,

I know that we can override qemu configuration using raw.qemu.conf, but I don’t know how to override them using XML.

i would like to override my conf using this snippet to test something but I don’t know how to convert it:

  <clock offset='utc'>
    <timer name='hpet' present='yes'/>
    <timer name='hypervclock' present='yes'/>
  </clock>

If somebody has a tip, thank you

QEMU doesn’t understand XML. I’m guessing your XML is in libvirt’s Domain XML. Porting it isn’t trivial, but you may want to have a look at the hpet bool of the machine definition, the hv-time of the cpu definition and other so-called Hyper-V enlightenments. This is outside of my expertise, but that’s the rough mapping I found.

Although I’m wondering why you want that, as we already have clock logic dedicated to Windows guests in our QEMU driver logic.

Yes, I’m talking about libvirt.

I want to do that because I have high CPU usage on my host despite the usage in VM is low (30% on host with 5% in the VM).

Some say that it would help (home assistant forum).

The VM are Linux guests

Incus doesn’t use libvirt, so you’ll need to convert your libvirt XML to either QEMU’s .conf format or to QMP commands.

Yes I noticed that thank for the hint.

Do you have an idea why the qemu process cpu consumption on host is way higher than the one reported in the vm ?