Linux 5.4.0 guest hanging at boot (SATA time-outs?)

Discussions about using Linux guests in VirtualBox.
Post Reply
Captain Chaos
Posts: 7
Joined: 5. Feb 2022, 11:06

Linux 5.4.0 guest hanging at boot (SATA time-outs?)

Post by Captain Chaos »

Hello,

Can somebody help me debug the following problem? I have a Linux guest that has been working fine for many months, but in recent weeks has started not to boot. At first it would sporadically hang at boot, but a reset would fix it. Now it almost always hangs at boot (except when I boot in recovery mode, which sometimes still works).

This is what the display looks like after several minutes:
The display after several minutes when not booting in recovery mode.
The display after several minutes when not booting in recovery mode.
VirtualBox_Linux Test_05_02_2022_10_19_43.png (10.31 KiB) Viewed 3220 times
I have googled those errors, but from the results it appears that they are unrelated problems. Let me know if that is not the case.

It appears to have dropped to a shell, but it does not accept any keyboard input so I can't inspect the boot log. I do have a video of it booting in recovery mode, showing the messages it logs to the console. The forum software unfortunately does not allow me to upload the video or post the link, so please let me know how I can provide that video. Here are some lines I manually copied from it, which is what makes me think that the problem is some kind of SATA time-out:

Code: Select all

[   25.823816] ata3.00: qc timeout (cmd 0xec)
[   25.823816] ata3.00: failed to IDENTIFY (I/O error, err_mask=0x4)
[   26.181349] ata3: SATA link up 3.0 Gbps (SStatus 123 SControl 300)
This repeats a number of times (with lower link speeds) and then it gives up and drops to a shell (which still won't accept any keyboard input). It never gets to asking for the passphrase of the encrypted filesystem.

Some more details:

Host: Windows 10 64-bit (build 19043.1466)
Guest: Ubuntu Linux 64-bit, kernel version 5.4.0-91, with an encrypted filesystem
VirtualBox version: 6.1.32 r149290 (Qt5.6.2)

I have attached the .vbox and .log files. Please let me know what more information I can provide or things I can try to get to the bottom of this. Many thanks in advance for any help you can provide!
Attachments
VBox.log.zip
The VirtualBox log file of the boot attempt.
(30.26 KiB) Downloaded 9 times
Linux Test.vbox.zip
The VM config file.
(1.75 KiB) Downloaded 6 times
mpack
Site Moderator
Posts: 39134
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Mostly XP

Re: Linux 5.4.0 guest hanging at boot (SATA time-outs?)

Post by mpack »

It's going to be the usual reason: you have Hyper-v enabled.
00:00:03.012819 HM: HMR3Init: Attempting fall back to NEM: VT-x is not available
00:00:03.045558 NEM: info: Found optional import WinHvPlatform.dll!WHvQueryGpaRangeDirtyBitmap.
00:00:03.045615 NEM: WHvCapabilityCodeHypervisorPresent is TRUE, so this might work...
See HMR3Init: Attempting fall back to NEM (Hyper-V is active).
Captain Chaos
Posts: 7
Joined: 5. Feb 2022, 11:06

Re: Linux 5.4.0 guest hanging at boot (SATA time-outs?)

Post by Captain Chaos »

mpack wrote:It's going to be the usual reason: you have Hyper-v enabled.
Enabled where? It is enabled in Windows, yes. I need it for WSL2 and Docker Desktop. But VirtualBox supports Hyper-V. The virtualisation platform of the VM is set to Hyper-V, and that has been working fine for months. Why would it now be a problem?
fth0
Volunteer
Posts: 5690
Joined: 14. Feb 2019, 03:06
Primary OS: Mac OS X other
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Linux, Windows 10, ...
Location: Germany

Re: Linux 5.4.0 guest hanging at boot (SATA time-outs?)

Post by fth0 »

Captain Chaos wrote:Why would it now be a problem?
Because there is a regression in VirtualBox 6.1.32. But I'm not sure yet if you're experiencing this regression or not, because your VBox.log file does not show the typical signs of it. Can you please try VirtualBox 6.1.30? If you've enabled HVCI (Memory Integrity), try VirtualBox 6.1.26 instead. Please provide another VBox.log file in any case.
mpack
Site Moderator
Posts: 39134
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Mostly XP

Re: Linux 5.4.0 guest hanging at boot (SATA time-outs?)

Post by mpack »

Captain Chaos wrote:But VirtualBox supports Hyper-V.
It would be more correct to say that some versions of VirtualBox tolerate some versions of Hyper-v. But it's never a happy relationship. I rather suspect that Microsoft don't want you using third party VM.
Captain Chaos
Posts: 7
Joined: 5. Feb 2022, 11:06

Re: Linux 5.4.0 guest hanging at boot (SATA time-outs?)

Post by Captain Chaos »

fth0 wrote:If you've enabled HVCI (Memory Integrity), try VirtualBox 6.1.26 instead.
I don't know what that is, so assuming it's something that is disabled by default I did not.

I downgraded VirtualBox to version 6.1.30. I also had to downgrade the extension pack, but now it works! The VM boots without problems. I have attached the log file of the successful run.

Another data point that points to this being a regression in VirtualBox is that another VM, a Windows 11 one, also no longer worked well. It did boot, but excruciatingly slowly (taking half an hour or so). It also works correctly now.

I'll refrain from updating VirtualBox for now. Is there anything I can do to help get this regression fixed?
Attachments
VBox.log.zip
(32.92 KiB) Downloaded 6 times
fth0
Volunteer
Posts: 5690
Joined: 14. Feb 2019, 03:06
Primary OS: Mac OS X other
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Linux, Windows 10, ...
Location: Germany

Re: Linux 5.4.0 guest hanging at boot (SATA time-outs?)

Post by fth0 »

Regarding HVCI (Memory Integrity), enter Memory Integrity into the Windows Start Menu. ;) If it was enabled on your Windows host, VirtualBox 6.1.30 wouldn't have started any VM.
Captain Chaos wrote:Is there anything I can do to help get this regression fixed?
Thanks for offering to help, but at the moment: No. I'll let you know when that changes. :)
Captain Chaos
Posts: 7
Joined: 5. Feb 2022, 11:06

Re: Linux 5.4.0 guest hanging at boot (SATA time-outs?)

Post by Captain Chaos »

fth0 wrote:Thanks for offering to help, but at the moment: No. I'll let you know when that changes. :)
Alright. Thanks for your help! Is there a bug tracker for this regression?
fth0
Volunteer
Posts: 5690
Joined: 14. Feb 2019, 03:06
Primary OS: Mac OS X other
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Linux, Windows 10, ...
Location: Germany

Re: Linux 5.4.0 guest hanging at boot (SATA time-outs?)

Post by fth0 »

Captain Chaos wrote:Is there a bug tracker for this regression?
There are several tickets in the Bugtracker, and also several forum threads. If you want a single pointer to follow, watch the Discuss the 6.1.32 release forum thread.
Post Reply