VBoxManage list vms|runningvms fails

Discussions related to using VirtualBox on Linux hosts.

VBoxManage list vms|runningvms fails

Postby ktwilight » 5. Feb 2009, 16:25

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   Expand viewCollapse view
# 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   Expand viewCollapse view
# 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   Expand viewCollapse view
# 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   Expand viewCollapse view
# 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

Postby ktwilight » 5. Feb 2009, 16:40

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

Am guessin' this is expected.
ktwilight
 
Posts: 3
Joined: 14. Feb 2008, 16:39

Postby Sasquatch » 7. Feb 2009, 20:25

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.
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

Postby ktwilight » 12. Feb 2009, 10:42

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!
ktwilight
 
Posts: 3
Joined: 14. Feb 2008, 16:39

Postby Sasquatch » 18. Feb 2009, 20:32

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.
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 list vms|runningvms fails

Postby glindauer » 1. Mar 2011, 16:40

Thanks for this great post! I had the exact same problem
Code: Select all   Expand viewCollapse view
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
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

Postby bleve97 » 12. Feb 2012, 11:34

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

Postby bleve97 » 14. Feb 2012, 06:17

no ideas? No 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

Postby jigglywiggly » 19. Mar 2012, 06:19

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?
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

Postby timthetortoise » 26. Mar 2012, 16:48

su -u <username-for-running-vms> VBoxManage list runningvms
timthetortoise
 
Posts: 5
Joined: 21. Mar 2012, 14:42


Return to VirtualBox on Linux Hosts

Who is online

Users browsing this forum: No registered users and 16 guests