Page 1 of 1

VirtualBox.getMachines() returns empty List [SOLVED]

Posted: 7. May 2009, 11:10
by sprintf
hi,

i have virtualbox (vb) v2.2.2 installed on a linux box with 9 guests running and have VirtualBoxSDK-2.2.2-46594 installed on my windows XP laptop.

just ran the example code clienttest.java (came with the SDK) from eclipse. logs in and out of the vb host but does NOT list the guests. have debugged the code and found the code returns an empty list when it should return 9 guests.

can anyone help?

thx in advance!

Code: Select all

mgr = new IWebsessionManager("http://192.168.1.9:18083/");
vbox = mgr.logon("test", "test");
System.out.println("Initialized connection to VirtualBox version " + vbox.getVersion());

List<IMachine> machines=vbox.getMachines();
for (IMachine m : machines)
{
    System.out.println("Machine: " + m.getName());
}

Re: VirtualBox.getMachines() returns empty List [SOLVED]

Posted: 8. May 2009, 00:34
by sprintf
hi,


it is now working.


i had the vboxwebsrv running under a user different from the vbox installation.

once i ran the vboxwebsrv under the same user as the vbox installation all worked fine :mrgreen:

Re: VirtualBox.getMachines() returns empty List [SOLVED]

Posted: 6. Jul 2010, 03:49
by athanazio
thanks a bunch for your post !!
I had the same problem of running with different user.

running with the same worked fine.
:D