On 12/08/2015 12:53 PM, Dmitry Andreev wrote: > Hi, > > I'm looking for a way to catch an event about reverting to snapshot. > > As I can see in the code there is no lifecycle event if VM state wasn't changed. > > The comment in the code of qemuDomainRevertToSnapshot: > > /* We have the following transitions, which create the following events: > * 1. inactive -> inactive: none > * 2. inactive -> running: EVENT_STARTED > * 3. inactive -> paused: EVENT_STARTED, EVENT_PAUSED > * 4. running -> inactive: EVENT_STOPPED > * 5. running -> running: none > * 6. running -> paused: EVENT_PAUSED > * 7. paused -> inactive: EVENT_STOPPED > * 8. paused -> running: EVENT_RESUMED > * 9. paused -> paused: none > * Also, several transitions occur even if we fail partway through, > * and use of FORCE can cause multiple transitions. > */ > > Also there is no VIR_DOMAIN_EVENT_DEFINED event after reverting to snapshot, > even when domain configuration is changed. Isn't that strange? Checked on > stopped VM. > > Is there any way to catch event about changes in configuration after reverting > to snapshot. > There's a similar fedora bug about this: https://bugzilla.redhat.com/show_bug.cgi?id=1081148 I think libvirt needs to be extended to handle both the cases you mention - Cole -- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list