Fedora 33 VM hangs after installing Guest Additions

Discussions about using Linux guests in VirtualBox.
Post Reply
Silverwolf
Posts: 9
Joined: 21. Jan 2021, 20:08

Fedora 33 VM hangs after installing Guest Additions

Post by Silverwolf »

I tried to install Linux Guest Additions on my VM with Fedora 33. It was working fine before this.
Now every time I try to boot it freezes on the load screen and I don't really know what happened.

What I can see in the log is this:
00:00:21.126711 NAT: Link up
00:00:21.583008 GUI: Show mini-toolbar for window #0
00:00:21.598264 GUI: Adjust mini-toolbar for window #0
00:00:21.598300 GUI: Map mini-toolbar for window #0 to screen 0 of 1
00:00:21.598308 GUI: Resize mini-toolbar for window #0 to 1366x768
00:00:24.533733 VMMDev: vmmDevHeartbeatFlatlinedTimer: Guest seems to be unresponsive. Last heartbeat received 4 seconds ago

I'm not well versed in VB logs but I really need some expert help because on this machine I have all my things from work and don't know what to do. :oops:
I have other VMs and they boot up just fine, both Windows and Linux.
I attached the log file. Thanks for any help!
Attachments
log1.txt
VM log file.
(101.51 KiB) Downloaded 15 times
mpack
Site Moderator
Posts: 39134
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Re: Fedora 33 VM hangs after installing Guest Additions

Post by mpack »

You have assigned the VM 4 cores on a host CPU that only has two. https://ark.intel.com/content/www/us/en ... 0-ghz.html

Even if your CPU had 4 cores you are supposed to leave some for the host OS to use, enabling it to run VirtualBox among other things. And I emphasize that you have 2 cores, not 4.

In fact there is no good solution for a 2 core host, so I would suggest allocating 2 cores and do not exceed this.

And I see no sign that you installed Guest Additions: the log shows this VM is still running 6.0.0 GAs, which is just about the worst choice you could make: the 0.0 release of an obsolete branch.
Silverwolf
Posts: 9
Joined: 21. Jan 2021, 20:08

Re: Fedora 33 VM hangs after installing Guest Additions

Post by Silverwolf »

Hi mpack.

Thanks for the tip. I will reduce this.
Does VB take advantage of Hyperthreading? I saw a few tests online about this with big calculations and adding the same number of logical cores always was faster than adding just physical cores.

My problem was when I tried to install the new GAs my machine started having erratic behaviour, like the shell commands took to long to execute or for example when using "sudo" the shell would take too much time to ask for password or not show at all. It is curious because I still could open applications on the start menu.
My host OS was doing just browsing work and Slack communication. Nothing with too much I/O.

But right now my VM it hangs on boot and loading screen stops moving and I can't do nothing. I can get on GRUB though.
Is there anything I can do to be able to boot again? Or any command that helps me remove the obsolete GAs and install a new one?
Maybe this is the source of the problem... I really have no clue why this happened.
I can share more info if needed to overcome this.

I also had a few problems with 3D acceleration. Everytime I rebooted Windows shows this error with memory position that can't be read.

Please take a look at the print screens.
Attachments
Reboot error.
Reboot error.
error.jpg (24.99 KiB) Viewed 4522 times
VM hangs at boot.
VM hangs at boot.
vm_hang.jpg (50.01 KiB) Viewed 4522 times
mpack
Site Moderator
Posts: 39134
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Re: Fedora 33 VM hangs after installing Guest Additions

Post by mpack »

There is no such thing as "logical core". The word core basically means "actual silicon", and you can't have "virtual actual silicon". Your CPU has 2 cores, 4 threads. Threads are duplicate instruction pipelines, they do not enable true parallel processing because the duplicate pipelines compete for access to resources in the core, plus features like VT-x are features of a core, not of a thread. Whether a VM "sees" the threads associated with a core, I don't really know.

FAQ: Cores vs Threads includes a link to a discussion by a dev stating why you should be conservative when allocating cores.
Silverwolf
Posts: 9
Joined: 21. Jan 2021, 20:08

Re: Fedora 33 VM hangs after installing Guest Additions

Post by Silverwolf »

Thanks for the help!

