Discussion:
[gentoo-user] virtualbox version mismatch
(too old to reply)
n952162
2021-02-04 11:40:02 UTC
Permalink
After updating, when I try to start my virtual machine (to update it), I
get this:

RTR3InitEx failed with rc=-1912 (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.

Has anybody run into this and found a solution? There's no
/sbin/vboxconfig, btw.
Michael
2021-02-04 11:50:03 UTC
Permalink
Post by n952162
After updating, when I try to start my virtual machine (to update it), I
RTR3InitEx failed with rc=-1912 (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
supR3HardenedMainInitRuntime what: 4 VERR_VM_DRIVER_VERSION_MISMATCH
(-1912) - The installed support driver doesn't match the version of
the user.
Has anybody run into this and found a solution? There's no
/sbin/vboxconfig, btw.
Did you run on the host, after you updated your VBox:

emerge -uaDv @modules-rebuild

You may need to modprobe the relevant modules if the above won't also load
them - can't recall if it does.
n952162
2021-02-04 15:10:02 UTC
Permalink
Post by Michael
Post by n952162
After updating, when I try to start my virtual machine (to update it), I
RTR3InitEx failed with rc=-1912 (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
supR3HardenedMainInitRuntime what: 4 VERR_VM_DRIVER_VERSION_MISMATCH
(-1912) - The installed support driver doesn't match the version of
the user.
Has anybody run into this and found a solution? There's no
/sbin/vboxconfig, btw.
You may need to modprobe the relevant modules if the above won't also load
them - can't recall if it does.
Thank you.

I tried that (using "module-rebuild") and it didn't make a change,
immediately.  Perhaps I need to reboot to get the change? I've got too
many things going on my desktop now, but I'll try that later today.
Peter Humphrey
2021-02-04 18:30:02 UTC
Permalink
Post by Michael
You may need to modprobe the relevant modules if the above won't also load
them - can't recall if it does.
I believe it only recompiles and installs them.
--
Regards,
Peter.
Matt Connell (Gmail)
2021-02-04 14:50:02 UTC
Permalink
The VirtualBox kernel modules do not match this version of VirtualBox.
Whenever you update app-emulation/virtualbox *or* your kernel version,
you need to update app-emulation/virtualbox-modules as well. The
versions of those two packages have to be lock-step, and the latter
needs to be rebuilt whenever your kernel version changes, or else the
previously-built modules will not load.
n952162
2021-02-04 15:10:01 UTC
Permalink
Post by Matt Connell (Gmail)
The VirtualBox kernel modules do not match this version of VirtualBox.
Whenever you update app-emulation/virtualbox *or* your kernel version,
you need to update app-emulation/virtualbox-modules as well. The
versions of those two packages have to be lock-step, and the latter
needs to be rebuilt whenever your kernel version changes, or else the
previously-built modules will not load.
Both are in my world file:

# grep virtualbox /var/lib/portage/world
app-emulation/virtualbox
app-emulation/virtualbox-modules
Jack
2021-02-04 16:20:01 UTC
Permalink
Post by n952162
Post by Matt Connell (Gmail)
The VirtualBox kernel modules do not match this version of VirtualBox.
Whenever you update app-emulation/virtualbox *or* your kernel version,
you need to update app-emulation/virtualbox-modules as well. The
versions of those two packages have to be lock-step, and the latter
needs to be rebuilt whenever your kernel version changes, or else the
previously-built modules will not load.
# grep virtualbox /var/lib/portage/world
app-emulation/virtualbox
app-emulation/virtualbox-modules
If you have already run virtualbox since the last reboot, you might need
to rmmod those modules to unload the older version. Then you can use
modprobe to load the new versions, without having to reboot.

Jack
n952162
2021-02-04 16:40:02 UTC
Permalink
Post by Jack
Post by n952162
Post by Matt Connell (Gmail)
The VirtualBox kernel modules do not match this version of VirtualBox.
Whenever you update app-emulation/virtualbox *or* your kernel version,
you need to update app-emulation/virtualbox-modules as well. The
versions of those two packages have to be lock-step, and the latter
needs to be rebuilt whenever your kernel version changes, or else the
previously-built modules will not load.
# grep virtualbox /var/lib/portage/world
app-emulation/virtualbox
app-emulation/virtualbox-modules
If you have already run virtualbox since the last reboot, you might
need to rmmod those modules to unload the older version. Then you can
use modprobe to load the new versions, without having to reboot.
Jack
Good tip, unfortunately, it didn't help:

$ sudo rmmod vboxnetadp vboxnetflt vboxdrv
Password:
$ lsmod | grep  vbox
$ startvm txm1.4-new
WARNING: The vboxdrv kernel module is not loaded. Either there is no module
         available for the current kernel (4.19.86-gentoo-x86_64) or it
failed to
         load. Please recompile the kernel module and install it by

           for m in vbox{drv,netadp,netflt}; do modprobe $m; done

         You will not be able to start VMs until this problem is fixed.
Waiting for VM "txm1.4-new" to power on...
VBoxManage: error: The virtual machine 'txm1.4-new' has terminated
unexpectedly during startup with exit code 1 (0x1)
VBoxManage: error: Details: code NS_ERROR_FAILURE (0x80004005),
component MachineWrap, interface IMachine

That takes away my confidence that it would work after a re-boot ...
Michael
2021-02-04 17:00:02 UTC
Permalink
Post by n952162
Post by Jack
Post by n952162
Post by Matt Connell (Gmail)
The VirtualBox kernel modules do not match this version of VirtualBox.
Whenever you update app-emulation/virtualbox *or* your kernel version,
you need to update app-emulation/virtualbox-modules as well. The
versions of those two packages have to be lock-step, and the latter
needs to be rebuilt whenever your kernel version changes, or else the
previously-built modules will not load.
# grep virtualbox /var/lib/portage/world
app-emulation/virtualbox
app-emulation/virtualbox-modules
If you have already run virtualbox since the last reboot, you might
need to rmmod those modules to unload the older version. Then you can
use modprobe to load the new versions, without having to reboot.
Jack
$ sudo rmmod vboxnetadp vboxnetflt vboxdrv
$ lsmod | grep vbox
$ startvm txm1.4-new
WARNING: The vboxdrv kernel module is not loaded. Either there is no module
available for the current kernel (4.19.86-gentoo-x86_64) or it
failed to
load. Please recompile the kernel module and install it by
for m in vbox{drv,netadp,netflt}; do modprobe $m; done
You will not be able to start VMs until this problem is fixed.
Waiting for VM "txm1.4-new" to power on...
VBoxManage: error: The virtual machine 'txm1.4-new' has terminated
unexpectedly during startup with exit code 1 (0x1)
VBoxManage: error: Details: code NS_ERROR_FAILURE (0x80004005),
component MachineWrap, interface IMachine
That takes away my confidence that it would work after a re-boot ...
Try again updating the modules, but use the correct syntax. The prefix "@"
denotes this is a predefined set and it will rebuild any packages which own
files in your /lib/modules:

emerge -1aDv @module-rebuild

I assume you have already installed 'app-emulation/virtualbox-modules' at
least once, if VBox was working OK until recently? Otherwise, emerge the
package 'app-emulation/virtualbox-modules' and modprobe each module keeping an
eye in dmesg to make sure they load without further errors.
n952162
2021-02-04 17:30:01 UTC
Permalink
Post by Michael
Post by n952162
Post by Jack
Post by n952162
Post by Matt Connell (Gmail)
The VirtualBox kernel modules do not match this version of VirtualBox.
Whenever you update app-emulation/virtualbox *or* your kernel version,
you need to update app-emulation/virtualbox-modules as well. The
versions of those two packages have to be lock-step, and the latter
needs to be rebuilt whenever your kernel version changes, or else the
previously-built modules will not load.
# grep virtualbox /var/lib/portage/world
app-emulation/virtualbox
app-emulation/virtualbox-modules
If you have already run virtualbox since the last reboot, you might
need to rmmod those modules to unload the older version. Then you can
use modprobe to load the new versions, without having to reboot.
Jack
$ sudo rmmod vboxnetadp vboxnetflt vboxdrv
$ lsmod | grep vbox
$ startvm txm1.4-new
WARNING: The vboxdrv kernel module is not loaded. Either there is no module
available for the current kernel (4.19.86-gentoo-x86_64) or it
failed to
load. Please recompile the kernel module and install it by
for m in vbox{drv,netadp,netflt}; do modprobe $m; done
You will not be able to start VMs until this problem is fixed.
Waiting for VM "txm1.4-new" to power on...
VBoxManage: error: The virtual machine 'txm1.4-new' has terminated
unexpectedly during startup with exit code 1 (0x1)
VBoxManage: error: Details: code NS_ERROR_FAILURE (0x80004005),
component MachineWrap, interface IMachine
That takes away my confidence that it would work after a re-boot ...
denotes this is a predefined set and it will rebuild any packages which own
???

Sorry, if I gave the impression, when I said:

/I tried that (using "module-rebuild")/

that I ran it without the "@".  I was just referring to the original
suggestion had "@module*s*-rebuild".

Did you run on the host, after you updated your VBox:

emerge -uaDv @modules-rebuild

In fact, it had emerged successfully:

...
[ebuild     U  ] sys-libs/timezone-data-2020e::gentoo
[2020d::gentoo] USE="nls -leaps-timezone -zic-slim" 659 KiB
[ebuild     U  ] app-eselect/eselect-pinentry-0.7.1::gentoo
[0.7::gentoo] 0 KiB
[ebuild     U  ] virtual/perl-Data-Dumper-2.174.0-r2::gentoo
[2.174.0-r1::gentoo] 0 KiB
[ebuild  NS    ] sys-kernel/gentoo-sources-5.4.92:5.4.92::gentoo
[4.19.86:4.19.86::gentoo, 5.4.38:5.4.38::gentoo,
5.4.66:5.4.66::gentoo, 5.4.80-r1:5.4.80-r1::gentoo] USE="-build
-experimental -symlink" 2938 KiB

Total: 4 packages (3 upgrades, 1 in new slot), Size of downloads:
3596 KiB
...

but failed to run.
Post by Michael
I assume you have already installed 'app-emulation/virtualbox-modules' at
least once, if VBox was working OK until recently? Otherwise, emerge the
package 'app-emulation/virtualbox-modules' and modprobe each module keeping an
eye in dmesg to make sure they load without further errors.
I followed this advice, to load each module (from equery files
virtualbox-modules) by hand, and that worked, for whatever reason that
it didn't work before after unloading the modules by hand, as
recommended by Jack ... they were not loaded when I just loaded them now
... ah - naturally, I loaded them with sudo, but didn't use sudo when I
ran startvm ... Hmmm.  We'll see how it starts up tomorrow ;-)
Michael
2021-02-04 17:40:02 UTC
Permalink
Post by n952162
/I tried that (using "module-rebuild")/
Oops! My apologies - I was running from apparently faulty memory! :-)
Post by n952162
...
[ebuild U ] sys-libs/timezone-data-2020e::gentoo
[2020d::gentoo] USE="nls -leaps-timezone -zic-slim" 659 KiB
[ebuild U ] app-eselect/eselect-pinentry-0.7.1::gentoo
[0.7::gentoo] 0 KiB
[ebuild U ] virtual/perl-Data-Dumper-2.174.0-r2::gentoo
[2.174.0-r1::gentoo] 0 KiB
[ebuild NS ] sys-kernel/gentoo-sources-5.4.92:5.4.92::gentoo
[4.19.86:4.19.86::gentoo, 5.4.38:5.4.38::gentoo,
5.4.66:5.4.66::gentoo, 5.4.80-r1:5.4.80-r1::gentoo] USE="-build
-experimental -symlink" 2938 KiB
3596 KiB
...
but failed to run.
Post by Michael
I assume you have already installed 'app-emulation/virtualbox-modules' at
least once, if VBox was working OK until recently? Otherwise, emerge the
package 'app-emulation/virtualbox-modules' and modprobe each module
keeping an eye in dmesg to make sure they load without further errors.
I followed this advice, to load each module (from equery files
virtualbox-modules) by hand, and that worked, for whatever reason that
it didn't work before after unloading the modules by hand, as
recommended by Jack ... they were not loaded when I just loaded them now
... ah - naturally, I loaded them with sudo, but didn't use sudo when I
ran startvm ... Hmmm. We'll see how it starts up tomorrow ;-)
OK, as long as the VBox modules were rebuilt after the new kernel symlink was
set under /usr/src/linux they should (re)load after a reboot.

Loading modules manually requires you run modprobe as root.

However, you do not need to start VBox as root, arguably you shouldn't. Just
make sure your user is a member of group "vboxusers":

# gpasswd -a <user> vboxusers

Logout/in as the named user before you can run VBox again.

More info you should need it can be found here:

https://wiki.gentoo.org/wiki/VirtualBox
n952162
2021-02-04 17:50:01 UTC
Permalink
Post by Michael
Post by n952162
/I tried that (using "module-rebuild")/
Oops! My apologies - I was running from apparently faulty memory! :-)
Post by n952162
...
[ebuild U ] sys-libs/timezone-data-2020e::gentoo
[2020d::gentoo] USE="nls -leaps-timezone -zic-slim" 659 KiB
[ebuild U ] app-eselect/eselect-pinentry-0.7.1::gentoo
[0.7::gentoo] 0 KiB
[ebuild U ] virtual/perl-Data-Dumper-2.174.0-r2::gentoo
[2.174.0-r1::gentoo] 0 KiB
[ebuild NS ] sys-kernel/gentoo-sources-5.4.92:5.4.92::gentoo
[4.19.86:4.19.86::gentoo, 5.4.38:5.4.38::gentoo,
5.4.66:5.4.66::gentoo, 5.4.80-r1:5.4.80-r1::gentoo] USE="-build
-experimental -symlink" 2938 KiB
3596 KiB
...
but failed to run.
Post by Michael
I assume you have already installed 'app-emulation/virtualbox-modules' at
least once, if VBox was working OK until recently? Otherwise, emerge the
package 'app-emulation/virtualbox-modules' and modprobe each module
keeping an eye in dmesg to make sure they load without further errors.
I followed this advice, to load each module (from equery files
virtualbox-modules) by hand, and that worked, for whatever reason that
it didn't work before after unloading the modules by hand, as
recommended by Jack ... they were not loaded when I just loaded them now
... ah - naturally, I loaded them with sudo, but didn't use sudo when I
ran startvm ... Hmmm. We'll see how it starts up tomorrow ;-)
OK, as long as the VBox modules were rebuilt after the new kernel symlink was
set under /usr/src/linux they should (re)load after a reboot.
Loading modules manually requires you run modprobe as root.
However, you do not need to start VBox as root, arguably you shouldn't. Just
# gpasswd -a <user> vboxusers
Logout/in as the named user before you can run VBox again.
https://wiki.gentoo.org/wiki/VirtualBox
Well, what's not exactly clear to me is whether the vbox modules are
preloaded at boot (i.e. as root) ... it must be that, because vboxmanage
doesn't run setuid:

$ ls -lL $(type -p vboxmanage)
-rwxr-x--- 1 root vboxusers 3570 Feb  3 02:50 /usr/bin/vboxmanage

So that was a mistaken assumption I'd had, that the modules would be
loaded on demand.  Too bad, actually.
Jack
2021-02-04 17:00:02 UTC
Permalink
Post by n952162
Post by Jack
Post by n952162
Post by Matt Connell (Gmail)
The VirtualBox kernel modules do not match this version of
VirtualBox.
Whenever you update app-emulation/virtualbox *or* your kernel version,
you need to update app-emulation/virtualbox-modules as well. The
versions of those two packages have to be lock-step, and the latter
needs to be rebuilt whenever your kernel version changes, or else the
previously-built modules will not load.
# grep virtualbox /var/lib/portage/world
app-emulation/virtualbox
app-emulation/virtualbox-modules
If you have already run virtualbox since the last reboot, you might
need to rmmod those modules to unload the older version. Then you can
use modprobe to load the new versions, without having to reboot.
Jack
$ sudo rmmod vboxnetadp vboxnetflt vboxdrv
$ lsmod | grep  vbox
$ startvm txm1.4-new
WARNING: The vboxdrv kernel module is not loaded. Either there is no module
         available for the current kernel (4.19.86-gentoo-x86_64) or it
failed to
         load. Please recompile the kernel module and install it by
           for m in vbox{drv,netadp,netflt}; do modprobe $m; done
         You will not be able to start VMs until this problem is fixed.
Waiting for VM "txm1.4-new" to power on...
VBoxManage: error: The virtual machine 'txm1.4-new' has terminated
unexpectedly during startup with exit code 1 (0x1)
VBoxManage: error: Details: code NS_ERROR_FAILURE (0x80004005),
component MachineWrap, interface IMachine
That takes away my confidence that it would work after a re-boot ...
You did an rmmod, but I don't see that you loaded the new modules - the
modprobe part.  It is possible that they do not get loaded automatically
on demand, but only at boot time, so a manual load should work.
n952162
2021-02-04 20:50:01 UTC
Permalink
Post by Jack
Post by n952162
Post by Jack
Post by n952162
Post by Matt Connell (Gmail)
The VirtualBox kernel modules do not match this version of VirtualBox.
Whenever you update app-emulation/virtualbox *or* your kernel version,
you need to update app-emulation/virtualbox-modules as well. The
versions of those two packages have to be lock-step, and the latter
needs to be rebuilt whenever your kernel version changes, or else the
previously-built modules will not load.
# grep virtualbox /var/lib/portage/world
app-emulation/virtualbox
app-emulation/virtualbox-modules
If you have already run virtualbox since the last reboot, you might
need to rmmod those modules to unload the older version. Then you can
use modprobe to load the new versions, without having to reboot.
Jack
$ sudo rmmod vboxnetadp vboxnetflt vboxdrv
$ lsmod | grep  vbox
$ startvm txm1.4-new
WARNING: The vboxdrv kernel module is not loaded. Either there is no module
         available for the current kernel (4.19.86-gentoo-x86_64) or it
failed to
         load. Please recompile the kernel module and install it by
           for m in vbox{drv,netadp,netflt}; do modprobe $m; done
         You will not be able to start VMs until this problem is fixed.
Waiting for VM "txm1.4-new" to power on...
VBoxManage: error: The virtual machine 'txm1.4-new' has terminated
unexpectedly during startup with exit code 1 (0x1)
VBoxManage: error: Details: code NS_ERROR_FAILURE (0x80004005),
component MachineWrap, interface IMachine
That takes away my confidence that it would work after a re-boot ...
You did an rmmod, but I don't see that you loaded the new modules -
the modprobe part.  It is possible that they do not get loaded
automatically on demand, but only at boot time, so a manual load
should work.
Yeah, I confess, I saw the rmmod and that light the bulb and I rushed of
to try that ... without really thinking about the second half ... I
somehow had this impression they'd be demand loaded.

Neil Bothwick
2021-02-04 17:00:02 UTC
Permalink
Post by n952162
WARNING: The vboxdrv kernel module is not loaded. Either there is no
module available for the current kernel (4.19.86-gentoo-x86_64) or it
failed to
         load. Please recompile the kernel module and install it by
           for m in vbox{drv,netadp,netflt}; do modprobe $m; done
Did you do this?

Presence in your world file is not relevant and you are not changing
versions so -u won't pick them up.
--
Neil Bothwick

"Energize!" said Picard and the pink bunny appeared...
Continue reading on narkive:
Loading...