[vbox-dev] Change setting with java Main API
renzi.fede at gmail.com
Fri May 30 09:59:36 UTC 2014
Errata corrige: I use launchVMProcess() method to start up the machine with
a frontend, so It will be that frontend the lock owner on machine, isn't it?
Let me see if I completely understood:
The only way to change setting (and make them effective) during runtime is
to have write lock on my machine and I can't do it starting up the machine
using an existing frontend...right?
If it is correct, I will have to write my own frontend...
Sorry for these questions but I'm newbie and VirtualBox is...huge!:-)
2014-05-30 9:07 GMT+02:00 Federica Renzi <renzi.fede at gmail.com>:
> thanks for your response!
> Well...I tried to use LockType.Shared but It doesn't let me to save
> setting ( The function "saveSettings" returned an error condition: "The
> machine is not mutable (state is Running)")
> Yes, The machine is running under my control (in theory), because I
> started it up using java Main Api.
> I really would like to change some setting while it is running but I don't
> understand if it's possible.
> 2014-05-29 22:07 GMT+02:00 Maxime Dor <maxime.dor at altherian.org>:
> Use LockType.Shared instead - some other process must already be using the
>> VM (is it running?)
>> On 29 May 2014 10:12, Federica Renzi <renzi.fede at gmail.com> wrote:
>>> Hi everyone,
>>> I'm trying to change some VM setting during the execution of virtualbox.
>>> I read in SDK documentation that it's possible only locking the machine and
>>> saving its state, otherwise no change will be performed.
>>> I tried to achieve it using java api (com-xpcom glue) and custumize
>>> TestVBox.java, but I fall into these errors:
>>> - if I write
>>> m.lockMachine(sess, LockType.fromValue(2)); // lock write
>>> The function "lockMachine" returned an error condition: "The machine
>>> 'NAME' is already locked for a session (or being unlocked)" (0x80bb0007)
>>> - if I write
>>> The function "unlockMachine" returned an error condition: "The
>>> session is not locked (session state: Unlocked)" (0x8000ffff)
>>> - if I write directly (without any lock command)
>>> The function "saveSettings" returned an error condition: "The
>>> machine is not mutable (state is Running)" (0x80bb0002)
>>> How could I solve it?
>>> Federica Renzi
>>> vbox-dev mailing list
>>> vbox-dev at virtualbox.org
> Federica Renzi
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the vbox-dev