VM crashes upon reboot using EFI

This is for discussing general topics about how to use VirtualBox.
JustinH
Posts: 106
Joined: 6. Aug 2015, 05:09

VM crashes upon reboot using EFI

Post by JustinH »

Windows 10 host, Windows 10 (or 11) guest

When I reboot my EFI VMs, I get a guru crash right after it starts to come back up.

If I do a shutdown from the VM there is no error. If I don't use EFI, no errors.

I tried to create a Win7 VM with EFI, but soon after the ISO is launched I get some red garbage at the top of the VM window and it locks up.
Attachments
VBox_W7.zip
Windows 7 first boot
(56.06 KiB) Downloaded 12 times
VBox.zip
VBox Win11 logs
(90.43 KiB) Downloaded 11 times
scottgus1
Site Moderator
Posts: 20965
Joined: 30. Dec 2009, 20:14
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Windows, Linux

Re: VM crashes upon reboot using EFI

Post by scottgus1 »

Per "One issue per thread", please post the question about the Windows 7 VM in a new topic. We can try the Widows 10 VM here.

There is something odd going on in the log, but I'd like to ask a question or two:

Are these VMs fully installed? The Windows 10 log "Vbox.zip" did not show a full boot-up to the VM log reporting the OS info before the reset.
JustinH
Posts: 106
Joined: 6. Aug 2015, 05:09

Re: VM crashes upon reboot using EFI

Post by JustinH »

Yes, the VMs are fully installed and with GAs installed.

I presume you are looking at VBox.log and were looking for the guest OS info? I see the host info at the beginning. Where is the guest OS info normally at in the log? (I copied off the logs folder while the guru error dlg was being shown.) Is this what you are looking for:
00:00:04.816649 VMMDev: Guest Log: VBoxGuest: Windows version 10.0, build 22000

I'll attach a new log with just a boot up and then shutdown, and also another reboot. I noticed that I get some green garbage at the top of the screen on the EFI screen during reboot.

Considering that I see garbage on the screen only during reboot, could the cause be some graphics initialization error? Why would it be diff for boot vs reboot? Note that I've seen this same problem with two diff NVIDIA cards and multiple driver versions.

The only reason I mentioned W7 was to show that is not a W10/11 thing only, that there is a general problem with EFI on my system. I was trying to see if W7 reproduced but I couldn't even install it to find out! Even so, stick with W10 we shall do.

Thanks.
Attachments
boot_reboot.zip
boot then reboot (crash)
(252 KiB) Downloaded 11 times
boot_shutdown.zip
boot then shutdown (no errors)
(205.73 KiB) Downloaded 8 times
scottgus1
Site Moderator
Posts: 20965
Joined: 30. Dec 2009, 20:14
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Windows, Linux

Re: VM crashes upon reboot using EFI

Post by scottgus1 »

JustinH wrote: Is this what you are looking for:
00:00:04.816649 VMMDev: Guest Log: VBoxGuest: .......
Yes those were the lines I was hunting. They don't appear in the first two logs, if I read correctly, but they are in the 'boot-shutdown.zip' and 'boot-reboot.zip' logs.

I see the guru meditation in the reboot log, but I'm not certain why it happens. Virtualbox is installed in an unusual place:
C:\Prgs\VirtualBox\VirtualBoxVM.exe
but that may not necessarily be the cause.

You're running 6.1.18, maybe some fixes in 6.1.22 or a test build. If you try the test build, save the test build installer until you update again later.
JustinH
Posts: 106
Joined: 6. Aug 2015, 05:09

Re: VM crashes upon reboot using EFI

Post by JustinH »

I installed 6.1.22 in the default location, installed the extension pack, but still get the same crash. Logs attached.

Does VB EFI rely on anything from the host motherboard or OS -- UEFI settings or any other parameter?
Attachments
6122test.zip
6.1.22 test
(246.44 KiB) Downloaded 11 times
fth0
Volunteer
Posts: 5668
Joined: 14. Feb 2019, 03:06
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Linux, Windows 10, ...
Location: Germany

Re: VM crashes upon reboot using EFI

Post by fth0 »

The VirtualBox (U)EFI BIOS has its own configuration.

When the crash happens, vCPU1 (the second vCPU) is in real mode and triple-faults. It could also be the other way around (a deliberate triple-fault is needed to "switch" from 64-bit long mode to real mode), but then I'd expect vCPU1 to have the reset vector in CS:IP. What happens if you provide 1 or 3 vCPUs?
Last edited by fth0 on 19. Jul 2021, 01:40, edited 1 time in total.
scottgus1
Site Moderator
Posts: 20965
Joined: 30. Dec 2009, 20:14
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Windows, Linux

