O'Reilly logo

KVM Virtualization Cookbook by Konstantin Ivanov

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

How to do it...

To create a new KVM snapshot, follow these steps:

  1. Create an internal snapshot of the running instance:
root@kvm:~# virsh snapshot-create kvm1Domain snapshot 1492797458 createdroot@kvm:~#
  1. Examine the location of the new snapshot configuration:
root@kvm:~# ls -la /var/lib/libvirt/qemu/snapshot/total 12drwxr-xr-x 3 libvirt-qemu kvm 4096 Apr 21 14:05 .drwxr-x--- 6 libvirt-qemu kvm 4096 Apr 21 14:04 ..drwxr-xr-x 2 root root 4096 Apr 21 17:57 kvm1root@kvm:~# ls -la /var/lib/libvirt/qemu/snapshot/kvm1/total 12drwxr-xr-x 2 root root 4096 Apr 21 17:57 .drwxr-xr-x 3 libvirt-qemu kvm 4096 Apr 21 14:05 ..-rw------- 1 root root 3089 Apr 21 17:57 1492797458.xmlroot@kvm:~#
  1. Examine the snapshot XML definition:
root@kvm:~# cat /var/lib/libvirt/qemu/snapshot/kvm1/1492797458.xml ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required