qemu/kvm win10 client cannot upgrade to win11

Bug #1971509 reported by peterzay
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
qemu (Ubuntu)
Invalid
Undecided
Unassigned

Bug Description

Windows health check claims the following shortcomings:

- PC does not support secure boot
- PC does not support TPM 2.0
- CPU has 1 core

The PC is a brand new Dell Optiplex 7090.

8 of 16 CPU cores are allocated to the win10 VM.

ProblemType: Bug
DistroRelease: Ubuntu 22.04
Package: qemu-system-x86 1:6.2+dfsg-2ubuntu6
ProcVersionSignature: Ubuntu 5.15.0-27.28-generic 5.15.30
Uname: Linux 5.15.0-27-generic x86_64
ApportVersion: 2.20.11-0ubuntu82
Architecture: amd64
CasperMD5CheckResult: pass
CurrentDesktop: ubuntu:GNOME
Date: Tue May 3 18:55:23 2022
InstallationDate: Installed on 2022-04-22 (11 days ago)
InstallationMedia: Ubuntu 22.04 LTS "Jammy Jellyfish" - Release amd64 (20220419)
KvmCmdLine: COMMAND STAT EUID RUID PID PPID %CPU COMMAND
Lsusb:
 Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
 Bus 001 Device 002: ID 046d:c077 Logitech, Inc. M105 Optical Mouse
 Bus 001 Device 003: ID 413c:2111 Dell Computer Corp. Dell USB Wired Entry Keyboard
 Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Lsusb-t:
 /: Bus 02.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/8p, 20000M/x2
 /: Bus 01.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/16p, 480M
     |__ Port 9: Dev 2, If 0, Class=Human Interface Device, Driver=usbhid, 1.5M
     |__ Port 10: Dev 3, If 0, Class=Human Interface Device, Driver=usbhid, 1.5M
     |__ Port 10: Dev 3, If 1, Class=Human Interface Device, Driver=usbhid, 1.5M
MachineType: Dell Inc. OptiPlex 7090
ProcEnviron:
 TERM=xterm-256color
 PATH=(custom, no user)
 XDG_RUNTIME_DIR=<set>
 LANG=en_US.UTF-8
 SHELL=/bin/bash
ProcKernelCmdLine: BOOT_IMAGE=/vmlinuz-5.15.0-27-generic root=/dev/mapper/vgubuntu-root ro quiet splash vt.handoff=7
SourcePackage: qemu
UpgradeStatus: No upgrade log present (probably fresh install)
dmi.bios.date: 03/04/2022
dmi.bios.release: 1.5
dmi.bios.vendor: Dell Inc.
dmi.bios.version: 1.5.1
dmi.board.name: 073Y7Y
dmi.board.vendor: Dell Inc.
dmi.board.version: A00
dmi.chassis.type: 3
dmi.chassis.vendor: Dell Inc.
dmi.modalias: dmi:bvnDellInc.:bvr1.5.1:bd03/04/2022:br1.5:svnDellInc.:pnOptiPlex7090:pvr:rvnDellInc.:rn073Y7Y:rvrA00:cvnDellInc.:ct3:cvr:sku0A52:
dmi.product.family: OptiPlex
dmi.product.name: OptiPlex 7090
dmi.product.sku: 0A52
dmi.sys.vendor: Dell Inc.

Revision history for this message
peterzay (peterzay) wrote :
Revision history for this message
peterzay (peterzay) wrote :

Here is windows health check screen 2.

Revision history for this message
Athos Ribeiro (athos-ribeiro) wrote :

Hi,

Thanks for reporting this bug.

How are you setting up the windows VM? Would you mind providing its configuration and/or a short reproducer so we can verify the issue?

Since there is not enough information in your report to begin triage or to
differentiate between a local configuration problem and a bug in Ubuntu, I
am marking this bug as "Incomplete". We would be grateful if you would:
provide a more complete description of the problem, explain why you
believe this is a bug in Ubuntu rather than a problem specific to your
system, and then change the bug status back to "New".

For local configuration issues, you can find assistance here:
http://www.ubuntu.com/support/community

Changed in qemu (Ubuntu):
status: New → Incomplete
Revision history for this message
peterzay (peterzay) wrote :

Setup is done by clicking on "Create a new virtual machine" in Virtual Machine Manager and filling in the requested info.

You will find attached 7 screenshots of configuration details.

Revision history for this message
peterzay (peterzay) wrote :
Revision history for this message
peterzay (peterzay) wrote :
Revision history for this message
peterzay (peterzay) wrote :
Revision history for this message
peterzay (peterzay) wrote :
Revision history for this message
peterzay (peterzay) wrote :
Revision history for this message
peterzay (peterzay) wrote :
Revision history for this message
peterzay (peterzay) wrote :

As best as I can recall, you only need to input CPU (8), RAM (8192 MiB), and disk (50 GiB).

The windows ISO file is read as is.

Changed in qemu (Ubuntu):
status: Incomplete → New
Revision history for this message
Lena Voytek (lvoytek) wrote :

Hello,

Since Windows 11 requires TPM 2.0 to run, you will need a TPM emulator. To do this, make sure you have swtpm installed. In the terminal run:

sudo apt install swtpm swtpm-tools

With those installed, enter your virtual machine settings, click Add Hardware, select TPM, then choose:

Type: emulated
Model: TIS
Version: 2.0

Revision history for this message
Lena Voytek (lvoytek) wrote :
Revision history for this message
Lena Voytek (lvoytek) wrote :

