Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Launching VirtualBox VM causes host to freeze
View unanswered posts
View posts from last 24 hours
View posts from last 7 days

 
Reply to topic    Gentoo Forums Forum Index Desktop Environments
View previous topic :: View next topic  
Author Message
leonchik1976
Guru
Guru


Joined: 24 Jan 2010
Posts: 337

PostPosted: Fri Sep 01, 2023 6:49 pm    Post subject: Launching VirtualBox VM causes host to freeze Reply with quote

Hi, when i try to launch VM in VirtualBox, the host itself completely freezes. Tried to reinstall VirtualBox, reinstall virtualbox-modules - nothing helped.
In VBoxSVC.log i can see an error:

Failed to open "/dev/vboxdrvu", errno=13, rc=VERR_VM_DRIVER_NOT_ACCESSIBLE

though it exists:
$ ls -l /dev/vboxdrvu
crw------- 1 root root 10, 122 Sep 1 18:34 /dev/vboxdrvu

and also module is loaded:
$ lsmod | grep vbox
vboxnetflt 36864 0
vboxnetadp 24576 0
vboxdrv 626688 2 vboxnetadp,vboxnetflt

Exactly same issue on 2 different machines. what can i check to try to debug the issue?

also checked - my user in vboxusers group
Back to top
View user's profile Send private message
alamahant
Advocate
Advocate


Joined: 23 Mar 2019
Posts: 3916

PostPosted: Sun Sep 03, 2023 3:01 pm    Post subject: Reply with quote

Try
Code:

chown vboxusers:vboxusers /dev/vbox*

What is the output of
Code:

grep -r vbox /etc/udev/

_________________
:)
Back to top
View user's profile Send private message
leonchik1976
Guru
Guru


Joined: 24 Jan 2010
Posts: 337

PostPosted: Fri Sep 08, 2023 7:12 am    Post subject: Reply with quote

alamahant wrote:
Try
Code:

chown vboxusers:vboxusers /dev/vbox*

What is the output of
Code:

grep -r vbox /etc/udev/


it doesn't help, and after reboot it reverts back:
# ls -l /dev/vbox*
crw------- 1 root root 10, 123 Sep 8 10:00 /dev/vboxdrv
crw------- 1 root root 10, 122 Sep 8 10:00 /dev/vboxdrvu
crw------- 1 root root 10, 121 Sep 8 10:00 /dev/vboxnetctl


grep -r vbox /etc/udev/
returns nothing
Back to top
View user's profile Send private message
alamahant
Advocate
Advocate


Joined: 23 Mar 2019
Posts: 3916

PostPosted: Sun Sep 10, 2023 8:41 am    Post subject: Reply with quote

Try
Code:

chmod 666  /dev/vbox*


There should have been udev rules created for these devices.I wonder why they weren't.
According to vbox ebuild
Quote:

if use udev; then
local udevdir="$(get_udevdir)"
local udev_file="VBoxCreateUSBNode.sh"
local rules_file="10-virtualbox.rules"

insinto ${udevdir}
doins ${udev_file}
fowners root:vboxusers ${udevdir}/${udev_file}
fperms 0750 ${udevdir}/${udev_file}

insinto ${udevdir}/rules.d
sed "s@%UDEVDIR%@${udevdir}@" "${FILESDIR}"/${rules_file} \
> "${T}"/${rules_file} || die
doins "${T}"/${rules_file}
fi

Are you not using udev?
Is there any init script vbox-related in /etc/init.d
?
_________________
:)
Back to top
View user's profile Send private message
leonchik1976
Guru
Guru


Joined: 24 Jan 2010
Posts: 337

PostPosted: Sun Sep 10, 2023 9:20 am    Post subject: Reply with quote

alamahant wrote:
Try
Code:

chmod 666  /dev/vbox*


There should have been udev rules created for these devices.I wonder why they weren't.
According to vbox ebuild
Quote:

if use udev; then
local udevdir="$(get_udevdir)"
local udev_file="VBoxCreateUSBNode.sh"
local rules_file="10-virtualbox.rules"

insinto ${udevdir}
doins ${udev_file}
fowners root:vboxusers ${udevdir}/${udev_file}
fperms 0750 ${udevdir}/${udev_file}

insinto ${udevdir}/rules.d
sed "s@%UDEVDIR%@${udevdir}@" "${FILESDIR}"/${rules_file} \
> "${T}"/${rules_file} || die
doins "${T}"/${rules_file}
fi

