Hello.  I am trying to programmatically create and manage VBox machines.
It's going very well, with one exception.  I often end up with a lock on
VirtualBox.xml, which prevents my API calls from succeeding, even when I do
nothing more than get a list of machines by calling

   VBoxManage list -l vms

This is the output I get in those cases:

VirtualBox Command Line Management Interface Version 3.0.2
(C) 2005-2009 Sun Microsystems, Inc.
All rights reserved.

ERROR: Could not save the settings file 'C:\Documents and
Settings\lgrey\.VirtualBox\VirtualBox.xml' (VERR_ACCESS_DENIED)
Details: code VBOX_E_FILE_ERROR (0x80bb0004), component VirtualBox,
interface IVirtualBox, callee IUnknown
Context: "UnregisterMachine(uuid, machine.asOutParam())" at line 294 of file
VBoxManage.cpp

I am using Groovy, and the call looks like this:

        synchronized(vboxlock) {
            proc = "\"${app.controllers.Vent.vboxHome}VBoxManage\" list -l
vms".execute()
            out = proc.in.text
//            proc.consumeProcessOutput()
            proc.waitForOrKill(1000)
        }

As these problems have persisted, I have taken to decorating the code with
the synchronized block, the waitForOrKill(), etc.  Nothing I've tried has
beeen completely reliable.  I always end up with VirtualBox.xml being locked
eventually.

Also, these VBoxSVC.exe processes are immortal.  I can't kill them with Task
Manager or even SysInternals' ProcExplorer.  In fact, Windows won't even
shutdown normally.  I have no choice but to hold the power button down until
the box turns off.

Am I doing something wrong in my code?  Is this a bug with VBoxManage or the
COM implementation?  Is there a workaround?

Thanks,
Lee Grey
_______________________________________________
vbox-users mailing list
[email protected]
http://vbox.innotek.de/mailman/listinfo/vbox-users

Reply via email to