You will also need secure boot. To do this you will have to edit the xml for your vm.

Start by going to Edit > Preferences > General in the main virt-manager window. Select Enable XML editing.

Now in your vm settings window, select Overview then the XML tab. in the <os> section add the following two lines:

<loader readonly="yes" secure="yes" type="pflash">/usr/share/OVMF/OVMF_CODE_4M.secboot.fd</loader>
<nvram>/var/lib/libvirt/qemu/nvram/win10-2_VARS.fd</nvram>

and in the <features> section add the following line:

<smm state="on"/>

Click Apply then secure boot should be good to go

Revision history for this message
Lena Voytek (lvoytek) wrote :
Changed in qemu (Ubuntu):
status: New → Incomplete
Revision history for this message
peterzay (peterzay) wrote :

I get the following Windows boot error.

Note the extra line in the <os> section that cannot be deleted.

<boot dev="hd"/>

Revision history for this message
peterzay (peterzay) wrote :

Here is the xml screenshot.

Revision history for this message
peterzay (peterzay) wrote :

I implemented your 2 code additions separately.

First, TPM code was added to the xml. It worked fine.

Second, Secure Boot was added to the xml. It caused the windows boot error.

Hope this help.

Changed in qemu (Ubuntu):
status: Incomplete → New
Revision history for this message
peterzay (peterzay) wrote :

To clarify the previous comment:

First, TPM settings were added to the windows VM. They worked fine.

Second, Secure Boot code was added to the xml. It caused the windows boot error.

Revision history for this message
Lucas Kanashiro (lucaskanashiro) wrote :

@peterzay did you try to boot the system when you got to the screen you attached in comment #16? This is the UEFI interactive shell, it does not look like a boot error. You might try to change to the UEFI directory, maybe /EFI/BOOT, and execute the *.efi file in there. This might be a matter of boot order.

Revision history for this message
peterzay (peterzay) wrote :

The "boot error" is reproducible.

1. start Virtual Machine Manager
2. click on Open
3. this opens a window called win10 on QEMU/KVM
4. in this window (3.), click on Power on the virtual machine (black triangle pointing right)
5. you get the "boot error" in window (3.)

As for executing *.efi, which one would you suggest from the attached screenshot?

Revision history for this message
Paride Legovini (paride) wrote :

Hi peterzay,

It seems likely to me that this is a local configuration problem, rather than a bug in Ubuntu. If indeed this is a local configuration problem, you can find pointers to get help for this sort of problem here: https://ubuntu.com/support/community-support

I'm marking this report as Incomplete for now. If you believe that this is really a bug, we'd be grateful if you would then provide a more complete description of the problem, explain why you believe this is a bug in Ubuntu rather than a problem specific to your system, and then change the bug status back to New. Thanks!

Changed in qemu (Ubuntu):
status: New → Incomplete
Revision history for this message
peterzay (peterzay) wrote :

>provide a more complete description of the problem

What is missing from the description of the problem?

You have the precise steps required to reproduce this problem. It occurs on every attempt.

Whether "bug" or "configuration", the product does not work.

Please provide a fix.

Changed in qemu (Ubuntu):
status: Incomplete → New
Revision history for this message
Lena Voytek (lvoytek) wrote :

Hello peterzay,

The secure boot failure may indicate you don't have it installed on your system. Try running:

sudo apt install ovmf

If it is not already installed try running your vm again.
Also it may help to enable SATA CDROM 1 in your boot options. Not having it has caused some issues for me in the past. See the screenshot for how to enable this.

Otherwise, if both fail, you may want to create a new vm and install Windows 11 from there with TPM2.0, secure boot, and SATA CDROM enabled from the start.

Changed in qemu (Ubuntu):
status: New → Incomplete
Revision history for this message
peterzay (peterzay) wrote :

Hi Lena,

Package ovmf is already installed. It was probably installed by virt-manager.

You will find attached 2 screenshots of ovmf and OVMF folders in the system.

I added SATA CDROM 1 to the boot options as suggested.

I still get the win10 boot error (see attached).

Please bear in mind that I do not have win11. I have win10 that cannot upgrade to win11.

Are you suggesting I create a new VM, install win10 with TPM2.0, secure boot, and SATA CDROM enabled from the start to test for successful boot?

Revision history for this message
peterzay (peterzay) wrote :

OVMF system folder

Revision history for this message
peterzay (peterzay) wrote :

win10 boot error with SATA CDROM 1 boot option selected

Changed in qemu (Ubuntu):
status: Incomplete → New
Revision history for this message
peterzay (peterzay) wrote :

Package ovmf is version 2022.02-3

Revision history for this message
peterzay (peterzay) wrote :

I created a new VM; installed win10 with TPM2.0, secure boot, and SATA CDROM enabled from the start.

I got the same boot error.

Any suggestions?

P.S. The ISO file was downloaded from Microsoft and verified for SHA sum.

Revision history for this message
Lena Voytek (lvoytek) wrote :

Does your boot screen show the "Press any key" screen before showing the error? If so press a key quickly during that time and it should boot into windows

Revision history for this message
peterzay (peterzay) wrote :

Pressing any key quickly enough starts the boot process successfully.

In win10, PC Health Check now qualifies the OS as ok to upgrade to win11.

Please close this case.

Changed in qemu (Ubuntu):
status: New → Fix Released
Revision history for this message
Lena Voytek (lvoytek) wrote :

Glad that worked, thanks! Marking as invalid since no new code was released.

Changed in qemu (Ubuntu):
status: Fix Released → Invalid
To post a comment you must log in.