After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 735688 - Reverting a VM puts it into running state
Reverting a VM puts it into running state
Status: RESOLVED FIXED
Product: gnome-boxes
Classification: Applications
Component: snapshots
3.13.x
Other Linux
: Normal normal
: --
Assigned To: GNOME Boxes maintainer(s)
GNOME Boxes maintainer(s)
Depends on:
Blocks:
 
 
Reported: 2014-08-29 19:10 UTC by Zeeshan Ali
Modified: 2016-09-20 08:15 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Zeeshan Ali 2014-08-29 19:10:43 UTC
I think this is a bit unexpected. Perhaps we should suspend it back automatically if VM was suspended before revert?
Comment 1 Timm Bäder 2014-08-29 19:38:38 UTC
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?
Comment 2 Zeeshan Ali 2014-08-29 23:05:58 UTC
(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?
Comment 3 Timm Bäder 2014-08-30 07:32:43 UTC
(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?
Comment 4 Zeeshan Ali 2014-09-01 14:42:18 UTC
(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. :)
Comment 5 Zeeshan Ali 2014-10-22 23:55:00 UTC
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.