Hi all:

I have been running a Windows 10 guest with libvirt/KVM/QEMU on Ubuntu 22.04 
and older for quite some time without major problems.

The virtual system was 'pc' (i440FX + PIIX), with QXL and VirtIO storage. 
Nothing fancy.

I did hit a high CPU usage issue which I could resolve by enabling 'hpet'.

However, I have recently upgraded the guest VM to Windows 11, in the face of 
Windows 10 going out of support, and now I am having problems.

I created a new virtual system based on q35, because 'pc' does not support UEFI with 
secure boot, so Windows 11 wouldn't boot on it. I was confident that it should work, 
because I could just select "Windows 11" on the Virtual Machine Manager.

In updated all VirtIO drivers and installed the latest guest tools. I allocated 
6 GiB RAM to the VM, which should suffice, as I did not install anything on the 
Windows guest. It just sits there idling around. I waited until all Windows 
updates were finished.

The first issue I hit was this error in Windows Device Manager: "Windows is still 
setting up the class configuration for this device. (Code 56)"

There are hints on the Internet that the German Windows version has problems 
with newer q35 versions, so that you should install the English version. This 
is very strange. I could not find any specifics about the problem. My QEMU 
supports pc-q35-6.2, and downgrading to pc-q35-5.1 did fix the issue. I wonder 
what other problems I would get, or what I am missing, when I downgrade the 
'pc' version like this.

It is also strange that a fully-patched Windows 11 would still have this issue. 
I wonder whether newer Windows or q35 versions would fix this problem.

Is there official QEMU documentation on this? I couldn't find any. I find it 
unlikely that such a problem in a localised Windows version would stay unfixed 
for a long time.

The next issue is very high CPU utilisation and a rather slow Windows 11 guest, even if 
Windows 11 is idle. Windows 10 on the same system was faster. Again, there are lots of 
unofficial advice on the Internet about this which involve varying changes to the 
<hyperv> and <clock> sections. I tried them all to no avail. Some people report 
success with some combinations, others still complain.

I also noticed that a task called "System Interrupts" in the Windows Task 
Manager uses 100% CPU for a while, but that goes after a while. Other people on the 
Internet have also seen this strange behaviour.

I couldn't find any detailed information about why some options would cause 
high CPU usage or general slowness on Windows guests. I couldn't find 
information either about what exact symptoms to look for, in order to tell 
which option was responsible for what kind of trouble.

The hardware is a Pentium Gold G5600. While this is not a great CPU, it does 
have all important virtualisation features.

This problem has actually made me give up on virtualising Windows 11.

On my Ubuntu 22.04.5 system, qemu-system-x86_64 is version 6.2.0, which is 
relatively old. Upgrading QEMU will probably not be easy, as KVM and libvirt 
are integrated. I could upgrade the whole Ubuntu, or switch to Debian Bookworm, 
which has a newer QEMU version. Or is there a way to get an up-to-date 
KVM/libvirt/QEMU combination in a Flatpak, a container, or a similar convenient 
and 'safe' package?

The question is also, if I upgrade, will I have similar problems with Windows 
11? Does anybody know from which version everything should work better? I do 
not need great speed of many features for the Windows 11 guest, just something 
stable which does not drag my Linux box when idle.

Is there a "known good", complete XML configuration file for a libvirt Windows 
11 guest VM? Maybe my Virtual Machine Manager GUI is generating a substandard one. I am 
hoping that I could just download such a gold XML file, change the path to the virtual 
disk file, and be done with it.

If necessary, I could drop libvirt and run raw QEMU, but then I would need all 
the different command-line options.

Thanks in advance,
  rdiez


Reply via email to