How to revert/restore a domain to a snapshot on Linux KVM using virsh

Fig.03: Revert domain to snapshot

Fig.03: Revert domain to snapshot

To restore or revert a domain to a snapshot, use the following syntax:
# snapshot-revert domain
# snapshot-revert domain --current --running
# virsh snapshot-revert --domain vm \
--snapshotname snap_name \
--running

Example

First shutdown a vm named ubuntu-box1:
# virsh shutdown ubuntu-box1
Sample outputs:

Domain ubuntu-box1 is being shutdown

Get a list of snapshots:
# virsh snapshot-list --domain ubuntu-box1
Sample outputs:

 Name                 Creation Time             State
------------------------------------------------------------
 02192017             2017-02-19 21:50:58 +0530 shutoff

Okay, revert or restore snapshot:
# virsh snapshot-revert –domain ubuntu-box1 –snapshotname 02192017 –running
Verify it:
# virsh list
Sample outputs:

 Id    Name                           State
----------------------------------------------------
 1     freebsd                        running
 4     ubuntu-box1                    running

Examples and usage: How to create snapshot in Linux KVM VM/Domain