Please help with virtualbox 7 install on ubuntu 22.04

Discussions related to using VirtualBox on Linux hosts.
Post Reply
papi0506
Posts: 6
Joined: 7. Mar 2024, 07:36

Please help with virtualbox 7 install on ubuntu 22.04

Post by papi0506 »

Thanks in advance for anyone willing to help on this one. If you need any logs or anything just ask.

Tried every article I could find to complete this install. Had 7.0 installed at one point it broke (ubuntu upgrade or something), installed 6 and vms ran fine for a while till that install just died. Literally left these installs on the machine came back a few days later and dead.

Tried to to install 7 again and I keep getting the same error about a vboxnetflt. I run sudo /sbin/vboxconfig and no go. Really not trying to disable secure boot on this box if it can be helped. If it can't then I guess some suggestions for a different app for VMs would also be helpful lol.

...........................................
dreday@TheKey:~/Downloads$ sudo /sbin/vboxconfig
vboxdrv .sh: Stopping VirtualBox services.
vboxdrv .sh: failed: Cannot unload module vboxnetflt.

There were problems setting up VirtualBox. To re-start the set-up process, run
/sbin/vboxconfig
as root. If your system is using EFI Secure Boot you may need to sign the
kernel modules (vboxdrv, vboxnetflt, vboxnetadp, vboxpci) before you can load
them. Please see your Linux system's documentation for more information.



I followed the below steps:

Code: Select all

-curl <link i was told to remove> | gpg --dearmor > oracle_vbox_2016.gpg
-curl <link i was told to remove> | gpg --dearmor > oracle_vbox.gpg
-sudo install -o root -g root -m 644 oracle_vbox_2016.gpg /etc/apt/trusted.gpg.d/
-sudo install -o root -g root -m 644 oracle_vbox.gpg /etc/apt/trusted.gpg.d/
-echo "deb [arch=amd64] http://download.virtualbox<link i was told to remove>/virtualbox/debian $(lsb_release -sc) contrib" | sudo tee /etc/apt/sources.list.d/virtualbox.list
-sudo apt-get update
-sudo apt install linux-headers-$(uname -r) dkms
-sudo apt install virtualbox-7.0 -y
papi0506
Posts: 6
Joined: 7. Mar 2024, 07:36

Re: Please help with virtualbox 7 install on ubuntu 22.04

Post by papi0506 »

Hey thanks for the response. Tried this but I already have these on the machine it looks like.

Code: Select all

Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
linux-generic-hwe-22.04 is already the newest version (6.5.0.21.21~22.04.11).
linux-generic-hwe-22.04 set to manually installed.
The following packages were automatically installed and are no longer required:
  libgsoap-2.8.117 liblzf1
Use 'sudo apt autoremove' to remove them.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

Code: Select all

dreday@TheKey:~$ sudo apt install g++-12 gcc-12
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
gcc-12 is already the newest version (12.3.0-1ubuntu1~22.04).
g++-12 is already the newest version (12.3.0-1ubuntu1~22.04).
The following packages were automatically installed and are no longer required:
  libgsoap-2.8.117 liblzf1
Use 'sudo apt autoremove' to remove them.
0 upgraded, 0 newly installed, 0 to remove and 3 not upgraded.
But what's odd when checking the version of gcc it sasy 11.4? Could that be the issue?

Code: Select all

