Virtualbox will not work with  [Solved]

For issues with MX that has been modified from the initial install. Example: adding packages that then cause issues.
Message
Author
User avatar
Sorzo
Posts: 3
Joined: Wed Jan 25, 2023 10:47 am

Virtualbox will not work with

#1 Post by Sorzo »

Hey everyone, yesterday I installed Linux mx 6.1.7-x64v3-xanmod1 kernel. And so far the only issue I am having is my VirtualBox no longer functions. Not being a complete noob and fixing quite a few problems on my own through google I began searching forums and googling. So far I have not found a solution to the problem. This is my primary error:

$ virtualbox
WARNING: The character device /dev/vboxdrv does not exist.
Please install the virtualbox-dkms package and the appropriate
headers, most likely linux-headers-xanmod1.

You will not be able to start VMs until this problem is fixed.

I have my windows 11 VM I definitely need access too.

When I attempt to install the dkms package it fails with.

"ading new virtualbox-7.0.4 DKMS files...
Building for 6.1.7-x64v3-xanmod1 6.1.8-x64v3-xanmod1
Building initial module for 6.1.7-x64v3-xanmod1
Error! Bad return status for module build on kernel: 6.1.7-x64v3-xanmod1 (x86_64)
Consult /var/lib/dkms/virtualbox/7.0.4/build/make.log for more information.
dpkg: error processing package virtualbox-dkms (--configure):
installed virtualbox-dkms package post-installation script subprocess returned error exit status 10
dpkg: dependency problems prevent configuration of virtualbox:
virtualbox depends on virtualbox-dkms (>= 7.0.4-dfsg-4~mx21+1) | virtualbox-source (>= 7.0.4-dfsg-4~mx21+1) | virtualbox-modules; however:
Package virtualbox-dkms is not configured yet.
Package virtualbox-source is not installed.
Package virtualbox-modules is not installed.
Package virtualbox-dkms which provides virtualbox-modules is not configured yet.

dpkg: error processing package virtualbox (--configure):
dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of virtualbox-ext-pack:
virtualbox-ext-pack depends on virtualbox (<< 7.0.4-dfsg-z) | virtualbox-7.0; however:
Package virtualbox is not configured yet.
Package virtualbox-7.0 is not installed.
virtualbox-ext-pack depends on virtualbox (>= 7.0.4-dfsg-0~) | virtualbox-7.0; however:
Package virtualbox is not configured yet.
Package virtualbox-7.0 is not installed.

dpkg: error processing package virtualbox-ext-pack (--configure):
dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of virtualbox-qt:
virtualbox-qt depends on virtualbox (= 7.0.4-dfsg-4~mx21+1); however:
Package virtualbox is not configured yet.

dpkg: error processing package virtualbox-qt (--configure):
dependency problems - leaving unconfigured
Errors were encountered while processing:
virtualbox-dkms
virtualbox
virtualbox-ext-pack
virtualbox-qt
E: Sub-process /usr/bin/dpkg returned an error code (1)
"
When I try to reinstall everything I get.

"Setting up virtualbox-dkms (7.0.4-dfsg-4~mx21+1) ...
Removing old virtualbox-7.0.4 DKMS files...
Deleting module virtualbox-7.0.4 completely from the DKMS tree.
Loading new virtualbox-7.0.4 DKMS files...
Building for 6.1.7-x64v3-xanmod1 6.1.8-x64v3-xanmod1
Building initial module for 6.1.7-x64v3-xanmod1
Error! Bad return status for module build on kernel: 6.1.7-x64v3-xanmod1 (x86_64)
Consult /var/lib/dkms/virtualbox/7.0.4/build/make.log for more information."

This is the make.log file.

"DKMS make.log for virtualbox-7.0.4 for kernel 6.1.7-x64v3-xanmod1 (x86_64)
Wed 25 Jan 2023 11:08:37 AM EST
make: Entering directory '/usr/src/linux-headers-6.1.7-x64v3-xanmod1'
warning: the compiler differs from the one used to build the kernel
The kernel was built by: gcc-12 (Debian 12.2.0-9) 12.2.0
You are using: gcc (Debian 10.2.1-6) 10.2.1 20210110
CC [M] /var/lib/dkms/virtualbox/7.0.4/build/vboxdrv/linux/SUPDrv-linux.o
CC [M] /var/lib/dkms/virtualbox/7.0.4/build/vboxdrv/SUPDrv.o
CC [M] /var/lib/dkms/virtualbox/7.0.4/build/vboxdrv/SUPDrvGip.o
CC [M] /var/lib/dkms/virtualbox/7.0.4/build/vboxdrv/SUPDrvSem.o
CC [M] /var/lib/dkms/virtualbox/7.0.4/build/vboxdrv/SUPDrvTracer.o
CC [M] /var/lib/dkms/virtualbox/7.0.4/build/vboxdrv/SUPLibAll.o
CC [M] /var/lib/dkms/virtualbox/7.0.4/build/vboxdrv/common/string/strformatrt.o
gcc: error: unrecognized command-line option ‘-mharden-sls=all’
CC [M] /var/lib/dkms/virtualbox/7.0.4/build/vboxdrv/combined-agnostic1.o
make[2]: *** [scripts/Makefile.build:250: /var/lib/dkms/virtualbox/7.0.4/build/vboxdrv/linux/SUPDrv-linux.o] Error 1
make[2]: *** Waiting for unfinished jobs....
gcc: error: unrecognized command-line option ‘-mharden-sls=all’
make[2]: *** [scripts/Makefile.build:250: /var/lib/dkms/virtualbox/7.0.4/build/vboxdrv/SUPDrv.o] Error 1
gcc: error: unrecognized command-line option ‘-mharden-sls=all’
make[2]: *** [scripts/Makefile.build:250: /var/lib/dkms/virtualbox/7.0.4/build/vboxdrv/SUPDrvGip.o] Error 1
gcc: error: unrecognized command-line option ‘-mharden-sls=all’
make[2]: *** [scripts/Makefile.build:250: /var/lib/dkms/virtualbox/7.0.4/build/vboxdrv/SUPDrvSem.o] Error 1
gcc: error: unrecognized command-line option ‘-mharden-sls=all’
make[2]: *** [scripts/Makefile.build:250: /var/lib/dkms/virtualbox/7.0.4/build/vboxdrv/SUPDrvTracer.o] Error 1
gcc: error: unrecognized command-line option ‘-mharden-sls=all’
make[2]: *** [scripts/Makefile.build:250: /var/lib/dkms/virtualbox/7.0.4/build/vboxdrv/SUPLibAll.o] Error 1
gcc: error: unrecognized command-line option ‘-mharden-sls=all’
make[2]: *** [scripts/Makefile.build:250: /var/lib/dkms/virtualbox/7.0.4/build/vboxdrv/common/string/strformatrt.o] Error 1
gcc: error: unrecognized command-line option ‘-mharden-sls=all’
make[2]: *** [scripts/Makefile.build:250: /var/lib/dkms/virtualbox/7.0.4/build/vboxdrv/combined-agnostic1.o] Error 1
make[1]: *** [scripts/Makefile.build:500: /var/lib/dkms/virtualbox/7.0.4/build/vboxdrv] Error 2
make: *** [Makefile:2135: /var/lib/dkms/virtualbox/7.0.4/build] Error 2
make: Leaving directory '/usr/src/linux-headers-6.1.7-x64v3-xanmod1' "

