FS#55496 - [edk2-ovmf] Windows 10 guests do not boot on OVMF
Attached to Project:
Arch Linux
Opened by Victor Bessonov (Unb0rn) - Monday, 04 September 2017, 07:57 GMT
Last edited by David Runge (dvzrv) - Friday, 12 June 2020, 12:46 GMT
Opened by Victor Bessonov (Unb0rn) - Monday, 04 September 2017, 07:57 GMT
Last edited by David Runge (dvzrv) - Friday, 12 June 2020, 12:46 GMT
|
Details
Description:
After updating to testing qemu-2.10.0-1 windows guests on OVMF are failing to boot on two separate machines. Problem reproduces even with Windows 10 ISO, as it gets detected, starts to boot(gives "press any button to load from CD" message) and hangs on TianoCore splash after that. Updating OVMF to ovmf-git from aur solves this issue, so it's either OVMF or qemu 2.10 bug. Additional info: * package version:2.10.0-1 Steps to reproduce: -Install qemu or qemu-headless 2.10.0-1 from testing repo -Install ovmf with pacman -Create VM with OVMF -Try to boot either installed Windows 10 or Windows 10 ISO |
This task depends upon
It says bumping OVMF to the latest version helps to fix the problem. Adding Thomas Bächler to bump OVMF package.
My Qemu Win7 UEFI config:
--------------------
QEMU_AUDIO_DRV=pa
QEMU_PA_SAMPLES=8192
QEMU_AUDIO_TIMER_PERIOD=99
QEMU_PA_SERVER=/run/user/1000/pulse/native
VMDIR=$(basename $(pwd))
DIF=12
PORT=59$DIF
NAME=$VMDIR
BUS=pcie.0
PASS=123
SPORT=56$DIF
VNCPORT=57$DIF
DISPLAY=:0
qemu-system-x86_64 \
-daemonize \
-uuid fafafafa-1234-bcbc-5678-11112222ff$DIF \
-name $NAME,process=QEMU-"$NAME" \
-parallel none \
-net none \
-nodefconfig \
-nodefaults \
-monitor telnet:127.0.0.1:370$DIF,server,nowait \
-serial telnet:127.0.0.1:371$DIF,server,nowait \
-rtc base=localtime \
-machine type=q35,accel=kvm \
-drive if=pflash,format=raw,unit=0,file=$(pwd)/ovmf_x64.bin \
-smp 2,sockets=1,cores=2,threads=1 \
-cpu Penryn,kvm=off,check,vendor=GenuineIntel,+vmx \
-m 4G \
-device qxl-vga,id=video0,ram_size=67108864,vram_size=67108864,bus=$BUS,addr=0x1b.0x0 \
-global qxl-vga.revision=4 \
-spice port=$PORT,disable-ticketing,seamless-migration=on,password=$PASS \
-device ich9-intel-hda,bus=$BUS,addr=0x11.0x0,id=sound0 \
-device hda-duplex,id=sound0-codec0,bus=sound0.0,cad=0 \
-device e1000-82545em,netdev=br0,mac=XX:XX:XX:XX:XX:$DIF,id=vnet0,bus=$BUS,addr=0x6.0x0,romfile= \
-netdev bridge,id=br0 \
-device ich9-usb-ehci1,id=ehci1,bus=$BUS,addr=0x12.0x7 \
-device ich9-usb-uhci1,id=uhci1,masterbus=ehci1.0,firstport=0,bus=$BUS,multifunction=on,addr=0x12.0x0 \
-device ich9-usb-uhci2,id=uhci2,masterbus=ehci1.0,firstport=2,bus=$BUS,addr=0x12.0x1 \
-device ich9-usb-uhci3,id=uhci3,masterbus=ehci1.0,firstport=4,bus=$BUS,addr=0x12.0x2 \
-device usb-tablet,id=tablet0,bus=ehci1.0 \
-device ide-drive,bus=ide.0,drive=drive-sata0-0-0,id=sata0-0-0 \
-drive file="$(pwd)"/$NAME.qcow2,if=none,media=disk,id=drive-sata0-0-0,format=qcow2 \
-device ide-drive,bus=ide.1,drive=drive-sata0-0-1,id=sata0-0-1 \
-drive file=/dev/sr0,if=none,media=cdrom,readonly=on,id=drive-sata0-0-1,format=raw
-----------
Build from AUR ovmf-git fail.
This work: https://www.kraxel.org/repos/jenkins/edk2/
2.10.0 - not work with Win7, macOS, Win10 (tested with a package from repo and also built qemu myself)
2.9.0 - works just fine
* I disabled the ia32 build, since the build is broken
* The images now have their upstream file names: /usr/share/ovmf/x64/OVMF_{CODE,VARS}.fd
I will move this to [extra] as soon as I can test it.
newer EDK2/TianoCore fixed the problem.
The testing/ovmf at least solves linux guest shutdown/reboot problem.
And for linux, with bad ovmf it will gives kernel output about ACPI like:
ACPI Error: Could not disable RealTimeClock events (20170303/evxfevnt-267)
Which is also gone with testing/ovmf.
So it's improving, no windows tested though.
extra/ovmf 1:r21243.3858b4a1ff-1
testing/ovmf 1:r22345.bec7a86c70-1
qemu 2.11.0-3
With the testing/ovmf package, a Windows 10 installation occupies a single guest/host core for 100%. After 2 HOURS it is still crawling with "Getting files ready for installation (66%)".
The same qemu-system-x86_64 command with the extra/ovmf package the setup was completed in mere 3 minutes...
If you use a passthrough GPU:
1)remove the GPU passthrough, add a soft VGA/Spice graphics adapater
2)boot win10, it should boot normally
3)remove soft VGA/Spice, add passthrough GPU
4)reboot win10, it should boot normally again
qemu-system-x86_64 -machine pc,accel=kvm -monitor stdio -drive if=pflash,format=raw,file=/usr/share/ovmf/x64/OVMF_CODE.fd,readonly -net user -net nic,model=e1000 -vga std -cpu Haswell -m 2G -smp 4 -drive file=win10-debug.qcow2,if=ide -rtc base=2016-01-01 -cdrom en_windows_10_n_multiple_editions_debug-checked_version_1511_x64_dvd_7223826.iso
Current master (commit 018432f0ce1b42541977f61f9c7607257a4bf43a) works for me. Tried to bisect, but many commits could not be tested as the display was unavailable (everything starting with commit d41fd8e839 works again). After a few hours, I found that commit bca18551f6 is the last broken commit, and that the next commit fixes it:
commit 76fd5a660d704538a1b14a58d03a4eef9682b01c
Author: Laszlo Ersek
Date: Thu Oct 26 15:48:31 2017 +0200
MdeModulePkg/AtaAtapiPassThru: disable only BM-DMA at ExitBootServices()
Clearing I/O port decoding in the PCI command register at
ExitBootServices() breaks IDE boot in Windows, on QEMU's "pc" (i440fx)
machine type. (AHCI boot on "q35" is unaffected.) Windows seems repeatedly
stuck, apparently waiting for a timeout of sorts.
Is it possible to either remove testing/ovmf, or update to the fixed or latest git version?
(This also turns out to be fixed in Ubuntu via https://bugs.launchpad.net/ubuntu/+source/edk2/+bug/1725560)
I just pushed up-to-date ovmf package to [testing]. Please check it.
/usr/share/licenses/ovmf/License.txt
/usr/share/ovmf/ovmf_code_ia32.bin
/usr/share/ovmf/ovmf_code_x64.bin
/usr/share/ovmf/ovmf_vars_ia32.bin
/usr/share/ovmf/ovmf_vars_x64.bin
*.bin file got renamed to more upstream-like *.fd filename (e.g. /usr/share/ovmf/x64/OVMF_CODE.fd).
i32 build is disabled here https://git.archlinux.org/svntogit/packages.git/commit/trunk/PKGBUILD?h=packages/ovmf&id=afc5fd47e84749f2db15cf3b1439e811b2c48233
Could you please describe your VM issue? Do you have 32bit VM?
@Unb0rn: Please check whether edk2-ovmf 202002-6 in [testing] fixes your issue.