Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
rescue a VM from VBOX_E_INVALID_OBJECT_STATE

Issue

$ vagrant up
Bringing machine 'default' up with 'virtualbox' provider...
==> default: Checking if box 'ubuntu/trusty64' is up to date...
==> 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", "c8f076e7-b65f-4a48-9632-b65af0e27ba7", "--natpf1", "delet
e", "ssh"]

Stderr: VBoxManage.exe: error: The machine 'default' is
already locked for a session (or being unlocked)
VBoxManage.exe: error: Details: code VBOX_E_INVALID_OBJECT_STATE (0x80bb0007), c
omponent Machine, interface IMachine, callee IUnknown
VBoxManage.exe: error: Context: "LockMachine(a->session, LockType_Write)" at lin
e 471 of file VBoxManageModifyVM.cpp

How to fix?

1st try and force power off of VM

Microsoft Windows [Version 6.1.7601]
Copyright (c) 2009 Microsoft Corporation.  All rights reserved.

C:\Windows\system32>VBoxManage.exe controlvm default poweroff
'VBoxManage.exe' is not recognized as an internal or external command,
operable program or batch file.

C:\Windows\system32>C:\Progra~1\Oracle\VirtualBox\VBoxManage.exe controlvm default
poweroff
VBoxManage.exe: error: The virtual machine is being powered down
<b>VBoxManage.exe: error: Details: code VBOX_E_INVALID_VM_STATE (0x80bb0002)</b>, compo
nent Console, interface IConsole, callee IUnknown
VBoxManage.exe: error: Context: "PowerDown(progress.asOutParam())" at line 222 o
f file VBoxManageControlVM.cpp

ok, still have problem, lets try something else...

C:\Windows\system32>C:\Progra~1\Oracle\VirtualBox\VBoxManage.exe startvm default
--type emergencystop

Fixed!

Bringing machine 'default' up with 'virtualbox' provider...
==> default: Checking if box 'ubuntu/trusty64' 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: Adapter 2: hostonly
==> default: Forwarding ports...
    default: 22 => 2222 (adapter 1)
==> default: Running 'pre-boot' VM customizations...
==> default: Booting VM...
==> default: Waiting for machine to boot. This may take a few minutes...

mtrebi commented Aug 13, 2015

Thanks! It fixed my problem

@hsiboy Thanks! This helped me as well. Found via Google.

@ghost

ghost commented Sep 9, 2015

The suggestions above didn't help in my case. I could fix as follow:

Problem
Fehlercode:VBOX_E_INVALID_OBJECT_STATE (0x80BB0007)
Komponente:ProgressProxy
Interface:IProgress {UUID}

Fix
1.) Create a clone
2.) Choose linked Clone (Verknüpfter Klon)

That did the trick...

alexszilagyi commented Mar 6, 2016 edited by hsiboy

@hsiboy: How you'd run the command in windows command prompt? How I can specify the space between program & files, the path is:
C:\Windows\system32>C:\Program Files\Oracle\VirtualBox\VBoxManage.exe startvm default.

I don't know how to specify the space between Program and Files.


in windows you can represent Program Files as Progra~1

C:\Windows\system32>C:\Progra~1\Oracle\VirtualBox\VBoxManage.exe startvm default

or wrap the whole thing in "" quotes.

peets commented Sep 8, 2016

Thanks! This ranks high in Google and solved my problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment