The official source is virtualbox-ose, an open-source version.
You can download it from virtualbox.org.
Http://www.virtualbox.org/wiki/Linux_Downloads
Note the platform Selection
Download the DEB package and install it directly. The following error occurs due to kernel update:
VirtualBox will not start until this problem is fixed. please consult/var/log/vbox-install.log to find out why the kernel module does not compile. most probably the kernel sources were not found. install them (the package name is probably linux-headers-<version> whereby <version> can be determined by 'uname-R') and execute
/Etc/init. d/vboxdrv setup
As root.
Because virtualbox needs to be re-compiled based on the kernel version, Our updates are directly carried out in the source, and the corresponding kernel source files are not stored.
Run the following command:
Sudo apt-get install linux-headers-$ (uname-r)
Sudo/etc/init. d/vboxdrv setup
Re-compile virtualbox
Solutions to conflicts between virtualbox and kvm:
Lsmod | grep kvm
Check whether your module is kvm_intel or kvm_amd.
For example
Zlciai @ zlciai :~ $ Lsmod | grep kvm
Kvm_amd 33036 0
Kvm 162688 1 kvm_amd
Sudo rmmod kvm_amd
Or: sudo modprobe-r kvm_amd
You can start virtualbox
Switch back to kvm
Rmmod vboxdrv
Rmmod vboxnetadp
Rmmod vboxnetflt
Modprobe kvm
Modprobe kvm_amd
You can write a switchover script.
Reference: http://hi.baidu.com/bailiangcn/blog/item/59e69da86db74bbbcb130c9d.html
#! /Bin/bash
NOW_VM = 'lsmod | grep vbox'
If [x "$ NOW_VM" = x ""]; then
Echo "Now is kvm, swithing to vbox ..."
Sudo rmmod kvm_amd
Sudo rmmod kvm
Sudo modprobe vboxdrv
Sudo modprobe vboxnetadp
Sudo modprobe vboxnetflt
Else
Echo "Now is vbox, swithing to kvm ..."
Sudo rmmod vboxnetflt
Sudo rmmod vboxnetadp
Sudo rmmod vboxdrv
Sudo modprobe kvm
Sudo modprobe kvm_amd
Fi
Echo "Switching from to xxx done ."
Lsmod | grep kvm
Lsmod | grep vbox
Echo "enjoy it now! "