Skip to content

Commit c45ce42

Browse files
authored
Merge pull request #87808 from jherrman/CNV-37032
OSDOCS#37032: Updates to snapshot docs in CNV
2 parents 007f97c + 52c3c8b commit c45ce42

8 files changed

+79
-26
lines changed

modules/virt-about-vm-snapshots.adoc

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,13 @@ The snapshot stores a copy of each Container Storage Interface (CSI) volume atta
1818
You can perform the following snapshot actions:
1919

2020
* Create a new snapshot
21-
* Create a copy of a virtual machine from a snapshot
21+
* Create a clone of a virtual machine from a snapshot
22+
+
23+
[IMPORTANT]
24+
====
25+
Cloning a VM with a vTPM device attached to it or creating a new VM from its snapshot is not supported.
26+
====
27+
2228
* List all snapshots attached to a specific VM
2329
* Restore a VM from a snapshot
2430
* Delete an existing VM snapshot

modules/virt-creating-vm-snapshot-cli.adoc

Lines changed: 39 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,27 @@ You can create a virtual machine (VM) snapshot for an offline or online VM by cr
1010

1111
.Prerequisites
1212

13-
* Ensure that the persistent volume claims (PVCs) are in a storage class that supports Container Storage Interface (CSI) volume snapshots.
13+
* Ensure the `Snapshot` feature gate is enabled for the `kubevirt` CR by using the following command:
14+
+
15+
[source,terminal,subs="attributes+"]
16+
----
17+
$ oc get kubevirt kubevirt-hyperconverged -n {CNVNamespace} -o yaml
18+
----
19+
+
20+
.Truncated output
21+
[source,yaml]
22+
----
23+
spec:
24+
developerConfiguration:
25+
featureGates:
26+
- Snapshot
27+
----
28+
29+
* Ensure that the VM snapshot includes disks that meet the following requirements:
30+
** The disks are data volumes or persistent volume claims.
31+
** The disks belong to a storage class that supports Container Storage Interface (CSI) volume snapshots.
32+
** The disks are _bound_ to a persistent volume (PV) and _populated_ with a datasource.
33+
1434
* Install the OpenShift CLI (`oc`).
1535
* Optional: Power down the VM for which you want to create a snapshot.
1636
@@ -40,7 +60,9 @@ $ oc create -f <snapshot_name>.yaml
4060
+
4161
The snapshot controller creates a `VirtualMachineSnapshotContent` object, binds it to the `VirtualMachineSnapshot`, and updates the `status` and `readyToUse` fields of the `VirtualMachineSnapshot` object.
4262

43-
. Optional: If you are taking an online snapshot, you can use the `wait` command and monitor the status of the snapshot:
63+
.Verification
64+
65+
. Optional: During the snapshot creation process, you can use the `wait` command to monitor the status of the snapshot and wait until it is ready for use:
4466
.. Enter the following command:
4567
+
4668
[source,terminal]
@@ -49,9 +71,9 @@ $ oc wait <vm_name> <snapshot_name> --for condition=Ready
4971
----
5072

5173
.. Verify the status of the snapshot:
52-
* `InProgress` - The online snapshot operation is still in progress.
53-
* `Succeeded` - The online snapshot operation completed successfully.
54-
* `Failed` - The online snapshot operaton failed.
74+
* `InProgress` - The snapshot operation is still in progress.
75+
* `Succeeded` - The snapshot operation completed successfully.
76+
* `Failed` - The snapshot operaton failed.
5577
+
5678
[NOTE]
5779
====
@@ -64,8 +86,6 @@ To set no deadline, you can specify `0`, though this is generally not recommende
6486
If you do not specify a unit of time such as `m` or `s`, the default is seconds (`s`).
6587
====
6688

