VBoxManage: error: The machine 'oracle_vb1' is already locke

Discussions related to using VirtualBox on Linux hosts.

VBoxManage: error: The machine 'oracle_vb1' is already locke

Postby silvex » 15. Mar 2011, 18:12

I started my vbox from gui. I then did a init 0 in the vm and it is grey out in the gui. I tried the commands below. How do I unlock this Vm without rebooting the host ? The vm does not show in the procs list either. I am runing VirtualBox-4.0-4.0.2_69518_sles10.1-1.x86_64.rpm

Code: Select all   Expand viewCollapse view

# vboxmanage startvm oracle_vb1
VBoxManage: error: The machine 'oracle_vb1' is already locked by a session (or being locked or unlocked)
VBoxManage: error: Details: code VBOX_E_INVALID_OBJECT_STATE (0x80bb0007), component Machine, interface IMachine, callee nsISupports
Context: "LaunchVMProcess(a->session, sessionType.raw(), env.raw(), progress.asOutParam())" at line 362 of file VBoxManageMisc.cpp

# vboxmanage startvm oracle_vb1 --type headless
VBoxManage: error: The machine 'oracle_vb1' is already locked by a session (or being locked or unlocked)
VBoxManage: error: Details: code VBOX_E_INVALID_OBJECT_STATE (0x80bb0007), component Machine, interface IMachine, callee nsISupports
Context: "LaunchVMProcess(a->session, sessionType.raw(), env.raw(), progress.asOutParam())" at line 362 of file VBoxManageMisc.cpp

# vboxmanage discardstate oracle_vb1
VBoxManage: error: The machine 'oracle_vb1' is already locked for a session (or being unlocked)
VBoxManage: error: Details: code VBOX_E_INVALID_OBJECT_STATE (0x80bb0007), component Machine, interface IMachine, callee nsISupports
Context: "LockMachine(a->session, LockType_Write)" at line 404 of file VBoxManageMisc.cpp

# vboxmanage list vms
"oracle_vb1" {28c0eb22-8893-4ce7-b5e7-57611914024b}  <<<< this is the one "locked".
"laxdev001" {541200f0-456d-4d7f-8746-a732b4f14df3}
"laxdev002" {5f8fd40b-7243-4063-9026-03aaa77a155a}
"laxdev003" {0db035fe-4af1-409a-983d-1140952c722a}
"laxdev004" {72c390be-64e5-4fcf-87b4-7881e76cc904}
"laxdev005" {c28e57d2-1a43-459c-8e20-aebb7b8174fd}

# ps -ef | grep virtualbox
root      7834  7704  0 Feb28 pts/1    00:52:04 /usr/lib/virtualbox/VirtualBox
root      7849     1  0 Feb28 ?        00:33:46 /usr/lib/virtualbox/VBoxXPCOMIPCD
root      7855     1  0 Feb28 ?        01:08:19 /usr/lib/virtualbox/VBoxSVC --auto-shutdown
root     14836  7855  2 Mar01 ?        08:11:09 /usr/lib/virtualbox/VirtualBox --comment laxdev001 --startvm 541200f0-456d-4d7f-8746-a732b4f14df3 --no-startvm-errormsgbox
root     15483  7855  1 Mar08 ?        02:34:15 /usr/lib/virtualbox/VirtualBox --comment laxdev002 --startvm 5f8fd40b-7243-4063-9026-03aaa77a155a --no-startvm-errormsgbox
root     19706 19602  0 09:08 pts/0    00:00:00 grep virtualbox
root     24475  7855  1 Mar09 ?        02:12:00 /usr/lib/virtualbox/VirtualBox --comment laxdev003 --startvm 0db035fe-4af1-409a-983d-1140952c722a --no-startvm-errormsgbox
root     28853  7855  1 Mar10 ?        01:29:45 /usr/lib/virtualbox/VirtualBox --comment laxdev004 --startvm 72c390be-64e5-4fcf-87b4-7881e76cc904 --no-startvm-errormsgbox

---------------------------------------------
-Ed
http://silvex.smugmug.com
silvex
 
Posts: 45
Joined: 2. Jul 2010, 00:35
Primary OS: MS Windows Vista
VBox Version: OSE other
Guest OSses: Suse 10 SP3

Re: VBoxManage: error: The machine 'oracle_vb1' is already locke

Postby Sasquatch » 15. Mar 2011, 22:00

