Kernel Panic When Running VMs

Discussions related to using VirtualBox on Windows hosts.
Post Reply
Thane
Posts: 2
Joined: 25. Jan 2021, 03:37

Kernel Panic When Running VMs

Post by Thane »

I'm currently a CS student, and during the spring semester, I worked heavily with VMs for my classes.
However, this Fall, I am now unable to get any VMs to boot (freezes shortly after start), they all freeze about when I think the file system is mounting (Kali, Ubuntu, Mint, and Debian tested).
One of the VMs I use is a Kali Linux installation, which when I disable the splash it shows a kernel panic error:

Code: Select all

[0.771525] Kernel panic - not syncing: VFS: Unable to mount root fs on unkown-block(0,0)
[0.775317] CPU: 1 PID: 1 Comm: swapper/0 Not tainted 5.9.0-kali1-amd64 #1 Debian 5.9.1-1kali2
[0.778874] Hardware name: innotek GmbH VirtualBox/VirtualBox, BIOS VirtualBox 12/01/2006
[0.782364] Call Trace:
[0.783745]  dump_stack+0x6b/0x88
[0.785443]  panic+0x101/0x2d7
[0.787070]  mount_block_root+0x304/0x313
[0.789164]  prepare_namespace+0x136/0x165
[0.791121]  kernel_init_freeable+0x1ef/0x1fa
[0.793137]  ? rest_init+0xaa/0xaa
[0.794897]  kernel_init+0xa/0x106
[0.796615]  ret_from_fork+0x22/0x30
[0.799172] KernelOffset: 0x2e600000 from 0xffffffff81000000 (relocation range: 0xffffffff80000000-0xffffffffbfffffff)
[0.803134] --- [ end Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0) ]---
Kali-Linux-2020.4-vbox-amd64-2021-01-24-19-40-48.zip
VBox Log
(27.04 KiB) Downloaded 27 times
I've tried:
1.) Disabling Hyper-V
2.) Uninstalling WSL
3.) Different Distros
4.) Updating Windows
5.) Uninstalling Docker
6.) Storing the virtual disk on a different physical disk
7.) All the various combinations of VM settings (more RAM, more VRAM, enabling PAE/NX, more I can't remember)
8.) Different storage controller types (PIIX4, AHCI, NVMe)
9.) Disabling/removing the virtual optical drive
10.) Installing VBox Extension Pack

And at this point, I've exhausted my own knowledge and my google-fu capabilities.
Any advice would be greatly appreciated.
Kufta007
Posts: 4
Joined: 6. Feb 2021, 20:13

Re: Kernel Panic When Running VMs

Post by Kufta007 »

Hey Thane,
I'm in the same boat as you with my Linux VMs (both, my xfce and gnome ones). However I have no problems running my Linux Mint VM. In my case, this all started immediately after running an apt update and apt upgrade, then rebooting. Please let me know if there's anything I can do to help further your troubleshooting efforts. I'm pretty much a Linux novice, so I was impressed that you were able to get a log from the crash. Can you tell me how I would find or create that same log file?

I should also mention, if I choose a previous Linux firmware in the Grub boot loader, everything works perfectly fine. So I'm guessing the issue is some kind of incompatibility between the latest Linux firmware and the VBox Guest Additions or drivers.
Cheers,
-Kufta
scottgus1
Site Moderator
Posts: 20945
Joined: 30. Dec 2009, 20:14
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Windows, Linux

Re: Kernel Panic When Running VMs

Post by scottgus1 »

Thane, sorry we missed your post!

Your log still shows that Hyper-V is enabled. See HMR3Init: Attempting fall back to NEM (Hyper-V is active). FWIW disabling the "Hyper-V" checkboxes does not always disable Hyper-V. Go for the bcdedit command.

Kufta007, if you search your VM's vbox.log and see the words Attempting fall back to NEM, then you have Hyper-V enabled too.
Thane
Posts: 2
Joined: 25. Jan 2021, 03:37

Re: Kernel Panic When Running VMs

Post by Thane »

scottgus1 wrote:Thane, sorry we missed your post!

Your log still shows that Hyper-V is enabled. See HMR3Init: Attempting fall back to NEM (Hyper-V is active). FWIW disabling the "Hyper-V" checkboxes does not always disable Hyper-V. Go for the bcdedit command.

Kufta007, if you search your VM's vbox.log and see the words Attempting fall back to NEM, then you have Hyper-V enabled too.
Sir, you are an absolute lifesaver. I had no idea disabling Hyper-V wasn't *actually* disabling Hyper-V.
If you have a Paypal I would love to donate you a morning coffee for all the grief you've saved me.
scottgus1
Site Moderator
Posts: 20945
Joined: 30. Dec 2009, 20:14
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Windows, Linux

Re: Kernel Panic When Running VMs

Post by scottgus1 »

