60-90 second delay booting Ubuntu guests in VirtualBox 6.1

Discussions about using Linux guests in VirtualBox.

60-90 second delay booting Ubuntu guests in VirtualBox 6.1

Postby Kevin Sikes » 5. Oct 2022, 23:41

With VirtualBox 6.1, Ubuntu guests get stuck on a blank gray/black screen for 60-90 seconds right after the BIOS screen is shown, then the machine proceeds to boot. VirtualBox 6.0 doesn't have this issue on this host. Reproduced with Ubuntu 20.04, Kubuntu 22.04, Ubuntu Mate 20.04. In the log, I see the screen resize 3 times, first to 720x400, then 4 seconds later to 640x480, then 71 seconds later back to 720x400 (with no other activity in the log between the resizes).

VirtualBox 6.1.38
Extension Pack 6.1.38 (issue also presents with Extension Pack removed)
Host: Windows 10 21H2 (19044.2006) 12GB RAM, 1st gen Core i7 960 CPU
Host boots from SSD; VMs are stored on RAID 0 striped pair of HDDs 2TB each, total 4TB

Guest: Ubuntu Mate 20.04 64-bit 1 CPU, 4GB RAM, 50GB dynamic disk
Guest Additions 6.1.38
SATA contoller uses Host I/O cache

I have another Windows 10 machine with a Xeon W-2104 processor running the same VirtualBox version (no Extension Pack), and it does not suffer from this problem. One difference I see is the Xeon machine displays a RETBleed warning at guest boot ("WARNING: Spectre v2 mitigation leaves CPU vulnerable to RETBLeed attacks, data leaks possible!"), while the Core i7 1st gen machine that has the delay issue does not show this warning.

Logs and machine info attached. Thanks for any suggestions!

Kevin Sikes
Attachments
mate20-info-logs.7z
(42.69 KiB) Downloaded 4 times
Kevin Sikes
 
Posts: 5
Joined: 5. Oct 2022, 23:23

Re: 60-90 second delay booting Ubuntu guests in VirtualBox 6.1

Postby fth0 » 6. Oct 2022, 02:07

FWIW, if you'd let GRUB run into a ~70 seconds timeout, the VBox.log file would look similar. For a test, press and hold the Shift key right after starting the VM to stop in GRUB for a definite amount of time (e.g. 120 seconds), then continue booting. What happens?
fth0
Volunteer
 
Posts: 4166
Joined: 14. Feb 2019, 03:06
Location: Germany
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Linux, Windows 10, ...

Re: 60-90 second delay booting Ubuntu guests in VirtualBox 6.1

Postby Kevin Sikes » 6. Oct 2022, 07:23

I tested as you suggested, stopping at the Grub screen for 120 seconds and then pressing Enter to continue booting. It still took an additional 74 seconds to move past the 640x480 gray/black screen and show the Ubuntu Mate splash screen.

I appreciate the quick response!

Kevin
Kevin Sikes
 
Posts: 5
Joined: 5. Oct 2022, 23:23

Re: 60-90 second delay booting Ubuntu guests in VirtualBox 6.1

Postby fth0 » 6. Oct 2022, 22:47

Ok, so the 74 seconds are probably between GRUB executing something for the selected boot manager entry and the dmesg log starting, which takes place ~100 ms after the last resolution change to 720x400 in one of my own Linux Mint VMs. A tricky thing to analyze.

On the host, you could use your favorite task manager to investigate what happens during the delay. Depending on your knowledge, you could also use the VirtualBox Debugger.

You could also try to check if the RAID plays any role in this, because not many VirtualBox users have a RAIDed disk. Clone the VM to another disk, to see if the problem is inside or outside the VM.
fth0
Volunteer
 
Posts: 4166
Joined: 14. Feb 2019, 03:06
Location: Germany
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Linux, Windows 10, ...

Re: 60-90 second delay booting Ubuntu guests in VirtualBox 6.1

Postby Kevin Sikes » 7. Nov 2022, 22:50

I ran procmon from SysInternals to see what was taking place on the host during the delay. The VirtualBoxVM.exe process executes about 15,800 ReadFile events against the machine's .vdi file during the time in which the machine sits stuck before moving past the gray screen to the Ubuntu Mate logo. Average read is about 32KB of data, for a total of 520MB out of a 11GB .vdi file.
Kevin Sikes
 
Posts: 5
Joined: 5. Oct 2022, 23:23

Re: 60-90 second delay booting Ubuntu guests in VirtualBox 6.1

Postby fth0 » 13. Nov 2022, 12:56

The quantities that you described sound like idling around or waiting for something else to happen.

Did you make a test without the RAID, for example by moving the VM to an external USB3 SSD?

Let me know how keen you are to investigate further and if I can offer any help.
fth0
Volunteer
 
Posts: 4166
Joined: 14. Feb 2019, 03:06
Location: Germany
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Linux, Windows 10, ...

Re: 60-90 second delay booting Ubuntu guests in VirtualBox 6.1

Postby Kevin Sikes » 15. Nov 2022, 22:07

Same behavior when VM is located on main SSD drive.
Kevin Sikes
 
Posts: 5
Joined: 5. Oct 2022, 23:23


Return to Linux Guests

Who is online

Users browsing this forum: No registered users and 11 guests