This is my system:

Operating System: Debian GNU/Linux 11
KDE Plasma Version: 5.20.5
KDE Frameworks Version: 5.78.0
Qt Version: 5.15.2
Kernel Version: 6.1.7-x64v3-xanmod1
OS Type: 64-bit
Processors: 16 × 11th Gen Intel® Core™ i7-11700 @ 2.50GHz
Memory: 31.0 GiB of RAM
Graphics Processor: AMD Radeon RX 6600 XT

A work around was noted it said you can access your vms through KVM/QEMU. Well I can't install that due to this error.
"PackageKit error: PackageKit::Transaction::ErrorCannotRemoveSystemPackage "Cannot remove system package" "WARNING: You are trying to remove the following essential packages: sysvinit-core (due to init) "
I assume KVM requires system d to run.

Any suggestions? I have tried reinstalling the headers.

User avatar
siamhie
Global Moderator
Posts: 3384
Joined: Fri Aug 20, 2021 5:45 pm

Re: Virtualbox will not work with

#2 Post by siamhie »

Try the latest kernels in the MX repos. I found that xanmod's latest kernels are built with GCC12 and VB is built with GCC10.
This is my Fluxbox . There are many others like it, but this one is mine. My Fluxbox is my best friend. It is my life.
I must master it as I must master my life. Without me, my Fluxbox is useless. Without my Fluxbox, I am useless.

User avatar
Sorzo
Posts: 3
Joined: Wed Jan 25, 2023 10:47 am

Re: Virtualbox will not work with

#3 Post by Sorzo »

I noticed that difference and I was wondering if that was it. Quick question about that though. Do you mean abandon the xanmod all together?

User avatar
siamhie
Global Moderator
Posts: 3384
Joined: Fri Aug 20, 2021 5:45 pm

Re: Virtualbox will not work with  [Solved]

#4 Post by siamhie »

Boot with the Xanmod kernel whenever you don't need to use your vm. The latest Liquorix kernel works with virtualbox also.
This is my Fluxbox . There are many others like it, but this one is mine. My Fluxbox is my best friend. It is my life.
I must master it as I must master my life. Without me, my Fluxbox is useless. Without my Fluxbox, I am useless.

User avatar
Sorzo
Posts: 3
Joined: Wed Jan 25, 2023 10:47 am

Re: Virtualbox will not work with

#5 Post by Sorzo »

Moved over to Liquorix Kernel and everything is fine. I just wanted a kernel that was a little more gaming friendly.

ropcku
Posts: 9
Joined: Sun Feb 20, 2022 12:35 pm

Re: Virtualbox will not work with

#6 Post by ropcku »

Right. Thats why I moved to Mint after 3 years hard usage MX xfce as a daily driver. It appeared after kernel 5.10.13. Until then VB was workin perfectly. There are 3 working solutions that I found after several clean installs of MX 21 xfce on one and the same hardware:
1. Install regular version of MX 21.X with signed debian kernel 5.10.x.. Then enable AHS repos and upgrade. Result is you receive additional video drivers and VB works again. Then decide to disable AHS repo or leave it active. If it is active you just will receive more often updates.
2. After installing regular MX 21.X upgrade kernel to AHS unsigned kernel and VB works fine. Problem is this new kernel is not going to upgrade automaticaly when you don't use MX AHS version.
3. Just install MX 21.X AHS and VB works.
This VB problem ocures only in MX but not in Debian, Zorin or Mint with same kernel version!!!
Cheers.

User avatar
Göran
Posts: 5
Joined: Sun May 23, 2021 1:46 pm

Re: Virtualbox will not work with

#7 Post by Göran »

I use MX AHS Version / AV Linux with liquorix kernel ( 6.2.9.2) and never had trouble with virtualbox (only with version 7.0x VB - switched back). I run an a mac OS machine, a windows machine, and a sid debian test machine in VB - works like it should. So as you said Sorzo: with Liquorix kernel you should be fine

Post Reply

Return to “MX Modified”