What I ussually do is assign 4 vCPU to the guest. Although I have only 2 cores on my CPU I never really had an issue with this. I always put a 80% execution cap on the guest VM and my host works just fine with the left 20% of CPU time. Even with 2 or more VMs running at the same time.

From what I know Hyperthreading uses "free cycles" on the cores to act like a new core (creating 2 new cores). Which in overall improve the performance of multithreaded software, but, of course, these new cores created by HT will never be as fast as a physical core, not even close. But in "most" cases it helps threaded apps. I'm just not sure about how VB acts on HT, but your link helped. :)

But my issue is really on booting the VM. I have all my work there and I really need to find a solution for this to boot again.
Can you point to something I should do or search related to this issue?
mpack
Site Moderator
Posts: 39134
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Re: Fedora 33 VM hangs after installing Guest Additions

Post by mpack »

Show me a zipped log in which the issues I raise are fixed and I'll then go on to consider other explanations.
Silverwolf
Posts: 9
Joined: 21. Jan 2021, 20:08

Re: Fedora 33 VM hangs after installing Guest Additions

Post by Silverwolf »

I tried to boot again with 2 cores and 100% execution cap.
Still no luck.
I can't change GAs because I can't boot. Maybe there is another way to change?
Attachments
log.zip
Crash log.
(27.29 KiB) Downloaded 8 times
mpack
Site Moderator
Posts: 39134
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Re: Fedora 33 VM hangs after installing Guest Additions

Post by mpack »

Thanks for following the advice re cores and CPU cap. Please don't revert to the incorrect settings without discussion.

If "I can't change GAs" is a reference to the assertion mentioned in the topic title, I previously mentioned that you have not in fact installed new Guest Additions so far as I can see. The VM is successfully launching GAs from the 6.0.0 release of VirtualBox. So, unless you went out of your way to download obsolete GAs from a random version instead of using the GAs bundled with your VirtualBox install... it doesn't look like GAs have been installed recently.

I suggest that you disable 3D acceleration until you have the correct (6.1.18) GAs installed.

Did you always have EFI enabled for this VM? Could you tell me why? Your hard disk seems to only be 50GB, so it isn't because you were butting against the 2TB limit on MBR. Note that toggling EFI after installation will kill any VM, unless you first ran software that converts the hdd layout.
Silverwolf
Posts: 9
Joined: 21. Jan 2021, 20:08

Re: Fedora 33 VM hangs after installing Guest Additions

Post by Silverwolf »

I installed Fedora 33 with EFI on. There was no special reason for EFI just in case I would need this in the future for some reason. But VM worked fine with this.

I didn't install older GAs, maybe this was executed during installation of Fedora 33. I didn't download them or installed them specially for this. I did try to install the new version bundled with VB 6.1.16 r140961 (Qt5.6.2), but with no success like you mention. After this something went wrong, maybe it is just coincidence I don't know.

I tried again with 3D acceleration off. No boot.
Attachments
log.zip
3D off.
(26.84 KiB) Downloaded 5 times
fth0
Volunteer
Posts: 5677
Joined: 14. Feb 2019, 03:06
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Linux, Windows 10, ...
Location: Germany

Re: Fedora 33 VM hangs after installing Guest Additions

Post by fth0 »

Ok, let me chime in an try to explain a few things about the VirtualBox Guest Additions (GA) problem first. I'll address the hyperthreading topic separately.

Modern Linux distributions (Fedora 33 included) install older versions of the VirtualBox kernel modules (e.g. 6.0.0) by default (as a fallback), but they are not used before any GA are installed. When the GA (from Oracle or from the Linux distribution) are installed, they build a new version of the kernel modules and install them. The Linux kernel 5.10 (used by Fedora 33) changed some kernel interfaces used by the GA, and therefore only the GA 6.1.18 (or newer) can be successfully built.

When you installed the GA 6.1.16, the kernel modules were not successfully built and therefore not installed (at least not vboxguest.ko), but the remainder of the GA probably was installed, leading to a mixture of GA 6.1.16 and GA 6.0.0. Similar things happened to several other users in the past, but they usually didn't prevent the Linux guest from starting, just the GA wouldn't work as expected.