If you can't start it from the GUI, because it thinks it's still running, but you don't see the window or process, you can try to use the following:
Code: Select all   Expand viewCollapse view
VBoxManage controlvm oracle_vb1 poweroff
Read the Forum Posting Guide before opening a topic.
VirtualBox FAQ: Check this before asking questions.
Online User Manual: A must read if you want to know what we're talking about.
Howto: Install Linux Guest Additions
Howto: Use Shared Folders on Linux Guest
See the Tutorials and FAQ section at the top of the Forum for more guides.
Try searching the forums first with Google and add the site filter for this forum.
E.g. install guest additions site:forums.virtualbox.org

Retired from this Forum since OSSO introduction.
Sasquatch
Volunteer
 
Posts: 17800
Joined: 17. Mar 2008, 13:41
Location: /dev/random
Primary OS: Debian other
VBox Version: PUEL
Guest OSses: Windows XP, Windows 7, Linux

Re: VBoxManage: error: The machine 'oracle_vb1' is already locke

Postby silvex » 16. Mar 2011, 00:27

Thanks for the suggestions. I had already tried that.

Code: Select all   Expand viewCollapse view

 # vboxmanage controlvm oracle_vb1 pause
VBoxManage: error: Invalid machine state: PoweredOff
VBoxManage: error: Details: code VBOX_E_INVALID_VM_STATE (0x80bb0002), component Console, interface IConsole, callee nsISupports
Context: "Pause()" at line 97 of file VBoxManageControlVM.cpp

# vboxmanage controlvm oracle_vb1 resume
VBoxManage: error: Cannot resume the machine as it is not paused (machine state: PoweredOff)
VBoxManage: error: Details: code VBOX_E_INVALID_VM_STATE (0x80bb0002), component Console, interface IConsole, callee nsISupports
Context: "Resume()" at line 101 of file VBoxManageControlVM.cpp

# vboxmanage startvm oracle_vb1 --type headless
VBoxManage: error: The machine 'oracle_vb1' is already locked by a session (or being locked or unlocked)
VBoxManage: error: Details: code VBOX_E_INVALID_OBJECT_STATE (0x80bb0007), component Machine, interface IMachine, callee nsISupports
Context: "LaunchVMProcess(a->session, sessionType.raw(), env.raw(), progress.asOutParam())" at line 362 of file VBoxManageMisc.cpp

# vboxmanage controlvm oracle_vb1 poweroff
VBoxManage: error: Invalid machine state: PoweredOff (must be Running, Paused or Stuck)
VBoxManage: error: Details: code VBOX_E_INVALID_VM_STATE (0x80bb0002), component Console, interface IConsole, callee nsISupports
Context: "PowerDown(progress.asOutParam())" at line 149 of file VBoxManageControlVM.cpp

# vboxmanage controlvm oracle_vb1 pause
VBoxManage: error: Invalid machine state: PoweredOff
VBoxManage: error: Details: code VBOX_E_INVALID_VM_STATE (0x80bb0002), component Console, interface IConsole, callee nsISupports
Context: "Pause()" at line 97 of file VBoxManageControlVM.cpp

# vboxmanage controlvm oracle_vb1 resume
VBoxManage: error: Cannot resume the machine as it is not paused (machine state: PoweredOff)
VBoxManage: error: Details: code VBOX_E_INVALID_VM_STATE (0x80bb0002), component Console, interface IConsole, callee nsISupports
Context: "Resume()" at line 101 of file VBoxManageControlVM.cpp

# vboxmanage startvm oracle_vb1 --type headless
VBoxManage: error: The machine 'oracle_vb1' is already locked by a session (or being locked or unlocked)
VBoxManage: error: Details: code VBOX_E_INVALID_OBJECT_STATE (0x80bb0007), component Machine, interface IMachine, callee nsISupports
Context: "LaunchVMProcess(a->session, sessionType.raw(), env.raw(), progress.asOutParam())" at line 362 of file VBoxManageMisc.cpp

---------------------------------------------
-Ed
http://silvex.smugmug.com
silvex
 
Posts: 45
Joined: 2. Jul 2010, 00:35
Primary OS: MS Windows Vista
VBox Version: OSE other
Guest OSses: Suse 10 SP3

Re: VBoxManage: error: The machine 'oracle_vb1' is already locke

Postby Perryg » 16. Mar 2011, 00:46

