ModEdit; related ticket: #19074: VM Stuck in "offline snapshotting" state
Hi. I'm working on a Perl+Curses TUI front-end for a headless VirtualBox server. It uses the vboxwebsrv webservice via the SOAP::Lite package to interact with VirtualBox. I am following the API documented in the latest SDK from Oracle (6.0.10).
When my scripts initiate a snapshot of a powered-off machine via IMachine::takeSnapshot, the VM then becomes stuck in "offline snapshotting" state ("stuck" as in it's been in that state for over 12 hours). As far as I can tell, no useful messages are written to either the VM's log (VBox.log) or the user's VBoxSVC.log. This is what the script does:
- Get an ISession object via IWebSessionManager::getSessionObject
- Lock the session in Shared mode via IMachine::lockMachine
- Get a mutable IMachine object with ISession::getMachine
- Initiate the snapshot from the mutable IMachine object, getting an IProgress object, with IMachine::takeSnapshot
- Start a modal window which periodically queries the IProgress interface for its status until IProgress::complete returns true
Primary question:
How do I safely get the VM out of this "offline snapshotting" state? I've run into this more than once as I'm working on this set of scripts, and have rendered one VM completely unbootable in my attempts to regain control of it. I'm loath to corrupt another one.
Aside: Is there a better place to pose questions involving the webservice? Would this be more appropriate in the "Third Party Applications" thread?
Environment info:
- Host OS is Debian Buster 64-bit.
- Guest OS is Windows 7 Ultimate 32-bit.
- VBoxHeadless --version gives 6.0.10r132072.
- VBox.log does not get anything written to it.