Java WS VirtualBoxManager 4.3.26 Incompatability

Discussion about using the VirtualBox API, Tutorials, Samples.
Post Reply
Elz
Posts: 4
Joined: 14. Aug 2014, 04:28

Java WS VirtualBoxManager 4.3.26 Incompatability

Post by Elz »

I am porting code built using the older 4.1 API to 4.3 which started a group of VMs using the VirtualBoxManager (as per the sdk doc 10.3 example)

Code: Select all

VirtualBoxManager mgr = VirtualBoxManager.createInstance(null);
...
mgr.startVm(vm.getName(), vmProps.getType(), 7000);
The VirtualBoxManager.startVm() method seems to have been removed from the java bindings (the example is incorrect in the sdk docs and still shows this method).

What is the correct method to use to start a vm now?
noteirak
Site Moderator
Posts: 5229
Joined: 13. Jan 2012, 11:14
Primary OS: Debian other
VBox Version: OSE Debian
Guest OSses: Debian, Win 2k8, Win 7
Contact:

Re: Java WS VirtualBoxManager 4.3.26 Incompatability

Post by noteirak »

The corresponding method is now IMachine::launchVMProcess().
Hyperbox - Virtual Infrastructure Manager - https://apps.kamax.lu/hyperbox/
Manage your VirtualBox infrastructure the free way!
Elz
Posts: 4
Joined: 14. Aug 2014, 04:28

Re: Java WS VirtualBoxManager 4.3.26 Incompatability

Post by Elz »

I changed my call from:

Code: Select all

mgr.startVm(vm.getName(), vmProps.getType(), 7000);
to

Code: Select all

vm.launchVMProcess(mgr.getSessionObject(), vmProps.getType(), " ");
The first few vms start as expected, then I get errors throws for the launchVMProcess for all other vms I am trying to start:

VirtualBox error: The given session is busy
noteirak
Site Moderator
Posts: 5229
Joined: 13. Jan 2012, 11:14
Primary OS: Debian other
VBox Version: OSE Debian
Guest OSses: Debian, Win 2k8, Win 7
Contact:

Re: Java WS VirtualBoxManager 4.3.26 Incompatability

Post by noteirak »

You can check my code sample from the Samples topic.
Hyperbox - Virtual Infrastructure Manager - https://apps.kamax.lu/hyperbox/
Manage your VirtualBox infrastructure the free way!
Post Reply