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

Rajiv Jaisankar rajiv.jaisankar at altair.com
Fri Jul 6 10:20:23 PDT 2012

Hi Klaus,

Thank you for your advice. I have made the changes you suggested. But I
am still getting " Cannot open remote session; stopped at
./clienttest.pl line 141" error.

[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
[clienttest] Cannot open remote session; stopped at ./clienttest.pl line

I am not if it used display. But, I checked xclock. That seems to be ok.

[root at server3 samples]# echo $DISPLAY
[root at server3 samples]# xclock
Warning: Missing charsets in String to FontSet conversion
[root at server3 samples]#


-----Original Message-----
From: Klaus Espenlaub [mailto:klaus.espenlaub at oracle.com] 
Sent: Friday, July 06, 2012 9:42 PM
To: vbox-dev at virtualbox.org
Subject: Re: [vbox-dev] unable to startvm using sdk(clienttest.pl) from

Hi Rajiv,

On 06.07.2012 10:07, Rajiv Jaisankar wrote:
> 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
> linux VM 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

This is caused by modifying the VBox API without consistently updating 
this script.

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

That's not the right approach, so this can't fix the problems. You need 
to switch to IVirtualBox::findMachine.

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

Yes, that's expected. The sample code is broken, that's all. There are 
no significant users of the perl API bindings, which is why it slipped 
through the cracks for a while. This shows in a different way, too: the 
bindings are incomplete, e.g. one can't use the enum values without 
jumping through hoops by implementing custom marshaling...

We're working on fixing the bugs in the sample code. In the mean time 
you can use the sample code for other language bindings to see how a VM 
is started with the current API (IMachine::launchVM). It's simpler than 
it used to be.


> Regards,
> Rajiv

vbox-dev mailing list
vbox-dev at virtualbox.org

More information about the vbox-dev mailing list