VBoxManage list vms|runningvms fails

Discussions related to using VirtualBox on Linux hosts.
Post Reply
ktwilight
Posts: 3
Joined: 14. Feb 2008, 16:39

VBoxManage list vms|runningvms fails

Post by ktwilight »

I've searched around the forum and bugtracker, and also asked in IRC but found nothing relevant to my problem. The problem is not being able to list the running vms in CLI.

For sure the VM is running...

Code: Select all

# ps ax | grep VirtualBox
 3175 ?        Ssl    0:07 /usr/lib/virtualbox/VirtualBox
 4411 ?        Sl    13:26 /usr/lib/virtualbox/VirtualBox -comment Windows 2000 General -startvm a394c04d-ca2d-4946-96a6-dd83d9f1b7ac
Executing VBoxManage to check for runningvms shows me nothing...

Code: Select all

# VBoxManage list runningvms
VirtualBox Command Line Management Interface Version 2.1.2
(C) 2005-2009 Sun Microsystems, Inc.
All rights reserved.

Alternative check to confirm that the vm is detected is to run showvminfo both using UUID and Name. Both gave me errors.

Code: Select all

# VBoxManage showvminfo a394c04d-ca2d-4946-96a6-dd83d9f1b7ac
VirtualBox Command Line Management Interface Version 2.1.2
(C) 2005-2009 Sun Microsystems, Inc.
All rights reserved.

[!] FAILED calling a->virtualBox->GetMachine (uuid, machine.asOutParam()) at line 1872!
[!] Primary RC  = VBOX_E_OBJECT_NOT_FOUND (0x80BB0001) - Object corresponding to the supplied arguments does not exist
[!] Full error info present: true , basic error info present: true 
[!] Result Code = VBOX_E_OBJECT_NOT_FOUND (0x80BB0001) - Object corresponding to the supplied arguments does not exist
[!] Text        = Could not find a registered machine with UUID {a394c04d-ca2d-4946-96a6-dd83d9f1b7ac}
[!] Component   = VirtualBox, Interface: IVirtualBox, {339abca2-f47a-4302-87f5-7bc324e6bbde}
[!] Callee      = IVirtualBox, {339abca2-f47a-4302-87f5-7bc324e6bbde}


# VBoxManage showvminfo 'Windows 2000 General'
VirtualBox Command Line Management Interface Version 2.1.2
(C) 2005-2009 Sun Microsystems, Inc.
All rights reserved.

[!] FAILED calling a->virtualBox->FindMachine (Bstr(a->argv[0]), machine.asOutParam()) at line 1876!
[!] Primary RC  = VBOX_E_OBJECT_NOT_FOUND (0x80BB0001) - Object corresponding to the supplied arguments does not exist
[!] Full error info present: true , basic error info present: true 
[!] Result Code = VBOX_E_OBJECT_NOT_FOUND (0x80BB0001) - Object corresponding to the supplied arguments does not exist
[!] Text        = Could not find a registered machine named 'Windows 2000 General'
[!] Component   = VirtualBox, Interface: IVirtualBox, {339abca2-f47a-4302-87f5-7bc324e6bbde}
[!] Callee      = IVirtualBox, {339abca2-f47a-4302-87f5-7bc324e6bbde}
Am I doing something wrong? Or...?

Other relevant information

Code: Select all

# uname -a
Linux eXiSts 2.6.26-1-amd64 #1 SMP Sat Jan 10 17:57:00 UTC 2009 x86_64 GNU/Linux

# dpkg -l 'virtualbox-2.1' | tail -1
ii  virtualbox-2.1                       2.1.2-41885_Debian_lenny   Sun xVM VirtualBox
Thanks first! :)
ktwilight
Posts: 3
Joined: 14. Feb 2008, 16:39

Re: VBoxManage list vms|runningvms fails

Post by ktwilight »

Hm, it seems that I can't run it as root. As normal user, it's perfectly fine.

Am guessin' this is expected.
Sasquatch
Volunteer
Posts: 17798
Joined: 17. Mar 2008, 13:41
Primary OS: Debian other
VBox Version: PUEL
Guest OSses: Windows XP, Windows 7, Linux
Location: /dev/random

Post by Sasquatch »

Running it as a different user (root in this case) will of course produce no output when there are no VMs running as root.
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.
ktwilight
Posts: 3
Joined: 14. Feb 2008, 16:39

Post by ktwilight »

Yup, just thought root has a know-all-see-all... :)

Now I just need to figure out how to incorporate my script with this situation. Thanks!
Sasquatch
Volunteer
Posts: 17798
Joined: 17. Mar 2008, 13:41
Primary OS: Debian other
VBox Version: PUEL
Guest OSses: Windows XP, Windows 7, Linux
Location: /dev/random

Post by Sasquatch »

You can use su -u <username> to run things as a different user when running things from the root account. Check this first by starting a VM and run the listvm command from a root terminal.
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.
glindauer
Posts: 5
Joined: 27. Jan 2011, 17:32
Primary OS: Mac OS X Leopard
VBox Version: OSE other
Guest OSses: Windows XP

Re: VBoxManage list vms|runningvms fails

Post by glindauer »

Thanks for this great post! I had the exact same problem

Code: Select all

VBoxManage: error: Could not find a registered machine named 'windows'
VBoxManage: error: Details: code VBOX_E_OBJECT_NOT_FOUND (0x80bb0001), component VirtualBox, interface IVirtualBox, callee nsISupports
but it would happen intermittently, and I just couldn't figure it out.

Of course, just as you say, it was because I was logged in as a different user from the one the machine ran under.

I appreciate the solution!

Greg
bleve97
Posts: 17
Joined: 16. Jun 2011, 14:10
Primary OS: OpenSolaris other
VBox Version: OSE other
Guest OSses: XP, windows SBS

Re: VBoxManage list vms|runningvms fails

Post by bleve97 »

I'm seeing this on a VB 4.1.8 install on CentOS 6.2 host, windows server (SBS 2011 and 2008 R2 server) guests :

[synstrat@mule ~]$ VBoxManage list vms
"synstrat01-2011" {2968cbe7-2596-430a-829d-be408d7ac50f}
"synstrat02" {63a4bf9c-9e31-4432-9df3-505dee93ad20}
[synstrat@mule ~]$ VBoxManage list runningvms
[synstrat@mule ~]$


synstrat02 and synstrat01-2011 are both running, and the VM is running as the correct user (or "VBoxManage list vms" would not see them).

Any suggestions?
bleve97
Posts: 17
Joined: 16. Jun 2011, 14:10
Primary OS: OpenSolaris other
VBox Version: OSE other
Guest OSses: XP, windows SBS

Re: VBoxManage list vms|runningvms fails

Post by bleve97 »

no ideas? No suggestions?
jigglywiggly
Posts: 29
Joined: 18. Aug 2009, 03:29
Primary OS: MS Windows 2008
VBox Version: OSE Debian
Guest OSses: windows 7

Re: VBoxManage list vms|runningvms fails

Post by jigglywiggly »

i have the same problme
i have a ups and it calls a save state function
but it runs it as root
therefore it sees nothing with

VBoxManage list runningvms


help?
timthetortoise
Posts: 5
Joined: 21. Mar 2012, 14:42

Re: VBoxManage list vms|runningvms fails

Post by timthetortoise »

su -u <username-for-running-vms> VBoxManage list runningvms
Post Reply