Ubuntu16.04 安装 VirtualBox & Vagrant 管理 VirtualBox 各种问题总结

Ubuntu 下安装 VirtualBox

注意:

  • 务必要仔细查看用户手册上对系统和必要环境的依赖。
  • 如果 kernel header 不一致,需要更新 kernel:
    • sudo apt-get install linux-headers-generic 或者
    • sudo apt-get install linux-headers-$(uname -r)
      uname -r 等于你的版本内核,比如我的:4.4.0-21-generic
  • 如果不能重装VBox,需要修改BIOS设置:
    • Security 中的 Secure Boot 设置为“Disabled” (一般设置这个就可以了吧)
    • Startup中的 UEFI/Legacy Boot 选 Both
    • Priority 选 Legacy First,CSM Support 选 Yes
      包括类似 Surface Pro,都可以这样操作。
      另外,由于现在的主板很多都带有 UEFI Secure Boot 功能,可能导致使用USB设备启动不了系统。用此方法也可以搞定。
      参考至: 电脑无法从USB启动可能是 UEFI Secure Boot 在捣鬼!

使用 Vagrant 管理 VirtualBox

注意:

1
2
3
4
5
6
$ vagrant package
No usable default provider could be found for your system.

$ vagrant package --base vagrant-ubuntu64
Vagrant has detected that you have a version of VirtualBox installed that is not supported by this version of Vagrant.
Please install one of the supported versions listed below to use Vagrant: 4.0, 4.1, 4.2, 4.3, 5.0

可参考这两个地方: