VM crash upon boot (guru meditation before grub load)

Discussions about using Linux guests in VirtualBox.
Post Reply
HarryMan
Posts: 113
Joined: 15. Jan 2014, 13:54
Primary OS: Debian other
VBox Version: OSE Debian
Guest OSses: devuan, MX-Linux, others

VM crash upon boot (guru meditation before grub load)

Post by HarryMan »

After an upgrade of the OS image in a Linux guest, I get a guru meditation message from virtualbox stating
A critical error has occurred while running the virtual machine and the machine execution has been stopped.
This happens just as grub is starting to load. Log is attached.

I have been upgrading some other similarly-configured clients without incident; this is the first time I have seen this after such an upgrade.
Virtualbox version is 6.1.38 with the 6.1.38 extensions.
Attachments
myvm0-2022-09-20-02-06-46.log.gz
(75.5 KiB) Downloaded 9 times
mpack
Site Moderator
Posts: 39156
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Re: VM crash upon boot (guru meditation before grub load)

Post by mpack »

512MB RAM is not very much for a 64bit guest OS. I would increase to 2048MB. Also give it 2 CPU cores (not more or less).

VirtualBox seems to be having problems with the USB emulation on Linux hosts. Try disabling USB in the VM settings.

Also, is OpenWRT intended for PCs? I note that the VM errors out the instant it first tries to execute guest code.
HarryMan
Posts: 113
Joined: 15. Jan 2014, 13:54
Primary OS: Debian other
VBox Version: OSE Debian
Guest OSses: devuan, MX-Linux, others

Re: VM crash upon boot (guru meditation before grub load)

Post by HarryMan »

mpack wrote:512MB RAM is not very much for a 64bit guest OS. I would increase to 2048MB. Also give it 2 CPU cores (not more or less).

VirtualBox seems to behaving problems with the USB emulation on Linux hosts. Try disabling USB in the VM settings.

Also, is OpenWRT intended for PCs? I note that the VM errors out the instant it first tries to execute guest code.
I've been running several OpenWRT OS in virtualbox for years without major issues. OpenWRT does not require much memory unless a lot of extra software is running in the VM. I've never had to use more than 512MB for OpenWRT.

Even if it were the case that the OS needed more memory, grub certainly does not. We don't get anywhere close to a running OS. The VM fails just before grub loads, so this cannot have anything to do with the specific OS inside the VM. I think grub is designed to run with low resources.

When you say Virtualbox seems to be having problems with USB emulation, do you mean this latest version, 6.1.38? It was working well enough here previously.
mpack
Site Moderator
Posts: 39156
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Re: VM crash upon boot (guru meditation before grub load)

Post by mpack »

HarryMan wrote:do you mean this latest version, 6.1.38
Yes, I mean 6.1.38. Apparantly the issue existed in 6.1.36 too.
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 crash upon boot (guru meditation before grub load)

Post by fth0 »

The crash happened while the virtual CPU was still in 32-bit mode, after having read 256 kB from the virtual hard disk. The virtual CPU is trying to access a probably bogus 32-bit memory address and VirtualBox couldn't handle the page fault.

Is the issue 100% reproducible in your setup?

Can you verify if the VM is executing some GRUB code at all?
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 crash upon boot (guru meditation before grub load)

Post by fth0 »

I may have found a clue indicating the cause of the issues:
myvm0-2022-09-20-02-06-46.log wrote:
09:04:14.567657 00:00:04.307763 VMMDev: Guest Log: BIOS: AHCI 0-P#0: PCHS=260/16/63 LCHS=1024/14/13 0x0000000000040000 sectors
Please check this log message in other VBox.log files of VMs with small VDI files and provide a few examples if possible. A wrong logical disk geometry could lead to the wrong disk sectors being loaded, which would lead to the overall behavior you're experiencing.
Post Reply