67-
.Verification
68-
6989
. Verify that the `VirtualMachineSnapshot` object is created and bound with `VirtualMachineSnapshotContent` and that the `readyToUse` flag is set to `true`:
7090
+
7191
[source,terminal]
@@ -109,10 +129,21 @@ status:
109129
readyToUse: true <3>
110130
sourceUID: 355897f3-73a0-4ec4-83d3-3c2df9486f4f
111131
virtualMachineSnapshotContentName: vmsnapshot-content-28eedf08-5d6a-42c1-969c-2eda58e2a78d <4>
132+
indications: <5>
133+
- Online
134+
includedVolumes: <6>
135+
- name: rootdisk
136+
kind: PersistentVolumeClaim
137+
namespace: default
138+
- name: datadisk1
139+
kind: DataVolume
140+
namespace: default
112141
----
113142
<1> The `status` field of the `Progressing` condition specifies if the snapshot is still being created.
114143
<2> The `status` field of the `Ready` condition specifies if the snapshot creation process is complete.
115144
<3> Specifies if the snapshot is ready to be used.
116145
<4> Specifies that the snapshot is bound to a `VirtualMachineSnapshotContent` object created by the snapshot controller.
146+
<5> Specifies additional information about the snapshot, such as whether it is an online snapshot, or whether it was created with QEMU guest agent running.
147+
<6> Lists the storage volumes that are part of the snapshot, as well as their parameters.
117148

118-
. Check the `spec:volumeBackups` property of the `VirtualMachineSnapshotContent` resource to verify that the expected PVCs are included in the snapshot.
149+
. Check the `includedVolumes` section in the snapshot description to verify that the expected PVCs are included in the snapshot.

modules/virt-creating-vm-snapshot-web.adoc

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,14 @@
88

99
You can create a snapshot of a virtual machine (VM) by using the {product-title} web console.
1010

11-
The VM snapshot includes disks that meet the following requirements:
11+
.Prerequisites
1212

13-
* Either a data volume or a persistent volume claim
14-
* Belong to a storage class that supports Container Storage Interface (CSI) volume snapshots
13+
* The `snapshot` feature gate is enabled in the YAML configuration of the `kubevirt` CR.
14+
15+
* The VM snapshot includes disks that meet the following requirements:
16+
** The disks are data volumes or persistent volume claims.
17+
** The disks belong to a storage class that supports Container Storage Interface (CSI) volume snapshots.
18+
** The disks are _bound_ to a persistent volume (PV) and _populated_ with a datasource.
1519
1620
.Procedure
1721

modules/virt-installing-qemu-guest-agent-on-linux-vm.adoc

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,13 @@
77
[id="virt-installing-qemu-guest-agent-on-linux-vm_{context}"]
88
= Installing the QEMU guest agent on a Linux VM
99

10-
The `qemu-guest-agent` is widely available and available by default in {op-system-base-full} virtual machines (VMs). Install the agent and start the service.
10+
The `qemu-guest-agent` is available by default in {op-system-base-full} virtual machines (VMs)
1111

12-
[NOTE]
13-
====
14-
To create snapshots of an online (Running state) VM with the highest integrity, install the QEMU guest agent.
12+
To create snapshots of a VM in the `Running` state with the highest integrity, install the QEMU guest agent.
1513

16-
The QEMU guest agent takes a consistent snapshot by attempting to quiesce the VM file system as much as possible, depending on the system workload. This ensures that in-flight I/O is written to the disk before the snapshot is taken. If the guest agent is not present, quiescing is not possible and a best-effort snapshot is taken. The conditions under which the snapshot was taken are reflected in the snapshot indications that are displayed in the web console or CLI.
17-
====
14+
The QEMU guest agent takes a consistent snapshot by attempting to quiesce the VM file system. This ensures that in-flight I/O is written to the disk before the snapshot is taken. If the guest agent is not present, quiescing is not possible and a best-effort snapshot is taken.
15+
16+
The conditions under which a snapshot is taken are reflected in the snapshot indications that are displayed in the web console or CLI. If these conditions do not meet your requirements, try creating the snapshot again, or use an offline snapshot
1817

1918
.Procedure
2019

modules/virt-installing-qemu-guest-agent-on-windows-vm.adoc

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,13 @@
99

1010
For Windows virtual machines (VMs), the QEMU guest agent is included in the VirtIO drivers. You can install the drivers during a Windows installation or on an existing Windows VM.
1111

12-
[NOTE]
13-
====
14-
To create snapshots of an online (Running state) VM with the highest integrity, install the QEMU guest agent.
12+
To create snapshots of a VM in the `Running` state with the highest integrity, install the QEMU guest agent.
1513

