使用 vagrant 在 OSX 主机上启动 Ubuntu 16.04 客户机时出现 Virtualbox Guru Meditation 错误

使用 vagrant 在 OSX 主机上启动 Ubuntu 16.04 客户机时出现 Virtualbox Guru Meditation 错误

主机操作系统版本:OSX El Capitan 10.11.4 (15E65)

Virtualbox 版本:5.0.18r106667

Vagrant 版本:1.8.1

访客:Ubuntu-16.04

我的 vagrantfile 看起来像

   1 Vagrant.configure('2') do |config|
   2   config.vm.box = "ubuntu/xenial64"
   3   config.vm.box_url = "ubuntu/xenial64"
   4
   5   config.vm.define "tryxenial", primary: true do |machine|
   6
   7     machine.vm.provider :virtualbox do |provider, override|
   8       provider.name = "tryxenial"
   9     end
  10   end
  11 end

当我运行时vagrant up,出现以下错误:

Bringing machine 'tryxenial' up with 'virtualbox' provider...
==> tryxenial: Importing base box 'ubuntu/xenial64'...
==> tryxenial: Matching MAC address for NAT networking...
==> tryxenial: Checking if box 'ubuntu/xenial64' is up to date...
==> tryxenial: Setting the name of the VM: tryxenial
==> tryxenial: Clearing any previously set network interfaces...
==> tryxenial: Preparing network interfaces based on configuration...
    tryxenial: Adapter 1: nat
==> tryxenial: Forwarding ports...
    tryxenial: 22 (guest) => 2222 (host) (adapter 1)
==> tryxenial: Running 'pre-boot' VM customizations...
==> tryxenial: Booting VM...
==> tryxenial: Waiting for machine to boot. This may take a few minutes...
    tryxenial: SSH address: 127.0.0.1:2222
    tryxenial: SSH username: ubuntu
    tryxenial: SSH auth method: password
The guest machine entered an invalid state while waiting for it
to boot. Valid states are 'starting, running'. The machine is in the
'gurumeditation' state. Please verify everything is configured
properly and try again.

If the provider you're using has a GUI that comes with it,
it is often helpful to open that and watch the machine, since the
GUI often has more helpful error messages than Vagrant can retrieve.
For example, if you're using VirtualBox, run `vagrant up` while the
VirtualBox GUI is open.

The primary issue for this error is that the provider you're using
is not properly configured. This is very rarely a Vagrant issue.

当我打开 virtualbox GUI 并单击 Machine > Show Log 时,日志以以下内容结尾:

00:00:02.804262 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
00:00:02.804277 emR3Debug: rc=VERR_MORE_DATA
00:00:03.813006 Changing the VM state from 'RUNNING' to 'GURU_MEDITATION'
00:00:03.813034 Console: Machine state changed to 'GuruMeditation'

这是否表明我应该告诉 virtualbox 为虚拟机分配更多内存,或者 virtualbox 正在尝试分配内存但无法分配,或者是其他什么?

它似乎是从https://www.virtualbox.org/svn/vbox/trunk/src/VBox/Main/src-client/GuestCtrlPrivate.cpp

答案1

从 VirtualBox 5.0.18 升级到 5.0.20(于 4 月 28 日发布...发布此问题 5 天后)为我解决了这个问题。因此无需再降级到 5.0.16。

答案2

我在使用 VB 版本 5.0.18 时遇到了同样的问题。看来 ubuntu/xenial64 框是用 virtualbox 5.0.16 构建的。卸载 5.0.18 并安装 5.0.16 对我有用。

答案3

解决此问题的一种方法是安装 virtualbox 的 OSX 测试版本。https://www.virtualbox.org/wiki/Testbuilds。这似乎是我运行的当前发布版本特有的一个错误。

相关内容