public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
* OVMF_CODE/VARS unable to reboot a mac os vm during installation (only first stage)
@ 2021-09-25  8:57 Daniele Crudo
  2022-05-15 17:37 ` [edk2-devel] " nafi
  0 siblings, 1 reply; 3+ messages in thread
From: Daniele Crudo @ 2021-09-25  8:57 UTC (permalink / raw)
  To: edk2-devel-groups-io

[-- Attachment #1: Type: text/plain, Size: 3961 bytes --]

Hi, forwarding this also to the mailing list:

https://bugzilla.tianocore.org/show_bug.cgi?id=3640

---->

Hello,
it's been about a year I'm experiencing a strange issue, not a
stopper, so I started only recently to investigate.
I found that it's OVMF.

System: x86_64 manjaro 21.1.3 (only cli), qemu 6.1.0, libvirt 7.7.0

Issue:

after an ota delta update from within the virtual machine (mac os big
sur and monterey were tested), from system preferences, or after the
installation from a mac os installer disc, the virtual machine doesn't
automatically reboot, ONLY after the first stage.
Installation and updates in mac os have several stages, unfortunately
I don't know in details what's going on during each stage.

This is what happens (OTA delta update in the guest):

system preferences (in the vm) --> software updates: start to download
the ota delta update,
download finishes, mac os prepares installation, then asks to reboot.
Mac os seems to start the reboot, signal to gpu (passed through) is
lost, but it never starts again: virsh is reporting that the virtual
machine is running.
After 30+ minutes I need to force the shutdown of the virtual machine
(virsh reboot/virsh shutdown have no effect, only virsh destroy is
able to force the shutdown) and manually start the vm again.
After this force shutdown/manual start, the installation completes
without issues, mac os is rebooted automatically and automatically
completes all the other installation stages.

After an installation from a mac os installer disc (empty virtual hd,
or empty passed through sata controller+ssd):

Installation starts with a gui, after some minutes (less than 10 min)
it reboots. then after some time (about 20 minutes) it tries to
restart.
Mac os seems to start the reboot, signal to gpu (passed through) is
lost, but it never starts again: virsh is reporting that the virtual
machine is running.
After 30+ minutes I need to force the shutdown of the virtual machine
(virsh reboot nor virsh shutdown have no effect, only virsh destroy is
able to force the shutdown) and manually start again.
After this force shutdown/manual start, the installation completes
without issues, mac os is reboot automatically and automatically
completes all the other stages.

Side note:
reboot/shutdown work without issue in other cases, it's only after the
first stage of a mac os installation.
Note that I tested also a very basic mac os vm, without any passthrough.

What I did:
tested different versions of qemu, from 5.1.0 to 6.1.0.
tested different versions of libvirt, from 6.5.0 to 7.7.0.
tested different versions of OVMF.

OVMF is the culprit.
I tested only release versions, compiled by me in kali linux, GCC5.
After compilation I use OVMF_CODE.fd and OVMF_VARS.fd for my virtual machine:

OVMF version 202011 (stable): it works, reboots mac os after first
stage, no issue.
OVMF version 202102 (stable): it doesn't work as expected, doesn't
reboot mac os after first stage, as explained.
OVMF version 202105 (stable): it doesn't work as expected, doesn't
reboot mac os after first stage, as explained.
OVMF version 202108 (stable): it doesn't work as expected, doesn't
reboot mac os after first stage, as explained.

The latest working OVMF version is 202011 stable, it seems something
broke it between 202011 and 202102 stable.
Strange thing, as I said, is that it doesn't reboot only after this
first installation stage (it's not random, it's always), everything
seems normal when the vm is rebooted from the installed os.
I don't know if it matters, but last lines in the vm bootloader,
before the forced shutdown after the first installation stage,
complain about system being shutdown and applesmc (which is emulated).

I'm available to perform more tests if guided, please take into
account that 1 test lasts about 45-50 minutes, because every time I
need to install the os from scratch to reach the end of the 1st stage
of installation.

Thank you for your attention.

[-- Attachment #2: Type: text/html, Size: 4671 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [edk2-devel] OVMF_CODE/VARS unable to reboot a mac os vm during installation (only first stage)
  2021-09-25  8:57 OVMF_CODE/VARS unable to reboot a mac os vm during installation (only first stage) Daniele Crudo
@ 2022-05-15 17:37 ` nafi
  2022-06-19 12:31   ` nafi
  0 siblings, 1 reply; 3+ messages in thread
From: nafi @ 2022-05-15 17:37 UTC (permalink / raw)
  To: Daniele Crudo, devel

[-- Attachment #1: Type: text/plain, Size: 621 bytes --]

Hi all,

I have. similar symptom in a completely different environment:
- Arch Linux Host
- Arch Linux Guest
- Guest with systems-boot and efi-stub
- Guest with auto-detected efi partition

Symptom is, that after downgrading and re-upgrading the kernel, the reboot will hang, similar to what Daniele Credo reported.

Everything is fine, if mounting efi partition statically, i.e. via fstab.
Downgrading to 2020.11 resolved the issue.

I have a setup available that can reproduce the issue, since I narrowed it down already.

Let me know if I can help in any way to identify, and hopefully fix, the issue.

[-- Attachment #2: Type: text/html, Size: 681 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [edk2-devel] OVMF_CODE/VARS unable to reboot a mac os vm during installation (only first stage)
  2022-05-15 17:37 ` [edk2-devel] " nafi
@ 2022-06-19 12:31   ` nafi
  0 siblings, 0 replies; 3+ messages in thread
From: nafi @ 2022-06-19 12:31 UTC (permalink / raw)
  To: Daniele Crudo, devel

My issue has been resolved in 2022-05 version. Maybe Daniele wants to re-verify his issue with that version, too.

> Am 15.05.2022 um 19:37 schrieb nafi@nafets.de:
> 
> Hi all,
> 
> I have. similar symptom in a completely different environment:
> - Arch Linux Host
> - Arch Linux Guest
> - Guest with systems-boot and efi-stub
> - Guest with auto-detected efi partition
> 
> Symptom is, that after downgrading and re-upgrading the kernel, the reboot will hang, similar to what Daniele Credo reported.
> 
> Everything is fine, if mounting efi partition statically, i.e. via fstab.
> Downgrading to 2020.11 resolved the issue.
> 
> I have a setup available that can reproduce the issue, since I narrowed it down already.
> 
> Let me know if I can help in any way to identify, and hopefully fix, the issue.


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2022-06-19 12:31 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-09-25  8:57 OVMF_CODE/VARS unable to reboot a mac os vm during installation (only first stage) Daniele Crudo
2022-05-15 17:37 ` [edk2-devel] " nafi
2022-06-19 12:31   ` nafi

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox