2

I am not sure whether this question is more related to Linux or to Windows. However, here we go:

Using qemu-system-x86_64 7.2.15 on Debian bookworm with kernel 6.1.0 / amd64 on a server with two Xeon E5-2690v3, I have created my first VM running Windows 11. The installation media contained Windows 11 Pro 21H2.

This installation first failed due to a missing TPM 2.0 module in the VM's hardware. Thanks to this website and others, that problem wasn't too difficult to solve (install swtpm and its friends and extend the Qemu command line a bit). After following these steps, Windows 11 installed without issues. As mentioned above, this was version 21H2.

During the installation, Qemu had -cpu host. That is, Windows 11 installed itself using the Xeon E5-2690v3 CPU.

Then the VM began installing its updates. When trying to perform the Windows 11 feature upgrade to version 23H2, it told me that it failed due the CPU not being compatible with Windows 11. Yes, that's true: First, it installed on that CPU without any complaint, then updates failed because of the CPU not being compatible.

Since I needed an up-to-date version of that VM, I made several test with various CPU types in Qemu. They all failed except for one: If I set -cpu qemu64, the updates went through.

While I'm happy about that (of course), I am really wondering why it worked. I have studied the list of Intel CPUs that are compatible with Windows 11 multiple times, but I did not see an entry like qemu64 there. It's the same with the AMD CPU list.

Hence the question: Why does Windows 11 run with -cpu qemu64 even though this CPU is not in the supported CPU list?

2
  • you ask about something that changes when you upgrade Windows. Does really sound more like a question for someone with in-depth knowledge of Windows, to me :) Commented Mar 21 at 9:31
  • Yes, that's true: First, it installed on that CPU without any complaint, then updates failed because of the CPU not being compatible. - The Windows 11 updates indeed narrow the supported CPU list. Commented Aug 31 at 14:01

1 Answer 1

1

I can't tell you what happens on the windows side, but I can help you clear up the confusion on qemu's -cpu host and -cpu ${model} flags. Relevant literature: QEMU/KVM CPU model configuration.

  • -cpu host will pass through access to CPU identification registers, and as many features as can be safely virtualized to the guest machine.
  • -cpu ${model} will emulate a CPU-identifying register reflecting that CPU model, and will pass-through things available on the host CPU when that is possible to guest CPU, as long as that has said feature. This might entail a more "basic" emulation of hardware peripherals.

I suspect that Windows simply detects it's running in a VM, and then only allows baseline CPUs that specifically say they are a virtualized CPU, unless you buy a more expensive license (and that update just brought better virtualized CPU detection). Can't tell you, this is really a windows question.

The other option is that the host option on your CPU doesn't do the kind of TPM passthrough windows 11 wants, but the TPM emulation on qemu64 might. I also don't know – that's windows insights I'm lacking :)

4
  • Thanks for the answer, and +1. It's the second part of your answer that's particularly interesting for me. I knew what -cpu host does, but -cpu <model> is more complicated. I tried various models, but either Qemu complained about missing hardware CPU features, or W11 didn't run. Obviously, -cpu <model> can be used to "downgrade" the CPU the VM sees, but not to "upgrade" it. The only exception seems to be -cpu qemu64. You're probably right that W11 detects and allows CPUs that explicitly admit that they are virtualized. qemu64 has its disadvantages, though. Commented Mar 21 at 11:11
  • no that's wrong. "Upgrading" is principally a thing, but only for features that can be emulated. I don't know what that is on x86_64, though, and I know even less what windows needs/wants. Again, this is probably just windows detecting it's running on a strange "half-real" CPU and preferring to be on a baseline CPU. Commented Mar 21 at 11:16
  • Maybe wrong in theory, but honestly, although the CPU list of Qemu is quite long, I did not find any CPU in it that would 1) support Windows 11 and 2) the features of which could be emulated. So, for me, there was no way to "upgrade" the CPU as needed (in contrast, downgrading always works). The only exception was the qemu64 type, where adding required features / flags doesn't seem to be a thing. For example, the feature upgrade from W11 23H2 to 24H2 failed because of missing popcnt. Added ,popcnt=on to the -cpu stanza -> problem solved. Commented Mar 25 at 8:00
  • yes, that's exactly why I'm assuming Windows is the picky one here. Commented Mar 25 at 10:18

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.