I don't know an intended method to prevent the GA from starting (and when I asked this a few years ago on these forums, there wasn't a specific answer). So we probably have to come up with our own strategy, and I'd suggest to do the following:

Remove (but not delete) the virtual hard disk from the Fedora 33 VM, and add it to another Linux VM as an additional disk drive. Boot the other Linux VM, mount the additional disk, move or rename all VirtualBox kernel modules (start with find /lib/modules | grep vbox), optionally move or rename the other GA components (perhaps located somewhere under /opt, use grep -i vbox this time) and shut down the other Linux VM. Move the virtual hard disk back to the Fedora 33 VM. Good luck! :)
Silverwolf
Posts: 9
Joined: 21. Jan 2021, 20:08

Re: Fedora 33 VM hangs after installing Guest Additions

Post by Silverwolf »

Thanks. I will try to do this and let you know the results. :wink:
Silverwolf
Posts: 9
Joined: 21. Jan 2021, 20:08

Re: Fedora 33 VM hangs after installing Guest Additions

Post by Silverwolf »

I tried all the steps you mentioned but couldn't find "vbox" modules. Maybe they are installed in different folders in Fedora 33?
I also created a new VM with Fedora 33 Mate, uninstalled GAs that are installed by default, installed GAs from the VB ISO and after a few minutes the VM hangs. With and without 3D acceleration. So something for sure is not right with GAs, I'm just not sure what.
scottgus1
Site Moderator
Posts: 20945
Joined: 30. Dec 2009, 20:14
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Windows, Linux

Re: Fedora 33 VM hangs after installing Guest Additions

Post by scottgus1 »

Silverwolf wrote:I also created a new VM with Fedora 33 Mate, uninstalled GAs that are installed by default, installed the kernel headers, installed GAs from the VB ISO
Was the bolded underlined part I added in missed? See https://www.virtualbox.org/manual/ch02. ... nux-prereq
fth0
Volunteer
Posts: 5677
Joined: 14. Feb 2019, 03:06
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Linux, Windows 10, ...
Location: Germany

Re: Fedora 33 VM hangs after installing Guest Additions

Post by fth0 »

Silverwolf wrote:I tried all the steps you mentioned but couldn't find "vbox" modules. Maybe they are installed in different folders in Fedora 33?
I'm only familiar with the folder structure of the Debian/Ubuntu/Mint family of Linux distributions, so this could be different in Fedora 33. Just start searching from the root directory instead: find / | grep vbox.

Note that my instructions were only meant to prevent the GA from being used so that the VM becomes bootable again.

The next step would be to install VirtualBox 6.1.18 on the host, boot the Fedora 33 VM, install the kernel headers in the guest matching the guest's kernel (kudos to scottgus1), and finally install the GA 6.1.18. Sorry if that wasn't clear from my explanation.
Silverwolf
Posts: 9
Joined: 21. Jan 2021, 20:08

Re: Fedora 33 VM hangs after installing Guest Additions

Post by Silverwolf »

I lost all hope. :roll:

I tried deleting the kernel modules of GAs and VM didn't boot anyway.
I ended up just copying some of the files I needed for work from the old disk and installing all Oracle Infrasctrure and Weblogic stuff in a Oracle Linux 6 VM. Took me a few hours to install all of this, but at least looks more stable.

Does anyone knows how I can install Google Chrome on this distro? An older versions looks fine, just needed for some specific pages on the company.
I tried installing using the command:

Code: Select all

rpm -ivh google-chrome-stable-58.0.3029.110-1.x86_64
But with no luck, it still asks for dependecies. Even tried installing Red Hat LSB, still doesn't work. I think it needs a newer version of glibc, but I have the latest one installed from the official repository.

I still have some issues with GAs 6.18 when I open many windows inside VM and console and browser it hangs after a while. I can still restart or shutdown the VM through Vbox control panel and I does initiate the shutdown process, but I can't click anything on the desktop. Looks like mouse and keyboard loose connection somehow with the VM.
This issues happens with Linux machines on two different computers. This leads me to think that GAs didn't have extensive testing and is not yet fully production-ready at least for Linux. :shock: On Windows though it looks fine for now.

Thanks everyone for all the help provided. :D
Post Reply