[vbox-dev] unable to startvm using sdk(clienttest.pl) from VMs

Rajiv Jaisankar rajiv.jaisankar at altair.com
Fri Jul 6 01:07:00 PDT 2012


 

Hi Virtualbox dev,

 

I have a windows machine hosting VMs(hostmachine). I have a few vms -
server1, server2, server3. I have a requirement of starting other vms
from a VM. For example, I would like to start server1 or server2 from my
linux VM server3. 

 

Below are the things I did

 

1.       Upgraded Virtualbox to 4.1.18 r78351
(http://download.virtualbox.org/virtualbox/4.1.18/VirtualBox-4.1.18-7836
1-Win.exe )

2.       Started webserver in the windows machine hosting vms
(hostmachine) - VboxWebSrv.exe -H 0.0.0.0

3.       Downloaded sdk
(http://download.virtualbox.org/virtualbox/4.1.18/VirtualBoxSDK-4.1.18-7
8361.zip) in vm - server3

4.       Installed appropriate perl modules and modified vboxService.pm
to point to correct URL.

5.       Clienttest.pl of listvms works fine.

 

[root at rhel5-64 samples]# ./clienttest.pl --help

clienttest: test the VirtualBox web service.

Usage:

    clienttest <mode>

with <mode> being one of 'version', 'list', 'start'; default is 'list'.

    clienttest version: print version of VirtualBox web service.

    clienttest list: list installed virtual machines.

    clienttest startvm <vm>: start the virtual machine named <vm>.

 

[root at server3 samples]# ./clienttest.pl

Subroutine XML::Parser::Lite::_parse_re redefined at
/usr/lib/perl5/site_perl/5.8.8/XML/Parser/Lite.pm line 144.

[clienttest] Listing machines:

machine IMachine cfa8ecdddb56ca06-0000000000000140: server1

machine IMachine cfa8ecdddb56ca06-0000000000000141: server2

machine IMachine cfa8ecdddb56ca06-0000000000000142: server3

                

6.       Clienttest.pl of startvm is not working

[root at server3 samples]# pwd

/root/sdk/bindings/webservice/perl/samples

 

i.                     Run without modifying clienttest.pl

 

[root at server3 samples]# ./clienttest.pl startvm server2

Subroutine XML::Parser::Lite::_parse_re redefined at
/usr/lib/perl5/site_perl/5.8.8/XML/Parser/Lite.pm line 144.

Unrecognized method 'IVirtualBox_getMachine'. List of available
method(s): IVirtualBox_getExtraData IStorageController_getBus
IMachine_queryLogFilename IMedium_setType IMachine_getName
IMachineRegisteredEvent_getRegistered IProgress_getTimeout
IMedium_getState ISnapshot_getChildren
ISystemProperties_getFreeDiskSpacePercentError 

..

....

 

 

ii.                   Run modifying clienttest.pl

 

Modified clienttest.pl and changed getMachine to getMachines - this will
get the first of the vm list i.e. uid of server1

 

C:\Users\rajivj>VBoxManage list vms

"server1" {e45fc242-0adc-4b84-a26b-bac23a63bbf4}

"server2" {f57c673b-e2b7-4f1d-85cb-d9e287c8fbcf}

"server3" {6b2c0c8b-e055-4ed3-bbde-27bcb05b35fe}

...

 

[root at server3 samples]# ./clienttest.pl startvm server1

Subroutine XML::Parser::Lite::_parse_re redefined at
/usr/lib/perl5/site_perl/5.8.8/XML/Parser/Lite.pm line 144.

[clienttest] UUID: e45fc242-0adc-4b84-a26b-bac23a63bbf4

Unrecognized method 'IVirtualBox_openRemoteSession'. List of available
method(s): IVirtualBox_getExtraData IStorageController_getBus
IMachine_queryLogFilename IMedium_setType IMachine_getName
IMachineRegisteredEvent_getRegistered IProgress_getTimeout
IMedium_getState ISnapshot_getChildren
ISystemProperties_getFreeDiskSpacePercentError IMachine_getOSTypeId
IVRDEServer_setVRDEProperty ISystemProperties_getMaxGuestMonitors
IBandwidthGroup_getType IMachine_getCPUIDLeaf ISnapshot_setName
ISerialPort_setServer 

 ...

.....

 

 

Is it expected that IVirtualBox class/java code doesn't have functions
getMachine and openRemoteSession? Can we get the modified IVirtualBox
class or jar file?

 

Regards,

Rajiv

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.virtualbox.org/pipermail/vbox-dev/attachments/20120706/bf6d245b/attachment-0001.html 


More information about the vbox-dev mailing list