GNOME Bugzilla – Bug 735688
Reverting a VM puts it into running state
Last modified: 2016-09-20 08:15:55 UTC
I think this is a bit unexpected. Perhaps we should suspend it back automatically if VM was suspended before revert?
That was the problem with the disconnected display when the user starts the VM and then goes to the property, reverts to a non-running snapshot and then goes back. Since the display disconnects, we simply start the VM again, the display connects and the user can just go back like normal. We only do that if the target snapshot's state is SHUTOFF though. I'm not sure what a better behavior would be, only start it if the target snapshot is SHUTOFF *and* the state of the current VM is RUNNING?
(In reply to comment #1) > That was the problem with the disconnected display when the user starts the VM > and then goes to the property, reverts to a non-running snapshot and then goes > back. Since the display disconnects, we simply start the VM again, the display > connects and the user can just go back like normal. We only do that if the > target snapshot's state is SHUTOFF though. > > I'm not sure what a better behavior would be, only start it if the target > snapshot is SHUTOFF *and* the state of the current VM is RUNNING? I think the correct behaviour would be to simply restore the original state of the VM, no?
(In reply to comment #2) > (In reply to comment #1) > > That was the problem with the disconnected display when the user starts the VM > > and then goes to the property, reverts to a non-running snapshot and then goes > > back. Since the display disconnects, we simply start the VM again, the display > > connects and the user can just go back like normal. We only do that if the > > target snapshot's state is SHUTOFF though. > > > > I'm not sure what a better behavior would be, only start it if the target > > snapshot is SHUTOFF *and* the state of the current VM is RUNNING? > > I think the correct behaviour would be to simply restore the original state of > the VM, no? I assume by "original state" you mean the state the VM had before the revert?
(In reply to comment #3) > (In reply to comment #2) > > (In reply to comment #1) > > > That was the problem with the disconnected display when the user starts the VM > > > and then goes to the property, reverts to a non-running snapshot and then goes > > > back. Since the display disconnects, we simply start the VM again, the display > > > connects and the user can just go back like normal. We only do that if the > > > target snapshot's state is SHUTOFF though. > > > > > > I'm not sure what a better behavior would be, only start it if the target > > > snapshot is SHUTOFF *and* the state of the current VM is RUNNING? > > > > I think the correct behaviour would be to simply restore the original state of > > the VM, no? > > I assume by "original state" you mean the state the VM had before the revert? yes. :)
commit: 0c42ba6 0c42ba6b427a596055d65999a9f5b2f6b1e24b6c Author: Zeeshan Ali (Khattak) <zeeshanak@gnome.org> Date: Thu Oct 23 00:39:49 2014 +0100 snapshot-list-row: Start machine on revert if prev state was DISPLAY Its wrong to always override the state of the machine to running after reverting to a snapshot. This was only done for the case of user entering snapshots view from display so lets ensure that indeed is the case before overriding the state of machine. With this change, libvirt should ensure that after getting reverted to a snapshot, machine is back in the state that it was when the snapshot in question was taken.