Raspberry Pi Os, Debian Guest Additions Installed: Slow Startup Times

Discussions about using Linux guests in VirtualBox.
Post Reply
ufguy
Posts: 40
Joined: 4. Jun 2023, 16:43

Raspberry Pi Os, Debian Guest Additions Installed: Slow Startup Times

Post by ufguy »

I'm posting about Raspberry Pi Os and Debian together since Raspberry Pi Os is built on Debian 11 and their both exhibiting the same behavior.

Without Guest Additions Raspberry Pi Os and Debian load quickly in VirtualBox 7.0. Windows 11 host. With Guest Additions added load times are taking 4-5 minutes.

Raspberry Pi Os(Raspberry Pi Desktop): 2022-07-01-raspios-bullseye-i386
Debian: debian-11.7.0-amd64-netinst

Raspberry Pi Os is built on Debian 11

With Guest Additions installed:
------
Linux raspberry 5.10.0-23.amd64 #1 SMP Debian 5.10.179-1 (2023-05-12) x86_64 GNU/Linux

Raspberry Pi loads in roughly 4-5 minutes. For this monitoring session it loaded to the desktop in 5 minutes.

The wait time starts up when this status message appears on the screen:
raspi-config.service
For about 30 seconds it consumes a variable amount of CPU and then goes down to 0%.
A little bit appears on the usage monitor, 0.3 to 0.5 occasionally

At about the 1-1.5 minute mark I noticed that anacron.service appears on the screen instead of raspi-config.service.
CPU usage is still at 0%.

------
Linux debian 5.10.0-23-amd64 #1 SMP Debian 5.10.179-1 (2023-05-12) x86_64 GNU/Linux

