- Investigating generic problems with the Linux Guest Additions
- Guest drivers
- Overview
- Driver installation
- Basic checks
- Пакет: virtualbox-dkms (7.0.8-dfsg-2) [contrib]
- x86 virtualization solution — kernel module sources for dkms
- Другие пакеты, относящиеся к virtualbox-dkms
- Загрузка virtualbox-dkms
- How to fix and prevent VirtualBox Kernel driver not installed
Investigating generic problems with the Linux Guest Additions
Feedback about this page and suggestions for improvements welcome on the vbox-dev mailing list!
Guest drivers
Overview
The core part, so to speak, of the Linux Guest Additions are the guest kernel drivers. When there are problems with the Guest Additions, the first thing to check is whether the drivers are correctly installed. There are three different drivers:
- The main driver, vboxguest , provides a generic communication channel («HGCM», host-guest communication mechanism) between various services which can run on the guest (e.g. shared folders, shared clipboard, drag and drop) and matching services on the host, as well as providing a few ad-hoc services itself. It also includes an input driver which lets the host and the guest share a pointer. This works by pretending that the guest system has a touch screen which is «touched» in the right location whenever the host pointer moves over the guest window.
- The shared folder driver vboxsf provides shared folder functionality to the guest. It communicates with the host shared folder service through the vboxguest driver.
- The vboxvideo graphics driver drives the guest video hardware emulation. It does not depend on other drivers, programs the emulated hardware directly and is not expected to be running on systems with X.Org servers older than and including 1.16, as they are not compatible with it and use special drivers, or on systems with Linux kernels older than version 3.11.
The Guest Additions are notably not involved in keyboard input, USB and networking. All of these use normal Linux drivers in the guest kernel which drive the emulated guest hardware.
Some distributions actually come with Guest Additions installed, though generally not the most recent version. The VirtualBox team can usually not give much help with pre-installed Guest Additions (though the distribution should be able to), so our instructions for installation below include steps to remove distribution Guest Additions when these are known.
Driver installation
The kernel drivers are installed on the guest in source code form — readable text which is the ingredients of computer software. They are automatically transformed into usable software («built») after installation, as every Linux kernel needs slightly different drivers. When the kernel is upgraded this needs to be done again as the old drivers will not match the new kernel. When possible (when we can detect the upgrade in time) this is done automatically when the new kernel is installed. If not, it will be attempted when the new kernel is first used, but in that case not all services may start correctly the first time. (Note to self: could the services just wait a bit and try again later if the kernel driver is not there when they start?) If this fails too, the user will have to find out why and trigger the build manually.
Before installing the Guest Additions, many Linux guest systems need the right software to be installed to build the drivers. Most Ubuntu systems have that software installed automatically. Here are some commands to do it on other systems. They should be run as root or using sudo, and you should restart the guest after they have finished. If you are using any guest other than a standard version of the following list then you will have to understand and solve this yourself. (Technical note: VirtualBox does not use dkms, but installing it also installs the software needed to build the drivers.)
- Debian, Ubuntu, Mint and similar: «apt-get update», «apt-get upgrade», «apt-get install dkms»
- Fedora, Redhat and similar: «yum update», «yum install gcc make perl kernel-devel» (replace «kernel-devel» appropriately if you installed a different kernel; replace «yum» with «dnf» for Fedora 22 and later)
- SUSE and OpenSUSE: «zypper refresh», «zypper update», «zypper install gcc make kernel-devel», «zypper remove virtualbox*» (replace «kernel-devel» appropriately if you installed a different kernel)
- Mageia, Rosa, OpenMandriva: «urpmi.update -a», «urpmi —auto-select», «urpmi dkms»
Basic checks
These checks assume that you have installed the Guest Additions on your guest, and that the installation was successful as far as you can tell.
- To check which version of the Guest Additions are installed, execute modinfo vboxguest . The user-space tools ( VBoxClient , VBoxService , VBoxControl ) all have —version options to check that those versions match, though at this time (5.1 series) VBoxService only answers if the drivers are loaded.
- To check whether the drivers are basically working on a given Linux guest at a given time, execute lsmod | grep vbox in a command terminal on the guest system. This will list the drivers which are working, but does not rule out more subtle problems in the drivers.
- If the drivers are not basically working, try to start them with the command /sbin/rcvboxadd start run as root or using sudo. This may provide information about why they are not working.
- The most likely reason for them not to work is that they could not be built. Try installing the build tools as described above (or investigate what is different with your particular guest) and run /sbin/rcvboxadd setup as root or using sudo
- Take a look at all log files starting with vbox or VBox in /var/log on the guest system.
Пакет: virtualbox-dkms (7.0.8-dfsg-2) [contrib]
x86 virtualization solution — kernel module sources for dkms
VirtualBox is a free x86 virtualization solution allowing a wide range of x86 operating systems such as Windows, DOS, BSD or Linux to run on a Linux system.
This package provides the source code for the virtualbox kernel module to be build with dkms. Kernel sources or headers are required to compile this module.
Теги: Системное администрирование: Ядро или модули, Виртуализация, Разработка программного обеспечения: Разработка на C, devel::lang:python, devel::library, Реализовано на: C, implemented-in::python, role::devel-lib, Роль: Исходный код, Комплект приложений: OpenStack, Class of system: system::cloud, system::virtual, Цель: Драйвер аппаратуры
Другие пакеты, относящиеся к virtualbox-dkms
- зависимости
- рекомендации
- предложения
- enhances
- dep: dkms (>= 2.1.0.0) Dynamic Kernel Module System (DKMS)
- rec: virtualbox (>= 7.0.8-dfsg-2) x86 virtualization solution — base binaries
Загрузка virtualbox-dkms
Архитектура | Размер пакета | В установленном виде | Файлы |
---|---|---|---|
amd64 | 720,3 Кб | 5 986,0 Кб | [список файлов] |
Эта страница также доступна на следующих языках (Как установить язык по умолчанию):
Чтобы сообщить о проблеме, связанной с веб-сайтом, отправьте сообщение (на английском) в список рассылки debian-www@lists.debian.org. Прочую контактную информацию см. на странице Debian Как с нами связаться.
Авторские права © 1997 — 2023 SPI Inc.; См. условия лицензии. Debian это торговый знак компании SPI Inc. Об этом сайте.
How to fix and prevent VirtualBox Kernel driver not installed
It seems this is caused by a kernel update. I actually wasn’t aware that Ubuntu is doing automatic kernel updates. The log /var/log/dpkg.log shows that kernel update was going on right before problems started. sudo dpkg —list | grep linux-image shows images lines with many 4.8, 4.10 and 4.13 versions.
[user:~] $ uname -a Linux io 4.13.0-26-generic #29~16.04.2-Ubuntu SMP Tue Jan 9 22:00:44 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux
[root:~] # /sbin/vboxconfig vboxdrv.sh: Stopping VirtualBox services. depmod: ERROR: could not open directory /lib/modules/4.10.0-27-generic: No such file or directory depmod: FATAL: could not search modules: No such file or directory depmod: ERROR: could not open directory /lib/modules/4.10.0-28-generic: No such file or directory depmod: FATAL: could not search modules: No such file or directory depmod: ERROR: could not open directory /lib/modules/4.10.0-30-generic: No such file or directory depmod: FATAL: could not search modules: No such file or directory depmod: ERROR: could not open directory /lib/modules/4.10.0-32-generic: No such file or directory depmod: FATAL: could not search modules: No such file or directory depmod: ERROR: could not open directory /lib/modules/4.10.0-33-generic: No such file or directory depmod: FATAL: could not search modules: No such file or directory depmod: ERROR: could not open directory /lib/modules/4.10.0-35-generic: No such file or directory depmod: FATAL: could not search modules: No such file or directory depmod: ERROR: could not open directory /lib/modules/4.10.0-37-generic: No such file or directory depmod: FATAL: could not search modules: No such file or directory depmod: ERROR: could not open directory /lib/modules/4.10.0-38-generic: No such file or directory depmod: FATAL: could not search modules: No such file or directory depmod: ERROR: could not open directory /lib/modules/4.10.0-40-generic: No such file or directory depmod: FATAL: could not search modules: No such file or directory depmod: ERROR: could not open directory /lib/modules/4.8.0-41-generic: No such file or directory depmod: FATAL: could not search modules: No such file or directory depmod: ERROR: could not open directory /lib/modules/4.8.0-45-generic: No such file or directory depmod: FATAL: could not search modules: No such file or directory depmod: ERROR: could not open directory /lib/modules/4.8.0-46-generic: No such file or directory depmod: FATAL: could not search modules: No such file or directory depmod: ERROR: could not open directory /lib/modules/4.8.0-49-generic: No such file or directory depmod: FATAL: could not search modules: No such file or directory depmod: ERROR: could not open directory /lib/modules/4.8.0-52-generic: No such file or directory depmod: FATAL: could not search modules: No such file or directory depmod: ERROR: could not open directory /lib/modules/4.8.0-54-generic: No such file or directory depmod: FATAL: could not search modules: No such file or directory depmod: ERROR: could not open directory /lib/modules/4.8.0-56-generic: No such file or directory depmod: FATAL: could not search modules: No such file or directory depmod: ERROR: could not open directory /lib/modules/4.8.0-58-generic: No such file or directory depmod: FATAL: could not search modules: No such file or directory vboxdrv.sh: Building VirtualBox kernel modules. vboxdrv.sh: failed: Look at /var/log/vbox-install.log to find out what went wrong. There were problems setting up VirtualBox. To re-start the set-up process, run /sbin/vboxconfig as root. [root:~] #
The install log /var/log/vbox-install.log is too large to post here but it starts with following message
make[1]: warning: -jN forced in submake: disabling jobserver mode. test -e include/generated/autoconf.h -a -e include/config/auto.conf || ( \ echo >&2; \ echo >&2 " ERROR: Kernel configuration is invalid."; \ echo >&2 " include/generated/autoconf.h or include/config/auto.conf are missing.";\ echo >&2 " Run 'make oldconfig && make prepare' on kernel src to fix it."; \ echo >&2 ;
There are actually three questions now I think * How do I fix kernel configuration? * How do I fix VirtualBox? Should I remove and reinstall? * How do I prevent these types of issues? Should I disable auto-updates of kernel?