Do you see the process running in top/htop?
You could try to (force kill) sigterm the process or if not sigterm the main VBox process. Other than that you would have to reboot the host to release it. I have done this once to release a hung VBox process and I recovered fine, but YMMV so the final decision is up to you!
Perryg
Site Moderator
 
Posts: 34373
Joined: 6. Sep 2008, 22:55
Primary OS: Linux other
VBox Version: OSE self-compiled
Guest OSses: *NIX

Re: VBoxManage: error: The machine 'oracle_vb1' is already locke

Postby silvex » 16. Mar 2011, 00:48

No I don't see it in top or "ps -ef". I didn't want to reboot the whole box. Kind of sucks.
---------------------------------------------
-Ed
http://silvex.smugmug.com
silvex
 
Posts: 45
Joined: 2. Jul 2010, 00:35
Primary OS: MS Windows Vista
VBox Version: OSE other
Guest OSses: Suse 10 SP3

Re: VBoxManage: error: The machine 'oracle_vb1' is already locke

Postby Perryg » 16. Mar 2011, 01:13

You don't see any of these? Your dir will vary, as this is my dev box and VB svn
Code: Select all   Expand viewCollapse view
perry    19349     1 22 16:47 ?        00:18:43 /opt/VirtualBox/VirtualBox --com
perry    19364     1  0 16:47 ?        00:00:02 /opt/VirtualBox/VBoxXPCOMIPCD
perry    19370     1  0 16:47 ?        00:00:05 /opt/VirtualBox/VBoxSVC --auto-s

Perryg
Site Moderator
 
Posts: 34373
Joined: 6. Sep 2008, 22:55
Primary OS: Linux other
VBox Version: OSE self-compiled
Guest OSses: *NIX

Re: VBoxManage: error: The machine 'oracle_vb1' is already locke

Postby silvex » 16. Mar 2011, 04:15

Yes I do see those for the other VMs I have running.
---------------------------------------------
-Ed
http://silvex.smugmug.com
silvex
 
Posts: 45
Joined: 2. Jul 2010, 00:35
Primary OS: MS Windows Vista
VBox Version: OSE other
Guest OSses: Suse 10 SP3

Re: VBoxManage: error: The machine 'oracle_vb1' is already locke

Postby Perryg » 16. Mar 2011, 04:51

OK so there are several. It sounds like the PID has not been deleted for the one that has died. I will see if I can find out how to track that down tomorrow if you don't find it before then. I know that the guest locks to the PID but I have never had to actually locate it. I am guessing somewhere in the /tmp but not sure.
Perryg
Site Moderator
 
Posts: 34373
Joined: 6. Sep 2008, 22:55
Primary OS: Linux other
VBox Version: OSE self-compiled
Guest OSses: *NIX

Re: VBoxManage: error: The machine 'oracle_vb1' is already locke

Postby Sasquatch » 16. Mar 2011, 20:57

You can always put all running VMs in save-state and then wait for the vboxsvc process to quit. Then resume the VMs and the 'locked' one should be released as well.
Read the Forum Posting Guide before opening a topic.
VirtualBox FAQ: Check this before asking questions.
Online User Manual: A must read if you want to know what we're talking about.
Howto: Install Linux Guest Additions
Howto: Use Shared Folders on Linux Guest
See the Tutorials and FAQ section at the top of the Forum for more guides.
Try searching the forums first with Google and add the site filter for this forum.
E.g. install guest additions site:forums.virtualbox.org

Retired from this Forum since OSSO introduction.
Sasquatch
Volunteer
 
Posts: 17800
Joined: 17. Mar 2008, 13:41
Location: /dev/random
Primary OS: Debian other
VBox Version: PUEL
Guest OSses: Windows XP, Windows 7, Linux

Re: VBoxManage: error: The machine 'oracle_vb1' is already locke

Postby silvex » 17. Mar 2011, 17:36

Sasquatch wrote:You can always put all running VMs in save-state and then wait for the vboxsvc process to quit. Then resume the VMs and the 'locked' one should be released as well.


That did not work either.
---------------------------------------------
-Ed
http://silvex.smugmug.com
silvex
 
Posts: 45
Joined: 2. Jul 2010, 00:35
Primary OS: MS Windows Vista
VBox Version: OSE other
Guest OSses: Suse 10 SP3

Re: VBoxManage: error: The machine 'oracle_vb1' is already locke

Postby Perryg » 17. Mar 2011, 18:48

