11 Troubleshooting
11.5 Linux hosts
11.5.1 Linux kernel module refuses to load
If the VirtualBox kernel module (vboxdrv) refuses to load, i.e. you get an “Error in- serting vboxdrv: Invalid argument”, check (as root) the output of the dmesg command to find out why the load failed. The most common reasons are:
•With Linux 2.6.19 and higher, the NMI watchdog may be active. Add nmi_watchdog=0 to the kernel command line (e.g. in your grub configu- ration) and reboot. With the Debian and Ubuntu installation modules, execute sudo
•The kernel disagrees about the version of the gcc used to compile the module. Make sure that you use the same compiler as used to build the kernel.
11.5.2 Linux host CD/DVD drive not found
If you have configured a virtual machine to use the host’s CD/DVD drive, but this does not appear to work, make sure that the current user has permission to access the corresponding Linux device file (/dev/hdc or /dev/scd0 or /dev/cdrom or similar). On most distributions, the user must be added to a corresponding group (usually called cdrom or cdrw).
11.5.3 Linux host CD/DVD drive not found (older distributions)
On older Linux distributions, if your CD/DVD device has a different name, VirtualBox may be unable to find it. On older Linux hosts, VirtualBox performs the following steps to locate your CD/DVD drives:
1.VirtualBox examines if the environment variable VBOX_CDROM is defined (see below). If so, VirtualBox omits all the following checks.
2.VirtualBox tests if /dev/cdrom works.
3.In addition, VirtualBox checks if any CD/DVD drives are currently mounted by checking /etc/mtab.
4.In addition, VirtualBox checks if any of the entries in /etc/fstab point to CD/DVD devices.
In other words, you can try to set VBOX_CDROM to contain a list of your CD/DVD devices, separated by colons, for example as follows:
export VBOX_CDROM=’/dev/cdrom0:/dev/cdrom1’
On modern Linux distributions, VirtualBox uses the hardware abstraction layer (hal) to locate CD and DVD hardware.
162