我正在尝试在桌面上安装 Virtualbox:
处理器:AMD FX(tm)-8350 八核处理器 × 8 操作系统类型:64 位 Ubuntu 16.04
这是我的 bash 历史记录的快照:
35 sudo dpkg -i /home/andy/Downloads/virtualbox-5.0_5.0.20-106931~Ubuntu~xenial_amd64.deb
36 sudo apt-get install libqt4-opengl
37 sudo apt-get -f install
38 sudo apt-get install linux-headers-generic
39 sudo /etc/init.d/vboxdrv setup
40 virtualbox
41 sudo /sbin/rcvboxdrv setup
42 dmesg | grep VirtualBox
43 sudo apt-get install linux-headers-generic build-essential
44 sudo modprobe -v vboxdrv
45 dmesg
46 sudo systemctl status vboxdrv
稍微扩展一下这些命令:
$ sudo apt-get -f install
Reading package lists... Done
Building dependency tree
Reading state information... Done
0 to upgrade, 0 to newly install, 0 to remove and 0 not to upgrade.
$ sudo /etc/init.d/vboxdrv setup
sudo: /etc/init.d/vboxdrv: command not found
$ virtualbox
WARNING: The vboxdrv kernel module is not loaded. Either there is no module
available for the current kernel (4.4.0-22-generic) or it failed to
load. Please recompile the kernel module and install it by
sudo /sbin/rcvboxdrv setup
You will not be able to start VMs until this problem is fixed.
$ sudo /sbin/rcvboxdrv setup
Stopping VirtualBox kernel modules ...done.
Removing old VirtualBox pci kernel module ...done.
Removing old VirtualBox netadp kernel module ...done.
Removing old VirtualBox netflt kernel module ...done.
Removing old VirtualBox kernel module ...done.
Recompiling VirtualBox kernel modules ...done.
Starting VirtualBox kernel modules ...failed!
(modprobe vboxdrv failed. Please use 'dmesg' to find out why)
sudo /usr/lib/virtualbox/vboxdrv.sh setup
产生:
Starting VirtualBox kernel modules ...failed!
(modprobe vboxdrv failed. Please use 'dmesg' to find out why)
$ dmesg
[ 5845.992334] capability: warning: `VirtualBox' uses 32-bit capabilities (legacy support in use)
[ 6004.050016] show_signal_msg: 33 callbacks suppressed
[ 6004.050022] Chrome_ChildThr[7835]: segfault at 0 ip 0000562e33366a24 sp 00007f278abfe360 error 6 in plugin-container[562e3335e000+3d000]
[ 6050.579010] Chrome_ChildThr[10708]: segfault at 0 ip 0000563aaf904a24 sp 00007f51711fe360 error 6 in plugin-container[563aaf8fc000+3d000]
所以“modprobe vboxdrv failed”是有问题的。谷歌在这里揭露了一个类似的故事:https://www.virtualbox.org/ticket/11577
我检查了 BIOS,在 CPU 配置/SVM 中将其设置为“启用”。
This secure virtual mode will let you run multiple OS (guest) on the same physical hardware with the hypervisor layer.
尽管如此,虚拟机仍然无法启动?
被挫败了modprobe vboxdrv kernel modules
啊!
有任何想法吗?
答案1
1) 在 BIOS 设置中禁用安全启动:安全启动可防止加载未签名的模块。
2)根据Virtualbox-wiki你需要安装dkms
模块:
Ubuntu/Debian 用户可能需要安装 dkms 软件包,以确保在下次 apt-get 升级期间 Linux 内核版本发生更改时,VirtualBox 主机内核模块(vboxdrv、vboxnetflt 和 vboxnetadp)能够正确更新。
键入以下命令进行安装dkms
:
sudo apt-get install dkms
然后您可以按照 Virtualbox/Wiki 上描述的步骤安装 Virtual-box
答案2
对于 Ubuntu 16.04LTS 内核模块,4.4.0-22-generic
我必须运行:
sudo apt-get install virtualbox-dkms
。
就我而言,它要求禁用安全 UEFI。附带说明,用于确认的密码长度必须至少为 8 个字符。