Debian loads in roughly 5 minutes
CPU usage appears to be 0 and these two status messages take turns being displayed:
a start job is running for vboxadd.service(secs/5min)
a start job is running for Hold unti...ot process finishes up((secs/no limit)
-->When the 5 minute mark is reached it goes to the login screen.
mpack
Site Moderator
Posts: 39156
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Re: Raspberry Pi Os, Debian Guest Additions Installed: Slow Startup Times

Post by mpack »

Please provide a VM log file (for one VM). Make sure the VM is fully shut down, then right click it in the manager UI. Select "Show Log" and save "VBox.log" (no other file) to a zip file.
ufguy
Posts: 40
Joined: 4. Jun 2023, 16:43

Re: Raspberry Pi Os, Debian Guest Additions Installed: Slow Startup Times

Post by ufguy »

I am assuming I'm attaching the right log. Logs are having numbers appended to them, this is the one with the highest number.
Attachments
log.zip
(43.43 KiB) Downloaded 2 times
scottgus1
Site Moderator
Posts: 20371
Joined: 30. Dec 2009, 20:14
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Windows, Linux

Re: Raspberry Pi Os, Debian Guest Additions Installed: Slow Startup Times

Post by scottgus1 »

ufguy wrote: 5. Jun 2023, 17:23 this is the one with the highest number.
If it was "Vbox.log.3", that was the oldest one. The newest is "Vbox.log" with no added number.
ufguy
Posts: 40
Joined: 4. Jun 2023, 16:43

Re: Raspberry Pi Os, Debian Guest Additions Installed: Slow Startup Times

Post by ufguy »

Ok, this should be the latest log. Since the previous one is the oldest then it's likely not to be a log with Guest Additions output. Thanks!
Attachments
debianlog.zip
(41.32 KiB) Downloaded 3 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: Raspberry Pi Os, Debian Guest Additions Installed: Slow Startup Times

Post by mpack »

You have Hyper-v running, that's why VirtualBox VMs are slow.
00:00:05.849215 HM: HMR3Init: Attempting fall back to NEM: VT-x is not available
...
00:00:05.864785 NEM: WHvCapabilityCodeHypervisorPresent is TRUE, so this might work...
For how to disable Hyper-v properly, see HMR3Init: Attempting fall back to NEM (Hyper-V is active).
scottgus1
Site Moderator
Posts: 20371
Joined: 30. Dec 2009, 20:14
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Windows, Linux

Re: Raspberry Pi Os, Debian Guest Additions Installed: Slow Startup Times

Post by scottgus1 »

You might also want to look into Phillip's and GotD's posts here on slow boots after GAs are installed, viewtopic.php?p=536743#p536743
scottgus1
Site Moderator
Posts: 20371
Joined: 30. Dec 2009, 20:14
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Windows, Linux

Re: Raspberry Pi Os, Debian Guest Additions Installed: Slow Startup Times

Post by scottgus1 »

Another thing to consider:
00:00:17.822103 VMMDev: Guest Additions information report: Version 6.0.0 r127566 '6.0.0'
00:05:16.766345 VMMDev: Guest Log: 13:54:27.624392 main VBoxService 7.0.8 r156879 (verbosity: 0) linux.amd64 (Apr 17 2023 18:38:33) release log
The discrepancy in version numbers here means that the prerequisites for installing Guest Additions in Linux VMs were not completed successfully, resulting in un-updated GAs kernel modules. See https://www.virtualbox.org/manual/ch04. ... ions-linux and https://www.virtualbox.org/manual/ch02. ... nux-prereq
GAs may not rum at optimum levels until this condition is fixed. Uninstall GAs, run the prerequisites, then install the GAs again, rebooting at each step.
ufguy
Posts: 40
Joined: 4. Jun 2023, 16:43

Re: Raspberry Pi Os, Debian Guest Additions Installed: Slow Startup Times

Post by ufguy »

Ok, I think were looking good! I uninstalled GA and then followed the recommendations in the "2.3. Installing on Linux Hosts" section.
Specifically I added:
Qt, SDL and the right linux headers.

Things are booting fast and I noticed that copy and paste from the Guest to the Host is working. That may not have been working, testing things a little too late last night.
Now this is one the Debian Guest. I'll try to get to the Raspberry Pi Os later today and see if that fixes things too. I'm thinking that it will.

The installation of GA seemed totally different this time. Interesting that shared folders worked so missing those packages didn't interfere with that functionality being built and installed.
ufguy
Posts: 40
Joined: 4. Jun 2023, 16:43

Re: Raspberry Pi Os, Debian Guest Additions Installed: Slow Startup Times

Post by ufguy »

Raspberry Pi Os is now loading fast. I basically redid what I listed in the previous post. But, there were additional packages that needed to be added. At least 5 packages, things like libX11 had to be added. Installation didn't work right until all the missing dependencies for the VirtualClient(is that the right program?) were resolved.
scottgus1
Site Moderator
Posts: 20371
Joined: 30. Dec 2009, 20:14
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Windows, Linux

Re: Raspberry Pi Os, Debian Guest Additions Installed: Slow Startup Times

Post by scottgus1 »

Thanks for the reports! I'm glad speed has been restored. This may help the posters on the linked topic above.
ufguy
Posts: 40
Joined: 4. Jun 2023, 16:43

Re: Raspberry Pi Os, Debian Guest Additions Installed: Slow Startup Times

Post by ufguy »

This has been lots of fun, thanks for the help! Maybe tomorrow I can do the Raspberry Pi Os install again and list all the needed packages. I think someone would be able to zoom through it faster if they have that information.
ufguy
Posts: 40
Joined: 4. Jun 2023, 16:43

Re: Raspberry Pi Os, Debian Guest Additions Installed: Slow Startup Times

Post by ufguy »

Ok, I GAed a fresh Raspberry Pi Os to get the complete list of packages I had to add. This was different than earlier today:
kernel-release: 5.10.0-23-amd64

linux-headers-5.10.0-23-amd64, this would have been added but it was already there)

(I choose packages with amd64 appended to the title since the kernel release is an amd64)
qtbase5-dev
libsdl2-dev:amd64
libXmu-dev:amd64
------
Earlier today I had to add a lot more than libXmu-dev:amd64. First thing it asked for was libX11. This time it didn't. I just had to add libXmu-dev:amd64. After that the installation went well and it booted fast. GA shared folders were there so it really is installed. I must have altered the system the previous night somehow when I was troubleshooting and it lead to more packages being needed. Weird!
ufguy
Posts: 40
Joined: 4. Jun 2023, 16:43

Re: Raspberry Pi Os, Debian Guest Additions Installed: Slow Startup Times

Post by ufguy »

Something got borked(maybe it was me?), just looking at the installation logs:

For the first Raspberry Pi installation libx11-dev:amd64 is installed before libsdl2-dev:amd64. Which is the opposite of the installation process. I got a message that libx11 was not installed. So I did that but that was after libsdl2 was installed. ???

For the 2nd Raspberry Pi installation libsdl2-dev:i386 is installed before libx11-dev:amd64. The libx11 package, I didn't have to install. And what is weirder is that i think I specified the amd64 version of libsdl2 for this one. Looks like it libx11 was installed not that far away from qtbase5. For the first one that happens way afterwards. Same qtbase5 packages.
Post Reply