On Tue, Aug 10, 2010 at 7:35 PM, Ian Moore <[email protected]> wrote: > Try this instead: > <code> > ISession session = manager.getSesscionObject(vbox); > vbox.openExistingSession(session, machine.getId()); > IProgress progress = session.getConsole().powerDown(); > progress.waitForCompletion(-1); > long result = progress.getResultCode(); > session.close(); > vbox.openSession(session, machine.getId()); > ISnapshot snapshot1 = machine.findSnapshot("snapshot1"); > IProgress progress = session.getConsole().restoreSnapshot(snapshot); > // ... do what you want with progress. When complete ... > session.close(); > <code> > Let me know how it goes.
It works except that an exception is raised at the first session.close(): WebServiceException: "org.virtualbox_3_1.RuntimeFaultMsg: VirtualBox error: The session is not open (session state: Closed) (0x2147549183)" the code work after removing this line. Alex Barna. _______________________________________________ vbox-dev mailing list [email protected] http://vbox.innotek.de/mailman/listinfo/vbox-dev
