#如何修复VBoxManage: error: The machine is already locked for a session (or being unlocked)

问题背景

通过vagrant up启动虚拟机的时候, 报出错信息如下

vagrant up
Bringing machine 'default' up with 'virtualbox' provider...
==> default: 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", "fc696414-6a00-4be9-9bdd-3c16cd6674ac", "--natpf1", "delete", "ssh", "--natpf1", "delete", "tcp15672", "--natpf1", "delete", "tcp5672"]Stderr: VBoxManage: error: The machine 'keydb_default_1589095573623_76673' 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 531 of file VBoxManageModifyVM.cpp

通过命令修复

vagrant reload  keydb_default_1589095573623_76673

再跑的时候, 变成了下面这个, 以后都是这个了

vagrant up
Bringing machine 'default' up with 'virtualbox' provider...
==> default: Clearing any previously set forwarded ports...
==> default: Clearing any previously set network interfaces...
==> default: Preparing network interfaces based on configuration...default: Adapter 1: natdefault: Adapter 2: hostonly
==> default: Forwarding ports...default: 15672 (guest) => 15672 (host) (adapter 1)default: 5672 (guest) => 5672 (host) (adapter 1)default: 22 (guest) => 2222 (host) (adapter 1)
==> default: Running 'pre-boot' VM customizations...
==> default: Booting VM...
==> default: Waiting for machine to boot. This may take a few minutes...default: SSH address: 127.0.0.1:2222default: SSH username: vagrantdefault: SSH auth method: private key
The guest machine entered an invalid state while waiting for it
to boot. Valid states are 'starting, running'. The machine is in the
'gurumeditation' state. Please verify everything is configured
properly and try again.If the provider you're using has a GUI that comes with it,
it is often helpful to open that and watch the machine, since the
GUI often has more helpful error messages than Vagrant can retrieve.
For example, if you're using VirtualBox, run `vagrant up` while the
VirtualBox GUI is open.The primary issue for this error is that the provider you're using
is not properly configured. This is very rarely a Vagrant issue.

解决方案

首先重启大法, 查进程, 并杀死

ps -ef | grep Virtual503 98763     1   0  5:35PM ??        15:02.07 /Applications/VirtualBox.app/Contents/MacOS/VBoxHeadless --comment keydb_default_1589095573623_76673 --startvm fc696414-6a00-4be9-9bdd-3c16cd6674ac --vrde config

然后打开UI, 发现虚拟机处于GuruMeditation state.