Re: VM crashes upon reboot using EFI

Post by scottgus1 »

Thanks for trying the update, the default location and the new log.

The Virtualbox EFI is also not to my knowledge tied to the physical EFI. Legacy BIOS hosts can boot EFI VMs. All the Virtualbox 'hardware' is independent of the physical hardware, except for the CPU.

From my googling, the reported Windows version in the new log and the previous logs:
00:00:11.804338 VMMDev: Guest Log: 01:26:18.166740 main OS Product: Windows 10
00:00:11.804356 VMMDev: Guest Log: 01:26:18.166740 main OS Release: 10.0.22000
is actually Windows 11 Insider Preview. This OS is not supported yet.

In addition to fth0's suggestions above, please try a fresh new Windows 10 VM, install Windows 10 in it, then please try the boot - reboot again. If it also fails, please post the log.
JustinH
Posts: 106
Joined: 6. Aug 2015, 05:09

Re: VM crashes upon reboot using EFI

Post by JustinH »

fth0 wrote:What happens if you provide 1 or 3 vCPUs?
You nailed it! 1 or 3 works! Is this an incompatibility between the CPU and VB or would this be considered a bug with the CPU (or even motherboard settings)? I'm using a Ryzen 7 3700X.

It is not specific to W11 (which has not been released, so will be pre-release), but I reported the problem is seen with W10 or 11. I first saw it on a new W10 VM.
Last edited by JustinH on 18. Jul 2021, 23:53, edited 1 time in total.
scottgus1
Site Moderator
Posts: 20965
Joined: 30. Dec 2009, 20:14
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Windows, Linux

Re: VM crashes upon reboot using EFI

Post by scottgus1 »

JustinH wrote:It is not specific to W11
Most people's W10's don't do what you claim yours is doing. So a log of a new W10 showing the problem will at least provide evidence for your claim, and it may help pinpoint the problem.
JustinH
Posts: 106
Joined: 6. Aug 2015, 05:09

Re: VM crashes upon reboot using EFI

Post by JustinH »

W10 logs attached.
Attachments
VBox_W10crash.zip
W10 crash
(242.13 KiB) Downloaded 10 times
JustinH
Posts: 106
Joined: 6. Aug 2015, 05:09

Re: VM crashes upon reboot using EFI

Post by JustinH »

Well, a bit of a twist in the chaos. To test fth0's theory, I first tested with 3 cores - no problem, then I tested with 1 core - no problem. I did this process on two guests. But when I changed them back to 3 cores the crash reappeared! I have to use only 1 core to avoid the crash :(
fth0
Volunteer
Posts: 5668
Joined: 14. Feb 2019, 03:06
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Linux, Windows 10, ...
Location: Germany

Re: VM crashes upon reboot using EFI

Post by fth0 »

JustinH wrote:1 or 3 works!
That is not was I was expecting: With 1 vCPU, I expected it to work. But with 3 vCPUs, I expected the crash to happen in either vCPU1 or vCPU2 (not in vCPU0), and I was hoping for revelations from the other of those two, because the state of the triple-faulting vCPU1 doesn't really make sense to me.
JustinH
Posts: 106
Joined: 6. Aug 2015, 05:09

Re: VM crashes upon reboot using EFI

Post by JustinH »

See my last post - 3 vCPUs didn't work again. Where did you see vCPU0 fault?
fth0
Volunteer
Posts: 5668
Joined: 14. Feb 2019, 03:06
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Linux, Windows 10, ...
Location: Germany

Re: VM crashes upon reboot using EFI

Post by fth0 »

Sorry, I misread your post (read a "2" instead of the last "3", probably influenced by the "two guests"). And with "(not in vCPU0)" I didn't mean that a crash happened in vCPU0, only that I expected it in one of the other two vCPUs. And I mentioned vCPU0 to make sure that all readers have a chance to notice that vCPUs are counted from zero.

So, since you could reproduce the crash with 3 (or more) vCPUs, could you also provide a VBox.log file? ;)
JustinH
Posts: 106
Joined: 6. Aug 2015, 05:09

Re: VM crashes upon reboot using EFI

Post by JustinH »

Here you go. I included the W10 logs starting with 2 vCPUs for a convenient baseline along with the others.

Note that when I switched the VM from 2 to 3 vCPUs, it didn't crash on the first reboot, so I shutdown and captured that log also. I had to boot-reboot again to see the crash.
Attachments
VBox_4vcpu_W10-crash.zip
(87.29 KiB) Downloaded 7 times
VBox_3vcpus_W10.zip
crash and no crash
(124.65 KiB) Downloaded 7 times
VBox_2vcpu_W10_crash.zip
(74.3 KiB) Downloaded 9 times
Post Reply