Are you not using udev?
Is there any init script vbox-related in /etc/init.d
?


# ls -l /etc/init.d/vbox*
-rwxr-xr-x 1 root root 1137 Sep 8 10:18 /etc/init.d/vboxinit-5.2.1
-rwxr-xr-x 1 root root 646 Sep 8 09:36 /etc/init.d/vboxwebsrv


firstly - i changed permissions and ownership:
crw-rw-rw- 1 root vboxusers 10, 123 Sep 10 08:38 /dev/vboxdrv
crw-rw-rw- 1 root vboxusers 10, 122 Sep 10 08:38 /dev/vboxdrvu
crw-rw-rw- 1 root vboxusers 10, 121 Sep 10 08:38 /dev/vboxnetctl


then - i started VirtualBox - i don't see anymore permissions related errors.
After creating some dummy VM (without any configuration - just create VM, without changing anything) - i see this in log:
ERROR [COM]: aRC=VBOX_E_INVALID_VM_STATE (0x80bb0002) aIID={300763af-5d6b-46e6-aa96-273eac15538a} aComponent={MachineWrap} aText={The machine is not mutable (state is PoweredOff)}, preserve=false aResultDetail=0
ERROR [COM]: aRC=VBOX_E_OBJECT_NOT_FOUND (0x80bb0001) aIID={5bfd8965-b81b-469f-8649-f717ce97a5d5} aComponent={NvramStoreWrap} aText={The UEFI NVRAM file is not existing for this machine.}, preserve=false aResultDetail=0

The moment i started this VM - the whole host freezes, and i had to hard reset it. After reboot - all permissions reverted back, and no logs were added to VBoxSVC.log
Back to top
View user's profile Send private message
leonchik1976
Guru
Guru


Joined: 24 Jan 2010
Posts: 337

PostPosted: Sun Sep 10, 2023 9:21 am    Post subject: Reply with quote

VirtualBox built with USE=udev

# emerge app-emulation/virtualbox -pvq
[ebuild R ] app-emulation/virtualbox-7.0.10-r1 USE="alsa dbus doc dtrace gui java lvm nls opengl pam pulseaudio python sdk sdl udev vboxwebsrv vde vnc -debug (-pch)" PYTHON_SINGLE_TARGET="python3_11 -python3_10"
Back to top
View user's profile Send private message
Orvas
n00b
n00b


Joined: 03 Oct 2011
Posts: 14

PostPosted: Sun Jul 14, 2024 6:38 pm    Post subject: Reply with quote

Hello leonchik1976,

have you found a solution for this problem? I have this problem, too, but don't know the reason for it. For many years VirtualBox worked without any problem.

Thanks and best regards,
Manfred
Back to top
View user's profile Send private message
leonchik1976
Guru
Guru


Joined: 24 Jan 2010
Posts: 337

PostPosted: Sun Jul 14, 2024 6:39 pm    Post subject: Reply with quote

Orvas wrote:
Hello leonchik1976,

have you found a solution for this problem? I have this problem, too, but don't know the reason for it. For many years VirtualBox worked without any problem.

Thanks and best regards,
Manfred


nope, same issue on several machines
Back to top
View user's profile Send private message
Hu
Administrator
Administrator


Joined: 06 Mar 2007
Posts: 22619

PostPosted: Sun Jul 14, 2024 7:03 pm    Post subject: Reply with quote

Does the kernel panic to cause this freeze? Is there anything written to the kernel's console? Beware that a sufficiently hard freeze may kill syslog before it can write to a file, so you need to read the data off the console.
Back to top
View user's profile Send private message
leonchik1976
Guru
Guru


Joined: 24 Jan 2010
Posts: 337

PostPosted: Tue Jul 16, 2024 3:04 pm    Post subject: Reply with quote

Hu wrote:
Does the kernel panic to cause this freeze? Is there anything written to the kernel's console? Beware that a sufficiently hard freeze may kill syslog before it can write to a file, so you need to read the data off the console.