silvex wrote:
Sasquatch wrote:You can always put all running VMs in save-state and then wait for the vboxsvc process to quit. Then resume the VMs and the 'locked' one should be released as well.


That did not work either.

Doing it this way requires that all VBox services actually stop which can take a while. Verify that the VBox deamons are actually stopped or terminate them.

I am still looking for a way to actually change one failed guest but the code is spread all over the place. I find where the imachine::lock is but not how to change it.

You may need to post a ticket at bugtracker to see what the DEVs have to say about it.
Perryg
Site Moderator
 
Posts: 34373
Joined: 6. Sep 2008, 22:55
Primary OS: Linux other
VBox Version: OSE self-compiled
Guest OSses: *NIX

Re: VBoxManage: error: The machine 'oracle_vb1' is already locke

Postby silvex » 17. Mar 2011, 18:54

Here is the output from lsof

Code: Select all   Expand viewCollapse view
COMMAND     PID    USER  FD      TYPE DEVICE SIZE     NODE NAME
VBoxXPCOM  7849   root   7wW    REG              253,1           5   25444354 /tmp/.vbox-root-ipc/lock
VBoxXPCOM  7849   root   10u     unix 0xffff8102469c0080                  21717 /tmp/.vbox-root-ipc/ipcd
VBoxXPCOM  7849   root   11u     unix 0xffff810246e63400                  21720 /tmp/.vbox-root-ipc/ipcd
VBoxXPCOM  7849   root   16u     unix 0xffff8101938f2180                  21731 /tmp/.vbox-root-ipc/ipcd
VBoxXPCOM  7849   root   17u     unix 0xffff810246e620c0                1309076 /tmp/.vbox-root-ipc/ipcd
VBoxXPCOM  7849   root   18u     unix 0xffff8104f80bae40                1413099 /tmp/.vbox-root-ipc/ipcd
VBoxXPCOM  7849   root   19u     unix 0xffff81028d849680                 955734 /tmp/.vbox-root-ipc/ipcd
VBoxXPCOM  7849   root   20u     unix 0xffff81045de31780                 149029 /tmp/.vbox-root-ipc/ipcd


---------------------------------------------
-Ed
http://silvex.smugmug.com
silvex
 
Posts: 45
Joined: 2. Jul 2010, 00:35
Primary OS: MS Windows Vista
VBox Version: OSE other
Guest OSses: Suse 10 SP3

Re: VBoxManage: error: The machine 'oracle_vb1' is already locke

Postby silvex » 17. Mar 2011, 19:04

403 Forbidden (TICKET_CREATE privileges are required to perform this operation)
---------------------------------------------
-Ed
http://silvex.smugmug.com
silvex
 
Posts: 45
Joined: 2. Jul 2010, 00:35
Primary OS: MS Windows Vista
VBox Version: OSE other
Guest OSses: Suse 10 SP3

Re: VBoxManage: error: The machine 'oracle_vb1' is already locke

Postby Perryg » 17. Mar 2011, 19:08

But that still doesn't tell me what to do about it nor what those are actually tied to. the /tmp/.vbox-root-ipc/ipcd is a service from what I can tell.
Still if the guests are saved state and you close down all deamons these files should no longer be there. If they are then you are still going to have a problem IMHO.
But as I said this is way beyond what we can do here at any surety or speed. I strongly suggest that you contact the DEVs as they are the only ones that can tell you for sure what to do without rebooting if that is even possible. You might want to mention the post so they can tell what might have happened in the first place.

You need to set up an account there as it is on a different system.
Perryg
Site Moderator
 
Posts: 34373
Joined: 6. Sep 2008, 22:55
Primary OS: Linux other
VBox Version: OSE self-compiled
Guest OSses: *NIX

Re: VBoxManage: error: The machine 'oracle_vb1' is already locke

Postby silvex » 17. Mar 2011, 20:28

Thanks I just crated an account and created a ticket.

Ticket #8579
http://forums.virtualbox.org/viewtopic.php?f=7&t=39967
---------------------------------------------
-Ed
http://silvex.smugmug.com
silvex
 
Posts: 45
Joined: 2. Jul 2010, 00:35
Primary OS: MS Windows Vista
VBox Version: OSE other
Guest OSses: Suse 10 SP3


Return to VirtualBox on Linux Hosts

Who is online

Users browsing this forum: No registered users and 26 guests