标签 vagrant 下的文章

完整的报错信息如下:

There was an error while executing VBoxManage, a CLI used by Vagrant
for controlling VirtualBox. The command and stderr is shown below.
Command: ["startvm", "7130e2d3-3630-4c6c-b306-e96282ec6426", "--type", "headless"]
Stderr: VBoxManage: error: RawFile#0 failed to create the raw output file X:/development/env/xenial64/ubuntu-xenial-16.04-cloudimg-console.log (VERR_FILE_NOT_FOUND)
VBoxManage: error: Details: code NS_ERROR_FAILURE (0x80004005), component ConsoleWrap, interface IConsole

解决方法:
在Vagrantfile中关于virtualbox的部分做如下配置:

  config.vm.provider "virtualbox" do |vb|
  #   Display the VirtualBox GUI when booting the machine
  #   vb.gui = true
  #
  #   # Customize the amount of memory on the VM:
    vb.memory = "1024"
    vb.cpus = 2
  # Basebox ubuntu/xenial64 comes with following Vagrantfile config and causes https://github.com/joelhandwell/ubuntu_vagrant_boxes/issues/1
  # vb.customize [ "modifyvm", :id, "--uart1", "0x3F8", "4" ]
  # vb.customize [ "modifyvm", :id, "--uartmode1", "file", File.join(Dir.pwd, "ubuntu-xenial-16.04-cloudimg-console.log") ]
  # following config will address the issue
    vb.customize [ "modifyvm", :id, "--uartmode1", "disconnected" ]

  end