the moment you start VM (any VM - just create any VM - even without changing it's parameter) - the system freezes completely.
same issue on 3 different intel machines
Back to top
View user's profile Send private message
sublogic
Apprentice
Apprentice


Joined: 21 Mar 2022
Posts: 269
Location: Pennsylvania, USA

PostPosted: Wed Jul 17, 2024 1:08 am    Post subject: Reply with quote

Can you start a VM from the VT1 text console ? (CTL-ALT-F1)
If it's a kernel panic it should vomit a dying message on the console.
Back to top
View user's profile Send private message
leonchik1976
Guru
Guru


Joined: 24 Jan 2010
Posts: 337

PostPosted: Mon Jul 22, 2024 5:12 pm    Post subject: Reply with quote

sublogic wrote:
Can you start a VM from the VT1 text console ? (CTL-ALT-F1)
If it's a kernel panic it should vomit a dying message on the console.


it prints Waiting for VM to power on .... and everything freezes
Back to top
View user's profile Send private message
Orvas
n00b
n00b


Joined: 03 Oct 2011
Posts: 14

PostPosted: Fri Aug 09, 2024 11:35 am    Post subject: Reply with quote

When starting a virtual machine, the PC freezes immediately. I've started "dmesg -w" in a terminal and took a picture with the smartphone and extracted the text with Google Lens. These five lines are the last I saw after starting the VM:

Code:
[289.283991] SUPROGipMap: fGetGipCpu=0x1b
[290.947884] vboxdrv: 00000000905680cb VMMRO.ro
[291.069773] vboxdrv: 00000000631ce46e VBoxDDR0.ro
[291.117369] VBoxNetFlt: attached to 'enp0s31f6' / 9c:5c:8e:71:94:be
[291.160945] device enp0s31f6 entered promiscuous mode
Back to top
View user's profile Send private message
sdz
n00b
n00b


Joined: 26 Sep 2011
Posts: 38

PostPosted: Sat Aug 10, 2024 5:57 pm    Post subject: Reply with quote

leonchik1976 wrote:
sublogic wrote:
Can you start a VM from the VT1 text console ? (CTL-ALT-F1)
If it's a kernel panic it should vomit a dying message on the console.


it prints Waiting for VM to power on .... and everything freezes


Try moving your VM to another internal drive. I encountered a similar issue, running a VirtualBox Win 11 VM on my Gentoo host PC. Win 11 runs fine, but Gentoo processes hang. I have to hold the power button to turn off my PC. My solution was moving the VirtualBox VM folder from my root partition (containing /home) to a second internal drive.

Note: This solution did not fix the same issue running a VMware Workstation Win 11 VM.

Details: [WORKAROUND] VirtualBox and VMware Workstation Both Hang PC
Back to top
View user's profile Send private message
leonchik1976
Guru
Guru


Joined: 24 Jan 2010
Posts: 337

PostPosted: Mon Aug 12, 2024 5:47 am    Post subject: Reply with quote

have same issue on 3 different machines
Back to top
View user's profile Send private message
Princess Nell
l33t
l33t


Joined: 15 Apr 2005
Posts: 925

PostPosted: Tue Aug 13, 2024 9:07 pm    Post subject: Reply with quote

Same setup as leonchik1976, no problems at all here.

Note udevdir:
Code:

/lib/udev/rules.d/10-virtualbox.rules


I found this https://bugs.gentoo.org/768297 and this https://forums.gentoo.org/viewtopic-p-8690935.html?sid=99d68bb6998eaf888e4056efb93b5471. Have you checked ownership of /dev (here: 755 root:root)?

What about the VBox.log file as per https://www.virtualbox.org/manual/ch12.html?
Back to top
View user's profile Send private message
Orvas
n00b
n00b


Joined: 03 Oct 2011
Posts: 14

PostPosted: Sun Sep 01, 2024 1:29 pm    Post subject: Reply with quote

Hello,

in the meantime I have found the reason for this problem in my case. I have used an old Nvidia GeForce GTX 970 graphics card with the proprietary Nvidia driver for several years, without having any problems! But in the meantime Nvidia has stopped the support for this card and I was not able to switch to an up-to-date kernel version. Because I wanted to switch from X to Wayland to use a different scaling factor for my two monitors, I have tried the Nouveau open source driver, but with this my PC crashed so heavily that even the hardware reset button was not able to restart the system (reproducible, I have absolutely no idea how this is possible!). At this point I have removed the graphics card and switched to the onboard graphics of my Intel Skylake CPU, and until today I didn't have a single crash. And of course, VirtualBox is running again as if nothing had ever happened.

tl;dr: Without my old Nvidia graphics card my system with VirtualBox is absolutely stable again.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Desktop Environments All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum