vagrant up 报错

原创
2021/01/11 14:32
阅读数 2K

在使用 vagrant up 的时候,报错如下:

➜  centos7 vagrant up
Bringing machine 'vm-centos7' up with 'virtualbox' provider...
==> vm-centos7: Importing base box 'centos7'...
==> vm-centos7: Matching MAC address for NAT networking...
==> vm-centos7: Setting the name of the VM: centos7
==> vm-centos7: Clearing any previously set network interfaces...
==> vm-centos7: Preparing network interfaces based on configuration...
    vm-centos7: Adapter 1: nat
==> vm-centos7: Forwarding ports...
    vm-centos7: 22 (guest) => 2222 (host) (adapter 1)
==> vm-centos7: Running 'pre-boot' VM customizations...
==> vm-centos7: 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", "e8b18a27-5677-4bde-a611-5fae8f39128c", "--type", "headless"]

Stderr: VBoxManage: error: The virtual machine 'centos7' has terminated unexpectedly during startup with exit code 1 (0x1)
VBoxManage: error: Details: code NS_ERROR_FAILURE (0x80004005), component MachineWrap, interface IMachine

通过错误描述及网上搜索,确定这是由于对应的虚拟机异常关闭引发的异常,最终解决方案是:把 Vagrant 和 VirtualBox 重新安装一遍。

展开阅读全文
加载中
点击引领话题📣 发布并加入讨论🔥
0 评论
0 收藏
1
分享
返回顶部
顶部