Page 1 of 1

WebService problems

Posted: 12. Jan 2013, 23:08
by DarkRift
I'm having a problem with the vboxwebsrv app on windows. 'm on windows 7 and all my VMs are stored in c:\users\Richard\VirtualBox Vms but when I launch the web service, and try to get the guest property of a vm, the web service tries to load information in c:\users\Richard\.VirtualBox\VMNAME anything I can do to change that ?

There is no such options for vboxwebsrv to specify the folder for vms, at least not displayed with "vboxwebsrv --help"
I'm using vbox 4.2.4 if that can help


Here's the output of the web service execution :

00:00:17.628000 SQW01 New SOAP thread started
00:00:17.628000 SQW01 Processing connection from IP=127.0.0.1 socket=784 (0 out of 1 threads idle)
00:00:17.675000 SQW01 API return code: 0x80004005 (E_FAIL)
00:00:17.675000 SQW01 COM error info result code: 0x80004005
00:00:17.675000 SQW01 COM error info text: Runtime error opening 'C:\Users\richard\.VirtualBox\test2' for reading: -102 (File not found.).
00:00:17.675000 SQW01 D:\tinderbox\win-4.2\src\VBox\Main\src-server\MachineImpl.cpp[469] (long __cdecl Machine::initFromSettings(class VirtualBox *,const class com::Utf8Str &,const class com::Guid *))

Anything I can do to fix/change that folder ?

My ultimate goal in fact is to be able to clone a VM, start it, and get it's ip once it is finished starting, all that through the web service of my other machine that will hosts all the vms (so not local to the executing code, because I could get the ip from the ARP table directly...)

Re: WebService problems

Posted: 13. Jan 2013, 00:22
by noteirak
The webservice is yet another front-end for the Virtualbox COM core object, which means that if it goes look into the wrong folder, you need to configure Virtualbox properly.

Re: WebService problems

Posted: 13. Jan 2013, 04:50
by DarkRift
The only place I cansee to configure a folder is fo the default virtual vm folder. Here's the configuration chunk :

<SystemProperties LogHistoryCount="3" webServiceAuthLibrary="null" VRDEAuthLibrary="VBoxAuth" defaultHardDiskFormat="VDI" defaultMachineFolder="C:\Users\richard\VirtualBox VMs"/>

Where else can I configure some path for the COM core in windows ?

In the regedit, the only keys talk about the install dir which is not that folder either..

Re: WebService problems

Posted: 13. Jan 2013, 11:53
by noteirak
Can you do the same operation via vboxmanage?

Re: WebService problems

Posted: 13. Jan 2013, 15:07
by DarkRift
When I do that I get a "No value set!" response instead of an error

Re: WebService problems

Posted: 13. Jan 2013, 15:09
by DarkRift
Or the error is going into some file I have no idea of ?

Re: WebService problems

Posted: 13. Jan 2013, 15:34
by noteirak
Which language are you using to link to the webserver?

Re: WebService problems

Posted: 13. Jan 2013, 16:30
by DarkRift
Java

But I just upgraded vbox to version 4.2.6 and I can now receive the ip correctly and I have just found the problem ... I used a portion a java sample code in the SDK zip file which was calling vbox.openMachine(name), and this was the culprit for the file not found message. Although upgrading to the 4.2.6 somewhat solved the problem of retrieving the guest property as I had the addition installed on the VM but was receiving an empty string.

Thanks for your time and help.