dreday@TheKey:~$ gcc --version
gcc (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0
Copyright (C) 2021 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE
papi0506
Posts: 6
Joined: 7. Mar 2024, 07:36

Re: Please help with virtualbox 7 install on ubuntu 22.04

Post by papi0506 »

Also, hope this helps, this is the error code when trying to start a vm:

Code: Select all

RTR3InitEx failed with rc=-1912 (fRtFlags=0x10000) (rc=-1912)

The VirtualBox kernel modules do not match this version of VirtualBox. The installation of VirtualBox was apparently not successful. Executing

'/sbin/vboxconfig'

may correct this. Make sure that you are not mixing builds of VirtualBox from different sources.

where: supR3HardenedMainInitRuntime what: 4 VERR_VM_DRIVER_VERSION_MISMATCH (-1912) - The installed support driver doesn't match the version of the user. 
papi0506
Posts: 6
Joined: 7. Mar 2024, 07:36

Re: Please help with virtualbox 7 install on ubuntu 22.04

Post by papi0506 »

Looks like a lot of mismatched components from updates and various installs. If anyone could please help I'd greatly appreciate it. I've tried multiple times to remove and purge the installs and start fresh but this has not worked. The most recent attempts produced the following errors.

Code: Select all

The VMMR0.r0 module version does not match VBoxVMM.dll/so/dylib. If you just upgraded VirtualBox, please terminate all VMs and make sure that neither VBoxNetDHCP nor VBoxNetNAT is running. Then try again. If this error persists, try re-installing VirtualBox. (VERR_VMM_R0_VERSION_MISMATCH).
I'd like to use virtualbox 7, but at this point I'd be happy to use anything. This is what "dpkg --list 'virtualbox*'" shows

Code: Select all

Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name                           Version                       Architecture Description
+++-==============================-=============================-============-============================================================
ii  virtualbox                     6.1.50-dfsg-1~ubuntu1.22.04.1 amd64        x86 virtualization solution - base binaries
un  virtualbox-2.0                 <none>                        <none>       (no description available)
un  virtualbox-2.1                 <none>                        <none>       (no description available)
un  virtualbox-2.2                 <none>                        <none>       (no description available)
un  virtualbox-3.0                 <none>                        <none>       (no description available)
un  virtualbox-3.1                 <none>                        <none>       (no description available)
un  virtualbox-3.2                 <none>                        <none>       (no description available)
un  virtualbox-4.0                 <none>                        <none>       (no description available)
un  virtualbox-4.1                 <none>                        <none>       (no description available)
un  virtualbox-4.2                 <none>                        <none>       (no description available)
un  virtualbox-4.3                 <none>                        <none>       (no description available)
un  virtualbox-5.0                 <none>                        <none>       (no description available)
un  virtualbox-5.1                 <none>                        <none>       (no description available)
un  virtualbox-5.2                 <none>                        <none>       (no description available)
un  virtualbox-6.0                 <none>                        <none>       (no description available)
rc  virtualbox-6.1                 6.1.50-161033~Ubuntu~jammy    amd64        Oracle VM VirtualBox
ii  virtualbox-dkms                6.1.50-dfsg-1~ubuntu1.22.04.1 amd64        x86 virtualization solution - kernel module sources for dkms
ii  virtualbox-ext-pack            6.1.50-1~ubuntu1.22.04.1      all          extra capabilities for VirtualBox, downloader.
un  virtualbox-guest-additions-iso <none>                        <none>       (no description available)
un  virtualbox-guest-modules       <none>                        <none>       (no description available)
un  virtualbox-modules             <none>                        <none>       (no description available)
un  virtualbox-ose                 <none>                        <none>       (no description available)
ii  virtualbox-qt                  6.1.50-dfsg-1~ubuntu1.22.04.1 amd64        x86 virtualization solution - Qt based user interface
un  virtualbox-source              <none>                        <none>       (no description available)
lines 16-29/29 (END)

fth0
Volunteer
Posts: 5678
Joined: 14. Feb 2019, 03:06
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Linux, Windows 10, ...
Location: Germany

Re: Please help with virtualbox 7 install on ubuntu 22.04

Post by fth0 »

The Oracle-provided VirtualBox only uses packages with names of the form virtualbox-x.y. All other packages are from Ubuntu. VirtualBox told you to "Make sure that you are not mixing builds of VirtualBox from different sources."
papi0506
Posts: 6
Joined: 7. Mar 2024, 07:36

Re: Please help with virtualbox 7 install on ubuntu 22.04

Post by papi0506 »

You are correct and it was not my intention to mix versions. I'm looking for advice on how to correct this.

Could someone please help with:
1. Removing anything Virtualbox related; from all sources
2. Check that nothing is left
3. Proper way to install VB 7


All steps and suggestions I've tried lead to this "VERR_VM_DRIVER_VERSION_MISMATCH (-1912)" error.

I've done the following to remove VirtualBox:
- sudo apt remove --purge virtualbox
- sudo apt autoremove

this did not remove the /opt/Virtualbox installation so I then ran:
- sudo /opt/Virtualbox/uninstall.sh

Once this completed, from Oracle's site I ran the "All distributions" .run file.
Then I ran:
- sudo /sbin/vboxconfig

These completed with no errors but when attempting to start a vm I am still met with the error:

Code: Select all

RTR3InitEx failed with rc=-1912 (fRtFlags=0x10000) (rc=-1912)

The VirtualBox kernel modules do not match this version of VirtualBox. The installation of VirtualBox was apparently not successful. Executing

'/sbin/vboxconfig'

may correct this. Make sure that you are not mixing builds of VirtualBox from different sources.

where: supR3HardenedMainInitRuntime what: 4 VERR_VM_DRIVER_VERSION_MISMATCH (-1912) - The installed support driver doesn't match the version of the user. [\code]


Again, I know I messed something up but at this point I'm just asking for help on fixing it. Any help on this request to fully remove sources of Virtualbox is greatly appreciated.
papi0506
Posts: 6
Joined: 7. Mar 2024, 07:36

Re: Please help with virtualbox 7 install on ubuntu 22.04

Post by papi0506 »

I was able to get this resolved.

dpkg --list 'virtualbox*' showed a lot of virtualbox entries. Had to do a a few sudo atp remove --purge 'virtualbox*' to get rid of them all. Not sure why remove had to be done multiple times, but after this I installed virtualbox 7 with the .run file and it it worked great.

There is still this final entry in the list but virtualbox is working.

Code: Select all

dpkg --list 'virtualbox*'
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name                     Version      Architecture Description
+++-========================-============-============-=================================
un  virtualbox-guest-modules <none>       <none>       (no description available)
Post Reply