To revert the state of a KVM instance to an older state, from an existing snapshot, run the following:
- Connect to the KVM instance and create a new file:
root@kvm:~# virsh console kvm1Connected to domain kvm1Escape character is ^]root@debian:~# touch SNAPSHOTroot@debian:~#root@kvm:~#
- Create an internal snapshot of the virtual machine:
root@kvm:~# virsh snapshot-create kvm1Domain snapshot 1492802417 createdroot@kvm:~#
- Get information about the snapshot:
root@kvm:~# virsh snapshot-info kvm1 --snapshotname 1492802417Name: 1492802417Domain: kvm1Current: yesState: runningLocation: internalParent: 1492797458Children: 0Descendants: 0Metadata: yesroot@kvm:~#
- Connect back to the virtual machine and delete the file we created ...