首页 > 解决方案 > Vagrant Up 错误:VBoxManage.exe:错误:VM 会话在任何尝试打开电源之前已关闭

问题描述

我正在使用 Vagrant 在 Windows 上设置 C++ 开发环境。我成功安装并启动了我的虚拟机;停止并重新启动 VM 也没有产生任何错误。然而这次执行“vagrant up”显示:

Bringing machine 'default' up with 'virtualbox' provider...
==> default: Checking if box 'bento/ubuntu-20.10' version '202107.07.0' is up to date...
==> default: Clearing any previously set forwarded ports...
==> default: Clearing any previously set network interfaces...
==> default: Preparing network interfaces based on configuration...
    default: Adapter 1: nat
==> default: Forwarding ports...
    default: 22 (guest) => 2222 (host) (adapter 1)
==> default: Running 'pre-boot' VM customizations...
==> 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", "dd8f5b68-3401-4bdd-aaa5-a1ce346ac9d9", "--type", "headless"]

Stderr: VBoxManage.exe: error: The VM session was closed before any attempt to power it on
VBoxManage.exe: error: Details: code E_FAIL (0x80004005), component SessionMachine, interface ISession

我试图在 VirtualBox GUI 中丢弃我的 VM 的保存状态,但错误仍然存​​在。我能做些什么?

标签: windowsvagrantvirtualbox

解决方案


推荐阅读