vagrant up 失败解决办法

2017-11-28 14:57:19

vagrant up 失败有如下提示:

E:\vagrantbox\centos65>vagrant up
Bringing machine 'default' up with 'virtualbox' provider...
==> default: Importing base box 'centos65'...
==> default: Matching MAC address for NAT networking...
==> default: Setting the name of the VM: centos65_default_1467013098683_26652
==> default: Clearing any previously set network interfaces...
==> default: Preparing network interfaces based on configuration...
    default: Adapter 1: nat
    default: Adapter 2: hostonly
==> default: Forwarding ports...
    default: 22 (guest) => 2222 (host) (adapter 1)
==> default: Booting VM...
There was an error while executing `VBoxManage`, a CLI used by Vagrant for controlling VirtualBox. The command and stderr is shown below.


Command: ["startvm", "4f89ee30-b887-49ae-8605-e8bb198ce4e2", "--type", "headless"]


Stderr: VBoxManage.exe: error: The virtual machine 'centos65_default_1467013098683_26652' has terminated unexpectedly during startup with exit code 1 (0x1).  More details may be available in 'C:\Users\xxxVirtualBox VMs\centos65_default_1467013098683_26652\Logs\VBoxHardening.log'
VBoxManage.exe: error: Details: code E_FAIL (0x80004005), component MachineWrap, interface IMachine




1、查看环境变量是否设置正确

右击桌面“计算机”→【属性】→ 【高级系统设置】→【环境变量】

2、直接使用VirtualBox开启一个vm也会失败,基本上可以确定是VirtualBox版本的问题

有遇到过安装了VirtualBox-5.0.22-108108-Win.exe的版本在win7下用不了,卸载重装VirtualBox-4.3.12-93733-Win.exe之后可用。

VirtualBox-4.3.12-93733-Win.exe下载地址:http://download.virtualbox.org/virtualbox/4.3.12/VirtualBox-4.3.12-93733-Win.exe


  • 2020-01-20 08:29:14

    js如何生成唯一标识符UUID

    在JavaScript中生成uuid的代码如下,这个函数会直接给你返回uuid,所以直接调用,然后用变量接收即可!

  • 2020-01-30 11:19:58

    Android中添加两个(多个)FileProvider节点问题

    我们知道在android7.0,修改了对私有存储的限制,导致在获取资源的时候,不能通过Uri.fromFile(..)来获取uri了,但是在写入数据的时候是可以通过Uri.fromFile(..)来获取uri的,android 官网给出的解决办法是通过FileProvider来解决这一问题,我们需要在AndroidManifest.xml 配制provider节点。

  • 2020-02-02 15:40:36

    Apache Commons IO之IOUtils优雅操作流

    在开发过程中,你肯定遇到过从流中解析数据,或者把数据写入流中,或者输入流转换为输出流,而且最后还要进行流的关闭,原始jdk自带的方法写起来太复杂,还要注意各种异常,如果你为此感到烦恼,那IOUtils可以让我们优雅的操作流。