Great, Thane, glad you're up and running!
Kufta007
Posts: 4
Joined: 6. Feb 2021, 20:13

Re: Kernel Panic When Running VMs

Post by Kufta007 »

scottgus1 wrote:Thane, sorry we missed your post!

Your log still shows that Hyper-V is enabled. See HMR3Init: Attempting fall back to NEM (Hyper-V is active). FWIW disabling the "Hyper-V" checkboxes does not always disable Hyper-V. Go for the bcdedit command.

Kufta007, if you search your VM's vbox.log and see the words Attempting fall back to NEM, then you have Hyper-V enabled too.
Scottgus1, I just checked the logs but no sign of any attempt to fall back to NEM. I've attached the logs from both VMs in case anything jumps out as being an issue. EDIT: each log file was too 10 KB to big. I've truncated all the items that happen after I closed out of the VMs to shorten them.
Attachments
Kali_xfce VBox.log
(86.16 KiB) Downloaded 9 times
Kali_gnome VBox.log
(85.76 KiB) Downloaded 4 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: Kernel Panic When Running VMs

Post by fth0 »

In the VM configuration, you've set the Graphics Controller to VBoxSVGA (Windows guests) instead of VMSVGA (Linux guests), and you have installed the VIrtualBox Guest Additions 6.1.18 in the guest, while using VirtualBox 6.1.16 on the host. Both could work coincidentally, but is not a supported setup.
Kufta007
Posts: 4
Joined: 6. Feb 2021, 20:13

Re: Kernel Panic When Running VMs

Post by Kufta007 »

fth0, I actually forgot about setting the odd graphic setting maybe about 5 or 6 months ago. I know there was something broken that changing to that driver fixed.

I switched it back to VMSVGA as recommended and on both VMs the kernel panic is now resolved (I also had done some apt update && apt upgrade). Some odd behavior that now happens, and maybe was happening 5 months ago.
-After Grub and before the Kali bootsplash starts the error message

Code: Select all

[drm:vmw_host_log [vmwgfx]] *ERROR* Failed to send host log message.
appears twice on the screen very briefly. Not a real big deal, but odd.
-Although set to full screen with a scale-factor of 2.0, the login screen doesn't take up the full screen. Same situation with the Grub screen. Also not a real problem, and I think it has a lot to do with my laptop screen being 4K.
-After entering in credentials, the whole screen goes black with only my cursor visible. I can "fix" this by hitting Ctrl+F to undo fullscreen, then Ctrl+F again to go fullscreen. This one drives me crazy, and it happens only if I've "started" the virtual machine. If I've done this Ctrl+F fix, I can restart as many times as I want and the problem won't return... until I shutdown and then go to "start" that VM again.

I confirmed that I'm running VirtualBox v6.1.16 in the Help>About, but oddly when I check for updates (file > "check for updates") it says I'm already running the most recent version of VirtualBox. What's going on here?

Aside from switching to VMSVGA, should 3D Acceleration be checked? It doesn't seem to make much difference either way, but I'm a fan of best practices.
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: Kernel Panic When Running VMs

Post by fth0 »

Kufta007 wrote:-After Grub and before the Kali bootsplash starts the error message

Code: Select all

[drm:vmw_host_log [vmwgfx]] *ERROR* Failed to send host log message.
appears twice on the screen very briefly. Not a real big deal, but odd.
You can ignore these error messages. They appear in every working setup and are well understood by some people, but nobody is bothered enough to fix them.
Kufta007 wrote:-After entering in credentials, the whole screen goes black with only my cursor visible. I can "fix" this by hitting Ctrl+F to undo fullscreen, then Ctrl+F again to go fullscreen.
This one is also known, but ... (see above).
Kufta007 wrote:I confirmed that I'm running VirtualBox v6.1.16 in the Help>About, but oddly when I check for updates (file > "check for updates") it says I'm already running the most recent version of VirtualBox. What's going on here?
Nobody has told the update server yet that it is allowed to deliver VirtualBox 6.1.18. This is typically done after some days or weeks, so that the early adopters can report potential major errors that slipped through the QA. I don't know why it's taking so long this time.
Kufta007 wrote:Aside from switching to VMSVGA, should 3D Acceleration be checked? It doesn't seem to make much difference either way, but I'm a fan of best practices.
There is no best practice on 3D Acceleration, it's rather a matter of taste. If you don't have any problems, I'd turn it on.
Kufta007
Posts: 4
Joined: 6. Feb 2021, 20:13

Re: Kernel Panic When Running VMs

Post by Kufta007 »

fth0, thanks for the help.

A few days on, and so far everything is still working. I should have taken better notes to determine exactly which item was the definitive fix, but between updating VirtualBox, changing the graphic driver to VMSVGA, and another apt update it's fixed :D

Fingers crossed that someday a hero comes along and slays the "black screen after login" bug, but the workaround is pretty easy.
Thanks again!
Post Reply