KVM snapshots using virsh

Create snapshot of your VM

To take a complete snapshot of the VM called ece7, do:

$ virsh shutdown ece7
$ virsh snapshot-create-as --domain ece7 --name ece7-full-stack-working

Restore your VM to a previous snapshot

To restore it, do:

$ virsh shutdown ece7
$ virsh snapshot-revert --domain ece7
$ virsh start ece7

List all snapshots of a given VM

To list all snapshots available for your VM, do:

$ virsh snapshot-list --domain ece7
Name                      Creation Time               State
----------------------------------------------------------------
ece7-full-stack-working   2023-06-30 13:44:48 +0200   shutoff

~ /home 🏠 ~ talks 💬 ~ bash ~ craftsmanship ~ db ~ dongxi ~ emacs ~ escenic ~ iam ~ java ~ js ~ language ~ latex ~ ldap ~ life ~ linux ~ llm ~ mac-os-x ~ mt-foo ~ network ~ norsk ~ python ~ quotes ~ running ~ security ~ travel ~ unix ~ various ~ vcs ~ webdesign ~ windows ~ discoveries ~ cv 🧙 ~

Licensed under CC BY Creative Commons License ~ 📡 RSS feed ~ ✉ torstein.k.johansen @ gmail ~ 🐘 @skybert@hachyderm.io ~ 🎥 youtube.com/@skybert