[外链图片转存失败,源站可能有防盗链机制,建议将图片保存下来直接上传(img-nS0JM6ib-1589451256182)(https://i.imgur.com/RBBO114.png)]

对虚拟机点Normal Start, 然后会提示它处于GuruMeditation, 问你要不要Power Off,
直接点PowerOff,

下一步重新vagrant up即可

参考链接

https://stackoverflow.com/a/36889390
https://stackoverflow.com/a/19899960

原文链接

https://www.wxhmf.com/posts/how-to-fix-vagrant-up-failed/

如何修复vagrant up失败错VBoxManage: error: The machine is already locked for a session (or being unlocked)相关推荐

  1. 修复win10 服务器失败怎么办,fatal error怎么解决win10 修复Win10系统问题

    1.重新安装/更新图形驱动程序.卸载您的图形驱动程序并重新安装. 如果这不能解决您的问题,则可能需要更新图形驱动程序. 要更新驱动程序,请打开设备管理器. 打开后,展开显示适配器选项,右键单击驱动程序 ...

  2. oracle00205报错,[Oracle] 数据库启动失败报错 ORA-00205: error in identifying control file

    有同事问我,他的数据库启动失败,报错如下: ORA-00205: error in identifying control file, check alert log for more info 这种 ...

  3. VBoxManage: error: Failed to create the host-only

    [问题描述]:vagrant up 失败,报错如下: centos7$ vagrant up Bringing machine 'do1' up with 'virtualbox' provider. ...

  4. Eclipse 安装插件报错:An error occurred while collecting items to be installed session context was...解决方法汇总

    文章目录 前言 一.产生错误的场景 二.错误信息描述 三.出错原因分析 3.1.错误原因定位 3.2.Eclipse 的更新管理 P2 出错 四.解决方式 4.1.进入 Eclipse 的安装根目录 ...

  5. vagrant up 失败解决办法

    vagrant up 失败有如下提示: E:\vagrantbox\centos65>vagrant up Bringing machine 'default' up with 'virtual ...

  6. SAP LSMW 事务代码HUPAST的录屏后台执行报错 - Runtime error RAISE_EXCEPTION has occurred - 之分析

    SAP LSMW 事务代码HUPAST的录屏后台执行报错 - Runtime error RAISE_EXCEPTION has occurred - 之分析 因项目上成品库存管理启用了handlin ...

  7. Mysql报错Fatal error:Can't open and lock privilege tables

     Mysql报错Fatal error: Can't open and lock privilege tables: Table 'mysql.host' doesn't exist 安装mysql后 ...

  8. 安装yaml报错:ERROR: Cannot uninstall 'PyYAML'.

    安装yaml报错:ERROR: Cannot uninstall 'PyYAML'. 文章目录: 一.错误原因分析 二.最终错误解决方式 一.错误原因分析 1.开始安装 我是一开始安装yaml,使用命 ...

  9. windows10下编译dllib报错: ERROR: Failed building wheel for dlib

    一.报错信息 在安装dlib的时候,使用pip进行安装 pip install dlib 二.解决方式 1.检查自己是否已经安装了cmake 首先要检测自己本机是否已经安装了cmake,因为安装dli ...

  10. 关于 Visual stdio 编译报错:error MSB6006: “CL.exe”已退出

    网上查看,原因有多种. 我自己遇到的是这样的: 环境:VS2019,编译项目 image-master,中间自己重整了原来的目录,移动了很多文件.编译报错:error MSB6006: "C ...

最新文章

  1. The encryption certificate of the relying party trust identified by thumbprint is not valid
  2. JavaScript | 继承
  3. TypeScript API Reflect.getMetadata 返回 undefined 的解决办法
  4. win7讲述人修复_揭秘:干掉了win7!为何win10屡被吐槽它却“永世留芳”
  5. [UE4]C++静态加载问题:ConstructorHelpers::FClassFinder()和FObjectFinder()
  6. 74ls90设计十进制计数器电路图_利用555与74ls90制作电子秒表
  7. ApacheCN Java 译文集 20210921 更新
  8. oracle存储过程如何传递一个bean对象_java程序员如何在短期内抓住面试重点,成为大厂offer收割机...
  9. 算法完成了如何开发服务端API?
  10. linux快捷删除151617文件,mengzhaoliang
  11. php二分查找法实例
  12. 【预测模型】趋势移动平均法预测发电量
  13. navicat for mysql 10.0.11 简体免安装中文破解版
  14. PCL-ICP(IterativeClosestPoint)源码解析
  15. 实用技巧(二)——文本工具、自由变换
  16. 《微信小程序开发实战》学习笔记chapter1微信小程序人门
  17. Java8新特性1:lambda表达式入门--由浅入深,从单发步枪迈向自动步枪
  18. Node.JS基础知识之命令行窗口(Windows 的命令行窗口)
  19. 宁德时代阴影下的动力电池生死竞赛
  20. 深入理解JVM-GC

热门文章

  1. 学习@浅墨_毛星云的【OpenCV入门教程】之四
  2. java fx scen,java基础:10.2 Java FX之显示图片
  3. html5小白——html5基础(简单个人博客模板)
  4. 计量单位报错:消息号BM302 “未使用语言 ZH 创建单位 XXX”
  5. “四通一达”本一家,这家人是如何“承包”中国快递半壁江山的?
  6. 疫情之下,企业如何突围?
  7. 游戏服务器哪种系统稳定,游戏服务器一般用什么系统吗
  8. 监督学习算法的发展史和它们之间的关系:从文氏图到回归、决策树、支持向量机和人工神经网络...
  9. ps去水印通用方法和教程案例
  10. 构建自己的Linux 之三 初步完善(提供网络功能等)