16-
The QEMU guest agent takes a consistent snapshot by attempting to quiesce the VM file system as much as possible, depending on the system workload. This ensures that in-flight I/O is written to the disk before the snapshot is taken. If the guest agent is not present, quiescing is not possible and a best-effort snapshot is taken. The conditions under which the snapshot was taken are reflected in the snapshot indications that are displayed in the web console or CLI.
17-
====
14+
The QEMU guest agent takes a consistent snapshot by attempting to quiesce the VM file system. This ensures that in-flight I/O is written to the disk before the snapshot is taken. If the guest agent is not present, quiescing is not possible and a best-effort snapshot is taken.
15+
16+
Note that in a Windows guest operating system, quiescing also requires the Volume Shadow Copy Service (VSS). Therefore, before you create a snapshot, ensure that VSS is enabled on the VM as well.
17+
18+
The conditions under which a snapshot is taken are reflected in the snapshot indications that are displayed in the web console or CLI. If these conditions do not meet your requirements, try creating the snapshot again or use an offline snapshot.
1819

1920
.Procedure
2021

modules/virt-restoring-vm-from-snapshot-cli.adoc

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,12 @@ You can restore an existing virtual machine (VM) to a previous configuration by
1212

1313
* Power down the VM you want to restore.
1414
15+
* Optional: Adjust what happens if the target VM is not fully stopped (_ready_). To do so, set the `targetReadinessPolicy` parameter in the `vmrestore` YAML configuration to one of the following values:
16+
** `FailImmediate` - The restore process fails immediately if the VM is not ready.
17+
** `StopTarget` - If the VM is not ready, it gets stopped, and the restore process starts.
18+
** `WaitGracePeriod 5` - The restore process waits for a set amount of time, in minutes, for the VM to be ready. This is the default setting, with the default value set to 5 minutes.
19+
** `WaitEventually` - The restore process waits indefinitely for the VM to be ready.
20+
1521
.Procedure
1622

1723
. Create a YAML file to define a `VirtualMachineRestore` object that specifies the name of the VM you want to restore and the name of the snapshot to be used as the source as in the following example:

modules/virt-restoring-vm-from-snapshot-web.adoc

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,3 +17,9 @@ You can restore a virtual machine (VM) to a previous configuration represented b
1717
. Select a snapshot to open the *Snapshot Details* screen.
1818
. Click the Options menu {kebab} and select *Restore VirtualMachine from snapshot*.
1919
. Click *Restore*.
20+
21+
. Optional: You can also create a new VM based on the snapshot. To do so:
22+
.. In the Options menu {kebab} of the the snapshot, select *Create VirtualMachine from Snapshot*.
23+
.. Provide a name for the new VM.
24+
.. Click *Create*
25+

virt/backup_restore/virt-backup-restore-snapshots.adoc

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,16 +17,16 @@ ifdef::openshift-rosa,openshift-dedicated[]
1717
* Any cloud storage provider with the Container Storage Interface (CSI) driver that supports the Kubernetes Volume Snapshot API
1818
endif::openshift-rosa,openshift-dedicated[]
1919

20-
Online snapshots have a default time deadline of five minutes (`5m`) that can be changed, if needed.
20+
To create snapshots of a VM in the `Running` state with the highest integrity, install the QEMU guest agent if it is not included with your operating system. The QEMU guest agent is included with the default Red{nbsp}Hat templates.
2121

2222
[IMPORTANT]
2323
====
2424
Online snapshots are supported for virtual machines that have hot plugged virtual disks. However, hot plugged disks that are not in the virtual machine specification are not included in the snapshot.
2525
====
2626

27-
To create snapshots of an online (Running state) VM with the highest integrity, install the QEMU guest agent if it is not included with your operating system. The QEMU guest agent is included with the default Red Hat templates.
27+
The QEMU guest agent takes a consistent snapshot by attempting to quiesce the VM file system. This ensures that in-flight I/O is written to the disk before the snapshot is taken. If the guest agent is not present, quiescing is not possible and a best-effort snapshot is taken.
2828

29-
The QEMU guest agent takes a consistent snapshot by attempting to quiesce the VM file system as much as possible, depending on the system workload. This ensures that in-flight I/O is written to the disk before the snapshot is taken. If the guest agent is not present, quiescing is not possible and a best-effort snapshot is taken. The conditions under which the snapshot was taken are reflected in the snapshot indications that are displayed in the web console or CLI.
29+
The conditions under which a snapshot is taken are reflected in the snapshot indications that are displayed in the web console or CLI. If these conditions do not meet your requirements, try creating the snapshot again or use an offline snapshot
3030

3131
include::modules/virt-about-vm-snapshots.adoc[leveloffset=+1]
3232

0 commit comments

Comments
 (0)