[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Xen Ovmf/UEFI HVM error after upgrade to Debian Bookworm (was: xen ovmf/uefi firmware does not save screen resolution)


  • To: xen-users@xxxxxxxxxxxxxxxxxxxx
  • From: Paul Leiber <paul@xxxxxxxxxxxxxxxx>
  • Date: Tue, 4 Jul 2023 23:06:01 +0200
  • Arc-authentication-results: i=1; strato.com; arc=none; dkim=none
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; t=1688504763; s=strato-dkim-0002; d=strato.com; h=Subject:From:To:Date:Message-ID:Cc:Date:From:Subject:Sender; bh=Nv8k2hJovtRtGQ6akvuFA/yGEvbjlKEHhGDBpnl6UhM=; b=fdDs+YEPlL+fNQSmT1vDy4FirhKF9RYcwI/xR7kUlvf/WrWKHP2ZyBqx4dN+xwN/6y j3UVRY0J0/RcBIkU5gyo01Z5k7Z2y7LHgaCOqJ6PT2rO0wesvpcglqEQ8+1qocMPYvIN 6c8F4pbNpFtkjTa4sDB3I2IAqsSizYDVOsKu7fzLu2f4RH+KZuWQMVSIeUajiBakYRHY FnKi1yAF4fwK57qNOnLtwun2zQzpDfBS+qqO3f8yQ4/0tDorCqdG0+uLmRmv3Dmn6bwc rvXLV+l6EO6EuK3Tkv3ACx2MzB5/hCTB2GO3khX+J0GLGwICg/zTzs4Gqd5xQH64ePfe m5sw==
  • Arc-seal: i=1; a=rsa-sha256; t=1688504763; cv=none; d=strato.com; s=strato-dkim-0002; b=NrP4ZiiosswIBYJskcqFAWPErS+l9diudyL/jn4v7mUdiAQKL6mZgVj+nGE3Fh5ovt sPT95juLajaUZNafWCBixN1id06GdilCh1F9KQUGpCihvcm5TucPOLjHJqbqXbtnYgMz RaEILjy3QOV6KQ+O27XCWfn2EZynHo5g4i8plMN/N98IxkP8S0Es3SjDMg3+1mA/ImeS Y0yh675wvQjpEXJBO8QBo72S/kDQW0jSk8mkktEXojROJd/k1J6Scyf39n79Kv/YSJWj FVHRgdCmxjH+cPd2Gltr6AvZgCjHY/zEC7J5oBCB7Jkoaz8PiZ4s9ZkM6BTo5f6Ozg7M AhPw==
  • Delivery-date: Tue, 04 Jul 2023 21:07:07 +0000
  • List-id: Xen user discussion <xen-users.lists.xenproject.org>

On 14/02/2023 8:31 AM, Chuck Zmudzinski wrote:
> I am adding this information to complete the discussion of this
> problem I reported several months ago:
>
> I discovered the cause of the problems of ovmf/uefi booting with more > recent Xen
> versions - it is not a bug in Xen, but the problem occurs because
> newer versions
> of ovmf do not have Xen support in the OvmfPkgX64 target from edk2 and > the
> Xen support is only available from the Xen-specific OvmfXen target
> from edk2.
>
> The problem is discussed here on the Arch Linux forums:
>
> https://bbs.archlinux.org/viewtopic.php?pid=2012659#p2012659
>
> The last version that had the Xen support in the OvmfPkgX64 target was
> edk2-stable202105, so for newer versions it is necessary to build and > use the
> Xen-specific OVMF.fd firmware target to boot properly on Xen.
>
> After building using 'OvmfPkg/build.sh -p OvmfPkg/OvmfXen.dsc' as
> explained
> here:
>
> https://lore.kernel.org/all/20190813113119.14804-1-
> anthony.perard@xxxxxxxxxx/
>
> from the edk2 source at https://github.com/tianocore/edk2 and using
> the
> resulting
> OVMF.fd firmware target with Xen support to boot the Xen HVM guest,
> the guest
> works properly with versions of ovmf edk2-stable202108 and newer.
>
> Unfortunately distros such as Debian and Fedora don't provide the Xen > specific
> target in their ovmf packages, so it is necessary to build it from
> source for
> ovmf
> versions of edk2-stable202108 and newer.

Thanks a lot for posting this, Chuck! It seems that I have run into this situation after upgrading from Debian Bullseye to Debian Bookworm. With standard packages, existing HVM DomUs using "firmware = 'ovmf'" (Windows Server 2022 and Windows 10) can't boot anymore. Booting these systems leads to the Windows error 0xc0000225. I wasn't able to fix this error. Booting an installation .iso leads to the same error. Booting the installation media with "firmware = 'bios'" leads to a normal boot.

I tried building Ovmf following
https://lore.kernel.org/all/20190813113119.14804-1-anthony.perard@xxxxxxxxxx/#t , but I wasn't fully able to create a working system:

(1) Using the resulting OVMF.fd from the build process with "firmware =
'/path/to/new/OVMF.fd' led consistently to a black screen in VNC or
Spice with the text "Guest has not initialized the display (yet)".

(2) Replacing the OVMF.fd in /var/lib/ovmf with the freshly built
OVMF.fd led to a slight improvement. I could then boot the Windows
Server installation .iso, but booting the Windows 10 installation .iso
lead to a crash where the TianoCore logo was visible, but nothing
happened. The two existing DomUs were still not bootable. When trying to
boot any of them, in Ovmf log appears an error "FATAL ERROR - RaiseTpl
with OldTpl(0x1F) > NewTpl(0x10)".

However, I am not sure that I followed the procedure correctly, I might
very well have done something very wrong. Any pointers are welcome.

My HVM config file:

type = "hvm"
memory = 6144
vcpus = 2
name = "kalliope"
firmware = 'ovmf'
firmware = '/usr/local/lib/ovmf/OVMF.fd'
vif = ['bridge=xenbr0,mac=XX:XX:XX:XX:XX:XX,ip=10.0.0.4']
disk = ['phy:/dev/vg0/matrix,hda,w']
device_model_version = 'qemu-xen'
hdtype = 'ahci'
pae = 1
acpi = 1
apic = 1
vga = 'stdvga'
videoram = 16
xen_platform_pci = 1
vendor_device = 'xenserver'
viridian = 1
on_crash = 'restart'
device_model_args_hvm = [
  # Debug OVMF
  '-chardev', 'file,id=debugcon,path=/var/log/xen/ovmf.log,',
  '-device', 'isa-debugcon,iobase=0x402,chardev=debugcon',
]
sdl = 0
serial = 'pty'
vnc = 1
vnclisten = "0.0.0.0"
vncpasswd = ""


There is a Debian bug report which seems to be related, I also described my situation there: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=978595

Paul



 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.