From 9c0f1ea53c3e9d655ceb48ee08de45c75137d51c Mon Sep 17 00:00:00 2001 From: Slavka Peleva Date: Wed, 16 Sep 2020 12:48:16 +0300 Subject: [PATCH 1/4] [WIP] Storage-based VM snapshots on KVM Documentation fo pull request - https://github.com/apache/cloudstack/pull/3724 --- source/adminguide/virtual_machines.rst | 34 +++++++++++++++++++++++++- 1 file changed, 33 insertions(+), 1 deletion(-) diff --git a/source/adminguide/virtual_machines.rst b/source/adminguide/virtual_machines.rst index 052f670219..4ca32355c2 100644 --- a/source/adminguide/virtual_machines.rst +++ b/source/adminguide/virtual_machines.rst @@ -814,7 +814,8 @@ like many other resources in CloudStack. KVM supports VM snapshots when using NFS shared storage. If raw block storage is used (i.e. Ceph), then VM snapshots are not possible, since there is no possibility -to write RAM memory content anywhere. +to write RAM memory content anywhere. In such cases you can use as an alternative +:ref:`storage-based-snapshots-kvm` If you need more information about VM snapshots on VMware, check out the VMware documentation and the VMware Knowledge Base, especially @@ -822,6 +823,36 @@ VMware documentation and the VMware Knowledge Base, especially `_. +.. _storage-based-snapshots-kvm: + +Storage-based VM snapshots on KVM +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +CloudStack introduces a new Storage-based VM snapshots on KVM feature that provides +crash-consistent snapshots of all disks attached to the VM. It employs the underlying storage +providers’ capability to create/revert/delete disk snapshots. Consistency is obtained by freezing +the virtual machine before the snapshotting. Memory snapshots are not supported. There are +no limitations of disk formats - it supports both RAW and QCOW2 formats. + +.. note:: + ``freeze`` and ``thaw`` of virtual machine is maintained by the guest agent. + ``qemu-guest-agent`` has to be installed in the VM. + +It is recommended to use this functionality on virtual machines with raw block storages. For +virtual machines with mixed type of volumes (raw and qcow2 format), the QCOW2 disk will +be snapshotted with qemu command ``drive-backup`` . This is a point-in-time copy of a block +device to a new destination (slow operation). + +.. note:: + ``snapshot.backup.to.secondary`` must be enabled for volumes on NFS. + +When the snapshotting is complete, the virtual machine is thawed. + +.. note:: + ``qemu`` version 1.6+ is required. + Latest Ubuntu should already cover this, for RHEL/CentOS7 the ``qemu-kvm-ev`` package is required. + + Limitations on VM Snapshots --------------------------- @@ -857,6 +888,7 @@ Configuration Description Type ====================== ======================== vmsnapshots.max The maximum number of VM snapshots that can be saved for any given virtual machine in the cloud. The total possible number of VM snapshots in the cloud is (number of VMs) \* vmsnapshots.max. If the number of snapshots for any VM ever hits the maximum, the older ones are removed by the snapshot expunge job vmsnapshot.create.wait Number of seconds to wait for a snapshot job to succeed before declaring failure and issuing an error. +kvm.vmstoragesnapshot.enabled For live snapshot of virtual machine instance on KVM hypervisor without memory. Requieres qemu version 1.6+ (on NFS or Local file system) and qemu-guest-agent installed on guest VM ====================== ======================== From 6e62e4ab34e1e4733aeac55f58f6d68853e0579b Mon Sep 17 00:00:00 2001 From: Slavka Peleva Date: Tue, 12 Apr 2022 10:02:51 +0300 Subject: [PATCH 2/4] Removed information for QCOW2 support --- source/adminguide/virtual_machines.rst | 19 +++++-------------- 1 file changed, 5 insertions(+), 14 deletions(-) diff --git a/source/adminguide/virtual_machines.rst b/source/adminguide/virtual_machines.rst index 4ca32355c2..97e73ba2b7 100644 --- a/source/adminguide/virtual_machines.rst +++ b/source/adminguide/virtual_machines.rst @@ -828,30 +828,21 @@ VMware documentation and the VMware Knowledge Base, especially Storage-based VM snapshots on KVM ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.. note:: + For now this functionality is limited for NFS and Local storage. + CloudStack introduces a new Storage-based VM snapshots on KVM feature that provides crash-consistent snapshots of all disks attached to the VM. It employs the underlying storage providers’ capability to create/revert/delete disk snapshots. Consistency is obtained by freezing -the virtual machine before the snapshotting. Memory snapshots are not supported. There are -no limitations of disk formats - it supports both RAW and QCOW2 formats. +the virtual machine before the snapshotting. Memory snapshots are not supported. .. note:: ``freeze`` and ``thaw`` of virtual machine is maintained by the guest agent. ``qemu-guest-agent`` has to be installed in the VM. -It is recommended to use this functionality on virtual machines with raw block storages. For -virtual machines with mixed type of volumes (raw and qcow2 format), the QCOW2 disk will -be snapshotted with qemu command ``drive-backup`` . This is a point-in-time copy of a block -device to a new destination (slow operation). - -.. note:: - ``snapshot.backup.to.secondary`` must be enabled for volumes on NFS. - When the snapshotting is complete, the virtual machine is thawed. -.. note:: - ``qemu`` version 1.6+ is required. - Latest Ubuntu should already cover this, for RHEL/CentOS7 the ``qemu-kvm-ev`` package is required. - +You can use this functionality on virtual machines with raw block storages (E.g. Ceph/SolidFire/Linstor). Limitations on VM Snapshots --------------------------- From bd0242d1706cf12c37b64ab7a1478154e1cb479b Mon Sep 17 00:00:00 2001 From: Slavka Peleva Date: Thu, 21 Apr 2022 08:59:04 +0300 Subject: [PATCH 3/4] Fix reference --- source/adminguide/virtual_machines.rst | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/source/adminguide/virtual_machines.rst b/source/adminguide/virtual_machines.rst index 97e73ba2b7..48ae2c5e26 100644 --- a/source/adminguide/virtual_machines.rst +++ b/source/adminguide/virtual_machines.rst @@ -814,8 +814,9 @@ like many other resources in CloudStack. KVM supports VM snapshots when using NFS shared storage. If raw block storage is used (i.e. Ceph), then VM snapshots are not possible, since there is no possibility -to write RAM memory content anywhere. In such cases you can use as an alternative -:ref:`storage-based-snapshots-kvm` +to write RAM memory content anywhere. In such cases you can use as an alternative +`Storage-based VM snapshots on KVM`_ + If you need more information about VM snapshots on VMware, check out the VMware documentation and the VMware Knowledge Base, especially @@ -823,7 +824,7 @@ VMware documentation and the VMware Knowledge Base, especially `_. -.. _storage-based-snapshots-kvm: +.. _`Storage-based VM snapshots on KVM`: Storage-based VM snapshots on KVM ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ From 6f0f8cd28fa2fd23fcfd86fc8fa14f7010503162 Mon Sep 17 00:00:00 2001 From: Slavka Peleva Date: Thu, 21 Apr 2022 13:45:23 +0300 Subject: [PATCH 4/4] Fix section --- source/adminguide/virtual_machines.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/adminguide/virtual_machines.rst b/source/adminguide/virtual_machines.rst index 48ae2c5e26..cffbc89bec 100644 --- a/source/adminguide/virtual_machines.rst +++ b/source/adminguide/virtual_machines.rst @@ -827,7 +827,7 @@ VMware documentation and the VMware Knowledge Base, especially .. _`Storage-based VM snapshots on KVM`: Storage-based VM snapshots on KVM -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +--------------------------------- .. note:: For now this functionality is limited for NFS and Local storage.