From: http://www.cnblogs.com/WormCanFly/archive/2012/05/23/2514338.html
In Linux, visual box is much faster than traditional VMware. The key point is that it is closely integrated with the Linux kernel, which is also an advantage of open source.
However, the Linux kernel is updated frequently. A prompt is displayed when virtualbox is started every time the kernel is updated.:
Virtualboxkernel driver not installed. The vboxdrv kernel module was either notloaded or/dev/vboxdrv was not created for some
Reason. Re-setup Thekernel module by executing '/etc/init. d/vboxdrv setup' as root.
Therefore, you need to re-compile the virtualbox kernel. Run the following command in Ubuntu:
Sudo/etc/init. d/vboxdrv setup
If the prompt is:
* Stopping virtualbox kernel modules [OK]
* Uninstalling old virtualbox dkms kernel modules [OK]
* Trying to register the virtualbox kernel modules using dkms
* Failed, trying without dkms
* Recompiling virtualbox Kernel Modules
* Look
/Var/log/vbox-install.log to find out what went wrong
Find the/var/log/vbox-install.log file with the following content:
Makefile: 172: *** error: unable to find the sources of yourcurrent Linux kernel. Specify kern_dir = <directory>
Andrun make again. Stop.
Therefore, you need to install the source file of the current Linux kernel and compile the virtualbox kernel. Run the following command under Ubuntu to install the source file of the current Linux kernel:
Sudo apt-Get install linux-headers-'uname-R'
Note:: The uname-R is not a single quotation mark, but the symbol under the ESC key.
Then compile the virtualbox kernel and execute the following command:
Sudo/etc/init. d/vboxdrv setup