Hi,
same problem with my installation of HAOS as a Qemu VM managed by libvirt. The last two devices I added were a Conbee II Zigbee USB stick and a Z-Wave USB stick along with ZWave integration, ZWave JS add-on, and Zigbee2Mqtt add-on. I added the USB sticks as usb-serial devices to the VM via
<serial type="dev">
<source path="/dev/serial/by-id/usb-...-if00"/>
<target type="usb-serial" port="2">
<model name="usb-serial"/>
</target>
<alias name="serial2"/>
<address type="usb" bus="0" port="5"/>
</serial>
HAOS is using constantly almost one CPU core on the host, but the guest is idling at a few percent.
I installed the VM with this command at first:
virt-install --import --connect qemu:///system --name haos --memory 2048 --vcpus=2 \
--disk haos_ova-10.5.qcow2,format=qcow2,bus=virtio \
--osinfo detect=on,require=off \
--network=bridge:br0,model=virtio \
--boot uefi
Other values for --os-info
did not work.
The above command configured a USB2 controller. To get a more ‘virtualization-friendly’ XHCI USB3 controller (USB emulation — QEMU documentation), I re-installed the VM with
virt-install --import --connect qemu:///system --name haos --memory 2048 --vcpus=2 \
--disk haos_ova-10.5.qcow2,format=qcow2,bus=virtio \
--controller usb3 \
--osinfo detect=on,require=off \
--network=bridge:br0,model=virtio \
--boot uefi
but that didn’t change the load issue on the host.
I researched for a while and found a comparable issue description here: KVM / qemu – high CPU load but low CPU usage – and thus goes by another day
I followed the same steps as described in the post, i.e. hooking up to the qemu-system-x86_64
process with strace -p <process ID>
. That results in many lines like
ppoll([{fd=3, events=POLLIN}, {fd=4, events=POLLIN}, {fd=6, events=POLLIN}, {fd=7, events=POLLIN}, {fd=8, events=POLLIN}, {fd=10, events=POLLIN}, {fd=12, events=POLLIN}, {fd=13, events=POLLIN}, {fd=14, events=0}, {fd=21, events=POLLIN}, {fd=23, events=POLLIN}, {fd=36, events=POLLIN}, {fd=37, events=POLLIN}, {fd=43, events=POLLIN}, {fd=44, events=POLLIN}, {fd=46, events=POLLIN}, {fd=47, events=POLLIN}, {fd=48, events=POLLIN}, {fd=49, events=POLLIN}, {fd=50, events=POLLIN}, {fd=51, events=POLLIN}, {fd=52, events=POLLIN}, {fd=53, events=POLLIN}, {fd=54, events=POLLIN}, {fd=55, events=POLLIN}, {fd=56, events=POLLIN}, {fd=57, events=POLLIN}, {fd=58, events=POLLIN}, {fd=59, events=POLLIN}, {fd=60, events=POLLIN}, {fd=61, events=POLLIN}, {fd=62, events=POLLIN}, ...], 77, {tv_sec=0, tv_nsec=487819}, NULL, 8) = 0 (Timeout)
I checked the file descriptors with
ls -la /proc/<process ID>/fd/
but I couldn’t find a real connection to the usb-serial devices.
The article linked above reports a solution to the problem with aio=native
, I tried
<disk type='file' device='disk'>
<driver name='qemu' type='qcow2' cache='none' io='native'/>
in the libvirt qemu XML configuration file for the VM, but: no difference in host load.