解决vagrant up报错locked for a session问题

执行vagrant up是报错,错误信息如下

vagrant up
Bringing machine 'homestead-7' up with 'virtualbox' provider...
==> homestead-7: Clearing any previously set forwarded ports...
There was an error while executing `VBoxManage`, a CLI used by Vagrant
for controlling VirtualBox. The command and stderr is shown below.

Command: ["modifyvm", "8611b907-72de-486f-b436-feea87019a75", "--natpf1", "delete", "ssh", "--natpf1", "delete", "tcp27017", "--natpf1", "delete", "tcp33060", "--natpf1", "delete", "tcp4040", "--natpf1", "delete", "tcp44300", "--natpf1", "delete", "tcp54320", "--natpf1", "delete", "tcp8000", "--natpf1", "delete", "tcp8025"]

Stderr: VBoxManage: error: The machine 'homestead-7' is already locked for a session (or being unlocked)
VBoxManage: error: Details: code VBOX_E_INVALID_OBJECT_STATE (0x80bb0007), component MachineWrap, interface IMachine, callee nsISupports
VBoxManage: error: Context: "LockMachine(a->session, LockType_Write)" at line 529 of file VBoxManageModifyVM.cpp

解决方法:执行以下命令

vboxmanage startvm xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx --type emergencystop

中间的xxxx就是上面报错信息中command中的8611b907-72de-486f-b436-feea87019a75

执行完重新执行vagrant up即可重新启动

  • 1
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 1
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值