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


  • 2018-11-26 17:05:47

    sql查询调优之where条件排序字段以及limit使用索引的奥秘

    看起来匪夷所思,其实搞清楚mysql查询的原理之后,其实很简单 我们来看这2条sql查询,都用到了where order by limit 当有limit存在时,查询的顺序就有可能发生变化,这时并不是从数据库中先通过where过滤再排序再limit 因为如果这样的话,从500万数据中通过where过滤就不会是5s了。

  • 2018-11-26 21:46:28

    TextView设置行间距、行高,以及字间距

    Android系统中TextView有默认行间距,但是比较窄有的时候需要我们设置每行行间距。 TextView为我们提供了相关设置属性android:lineSpacingExtra或android:lineSpacingMultiplier。

  • 2018-11-26 21:47:55

    Drawable一个有趣的属性:tileMode

    tileMode是drawable 资源文件 bitmap的一个属性, 翻译的意思是平铺模式。用法如下: 在drawable目录下新建一个资源文件 tile_mode_demo.xml

  • 2018-11-28 09:55:53

    android radiogroup样式(设置切换背景与文字颜色)

    RadioButton(单选按钮)在Android开发中应用的非常广泛,比如一些选择项的时候,会用到单选按钮。它是一种单选框双状态的按钮,可以选择或不选择。在RadioButton没有被选中时,用户能够按下或点击来选中它。

  • 2018-12-01 00:27:12

    批量kill mysql processlist进程

    如果大批量的操作能够通过一系列的select语句产生,那么理论上就能对这些结果批量处理。 但是mysql并没用提供eval这样的对结果集进行分析操作的功能。所以只能现将select结果保存到临时文件中,然后再执行临时文件中的指令。

  • 2018-12-02 10:54:14

    HTTP长连接、短连接究竟是什么?

    HTTP的长连接和短连接本质上是TCP长连接和短连接。HTTP属于应用层协议,在传输层使用TCP协议,在网络层使用IP协议。 IP协议主要解决网络路由和寻址问题,TCP协议主要解决如何在IP层之上可靠地传递数据包,使得网络上接收端收到发送端所发出的所有包,并且顺序与发送顺序一致。TCP协议是可靠的、面向连接的。