[vbox-dev] Fail to restore snapshot remotely

Alex alex.lavoro.propio at gmail.com
Wed Aug 11 11:26:43 GMT 2010


On Tue, Aug 10, 2010 at 7:35 PM, Ian Moore <imooreyahoo at gmail.com> 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.




More information about the vbox-dev mailing list