You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: modules/virt-about-vm-snapshots.adoc
+4-5Lines changed: 4 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,7 +4,7 @@
4
4
5
5
:_content-type: CONCEPT
6
6
[id="virt-about-vm-snapshots_{context}"]
7
-
= About virtual machine snapshots
7
+
= About snapshots
8
8
9
9
A _snapshot_ represents the state and data of a virtual machine (VM) at a specific point in time. You can use a snapshot to restore an existing VM to a previous state (represented by
10
10
the snapshot) for backup and disaster recovery or to rapidly roll back to a previous development version.
@@ -15,17 +15,16 @@ When taking a snapshot of a running VM, the controller checks that the QEMU gues
15
15
16
16
The snapshot stores a copy of each Container Storage Interface (CSI) volume attached to the VM and a copy of the VM specification and metadata. Snapshots cannot be changed after creation.
17
17
18
-
With the VM snapshots feature, cluster administrators and application developers can:
18
+
You can perform the following snapshot actions:
19
19
20
20
* Create a new snapshot
21
21
* List all snapshots attached to a specific VM
22
22
* Restore a VM from a snapshot
23
23
* Delete an existing VM snapshot
24
24
25
-
[id="vm-snapshot-controller-and-crds_{context}"]
26
-
== Virtual machine snapshot controller and custom resource definitions (CRDs)
25
+
.VM snapshot controller and custom resources
27
26
28
-
The VM snapshot feature introduces three new API objects defined as CRDs for managing snapshots:
27
+
The VM snapshot feature introduces three new API objects defined as custom resource definitions (CRDs) for managing snapshots:
29
28
30
29
* `VirtualMachineSnapshot`: Represents a user request to create a snapshot. It contains information about the current state of the VM.
31
30
* `VirtualMachineSnapshotContent`: Represents a provisioned resource on the cluster (a snapshot). It is created by the VM snapshot controller and contains references to all resources required to restore the VM.
= Configuring a dedicated secondary network for virtual machine live migration
8
8
9
-
To configure a dedicated secondary network for live migration, you must first create a bridge network attachment definition for the `openshift-cnv` namespace by using the CLI. Then, add the name of the `NetworkAttachmentDefinition` object to the `HyperConverged` custom resource (CR).
9
+
To configure a dedicated secondary network for live migration, you must first create a bridge network attachment definition (NAD) by using the CLI. Then, you add the name of the `NetworkAttachmentDefinition` object to the `HyperConverged` custom resource (CR).
10
10
11
11
.Prerequisites
12
12
13
13
* You installed the OpenShift CLI (`oc`).
14
14
* You logged in to the cluster as a user with the `cluster-admin` role.
15
-
* The Multus Container Network Interface (CNI) plugin is installed on the cluster.
16
-
* Every node on the cluster has at least two Network Interface Cards (NICs), and the NICs to be used for live migration are connected to the same VLAN.
17
-
* The virtual machine (VM) is running with the `LiveMigrate` eviction strategy.
15
+
* Each node has at least two Network Interface Cards (NICs).
16
+
* The NICs for live migration are connected to the same VLAN.
18
17
19
18
.Procedure
20
19
21
-
. Create a `NetworkAttachmentDefinition` manifest.
20
+
. Create a `NetworkAttachmentDefinition` manifest according to the following example:
22
21
+
23
22
.Example configuration file
24
23
[source,yaml,subs="attributes+"]
@@ -33,19 +32,18 @@ spec:
33
32
"cniVersion": "0.3.1",
34
33
"name": "migration-bridge",
35
34
"type": "macvlan",
36
-
"master": "eth1", <3>
35
+
"master": "eth1", <2>
37
36
"mode": "bridge",
38
37
"ipam": {
39
-
"type": "whereabouts", <4>
40
-
"range": "10.200.5.0/24" <5>
38
+
"type": "whereabouts", <3>
39
+
"range": "10.200.5.0/24" <4>
41
40
}
42
41
}'
43
42
----
44
-
<1> The name of the `NetworkAttachmentDefinition` object.
45
-
<2> The namespace where the `NetworkAttachmentDefinition` object resides. This must be `openshift-cnv`.
46
-
<3> The name of the NIC to be used for live migration.
47
-
<4> The name of the CNI plugin that provides the network for this network attachment definition.
48
-
<5> The IP address range for the secondary network. This range must not have any overlap with the IP addresses of the main network.
43
+
<1> Specify the name of the `NetworkAttachmentDefinition` object.
44
+
<2> Specify the name of the NIC to be used for live migration.
45
+
<3> Specify the name of the CNI plugin that provides the network for the NAD.
46
+
<4> Specify an IP address range for the secondary network. This range must not overlap the IP addresses of the main network.
49
47
50
48
. Open the `HyperConverged` CR in your default editor by running the following command:
Copy file name to clipboardExpand all lines: modules/virt-creating-vm-snapshot-cli.adoc
+13-23Lines changed: 13 additions & 23 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,16 +4,9 @@
4
4
5
5
:_content-type: PROCEDURE
6
6
[id="virt-creating-vm-snapshot-cli_{context}"]
7
-
= Creating a virtual machine snapshot in the CLI
7
+
= Creating a snapshot by using the command line
8
8
9
-
You can create a virtual machine (VM) snapshot for an offline or online VM by creating a `VirtualMachineSnapshot` object. Kubevirt will coordinate with the QEMU guest agent to create a snapshot of the online VM.
10
-
11
-
[NOTE]
12
-
====
13
-
To create snapshots of an online (Running state) VM with the highest integrity, install the QEMU guest agent.
14
-
15
-
The QEMU guest agent takes a consistent snapshot by attempting to quiesce the VM’s 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.
16
-
====
9
+
You can create a virtual machine (VM) snapshot for an offline or online VM by creating a `VirtualMachineSnapshot` object.
17
10
18
11
.Prerequisites
19
12
@@ -23,40 +16,38 @@ The QEMU guest agent takes a consistent snapshot by attempting to quiesce the VM
23
16
24
17
.Procedure
25
18
26
-
. Create a YAML file to define a `VirtualMachineSnapshot` object that specifies the name of the new `VirtualMachineSnapshot` and the name of the source VM.
27
-
+
28
-
For example:
19
+
. Create a YAML file to define a `VirtualMachineSnapshot` object that specifies the name of the new `VirtualMachineSnapshot` and the name of the source VM as in the following example:
29
20
+
30
21
[source,yaml]
31
22
----
32
23
apiVersion: snapshot.kubevirt.io/v1beta1
33
24
kind: VirtualMachineSnapshot
34
25
metadata:
35
-
name: my-vmsnapshot <1>
26
+
name: <snapshot_name>
36
27
spec:
37
28
source:
38
29
apiGroup: kubevirt.io
39
30
kind: VirtualMachine
40
-
name: my-vm <2>
31
+
name: <vm_name>
41
32
----
42
-
<1> The name of the new `VirtualMachineSnapshot` object.
43
-
<2> The name of the source VM.
44
33
45
-
. Create the `VirtualMachineSnapshot` resource. The snapshot controller creates a `VirtualMachineSnapshotContent` object, binds it to the `VirtualMachineSnapshot` and updates the `status` and `readyToUse` fields
46
-
of the `VirtualMachineSnapshot` object.
34
+
. Create the `VirtualMachineSnapshot` object:
47
35
+
48
36
[source,terminal]
49
37
----
50
-
$ oc create -f <my-vmsnapshot>.yaml
38
+
$ oc create -f <snapshot_name>.yaml
51
39
----
40
+
+
41
+
The snapshot controller creates a `VirtualMachineSnapshotContent` object, binds it to the `VirtualMachineSnapshot`, and updates the `status` and `readyToUse` fields of the `VirtualMachineSnapshot` object.
52
42
53
43
. Optional: If you are taking an online snapshot, you can use the `wait` command and monitor the status of the snapshot:
* `InProgress` - The online snapshot operation is still in progress.
62
53
* `Succeeded` - The online snapshot operation completed successfully.
@@ -75,15 +66,14 @@ If you do not specify a unit of time such as `m` or `s`, the default is seconds
75
66
76
67
.Verification
77
68
78
-
. Verify that the `VirtualMachineSnapshot` object is created and bound with `VirtualMachineSnapshotContent`. The `readyToUse` flag must be set to `true`.
69
+
. Verify that the `VirtualMachineSnapshot` object is created and bound with `VirtualMachineSnapshotContent` and that the `readyToUse` flag is set to `true`:
Copy file name to clipboardExpand all lines: modules/virt-creating-vm-snapshot-web.adoc
+9-23Lines changed: 9 additions & 23 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,36 +4,22 @@
4
4
5
5
:_content-type: PROCEDURE
6
6
[id="virt-creating-vm-snapshot-web_{context}"]
7
-
= Creating a virtual machine snapshot in the web console
7
+
= Creating a snapshot by using the web console
8
8
9
-
You can create a virtual machine (VM) snapshot by using the web console.
9
+
You can create a snapshot of a virtual machine (VM) by using the{product-title} web console.
10
10
11
-
[NOTE]
12
-
====
13
-
To create snapshots of an online (Running state) VM with the highest integrity, install the QEMU guest agent.
11
+
The VM snapshot includes disks that meet the following requirements:
14
12
15
-
The QEMU guest agent takes a consistent snapshot by attempting to quiesce the VM’s 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.
16
-
====
17
-
18
-
The VM snapshot only includes disks that meet the following requirements:
19
-
20
-
* Must be either a data volume or persistent volume claim
13
+
* Either a data volume or a persistent volume claim
21
14
* Belong to a storage class that supports Container Storage Interface (CSI) volume snapshots
22
15
23
16
.Procedure
24
17
25
-
. Click *Virtualization*->*VirtualMachines* from the side menu.
26
-
27
-
. Select a virtual machine to open the *VirtualMachine details* page.
28
-
29
-
. If the virtual machine is running, click *Actions* → *Stop* to power it down.
30
-
18
+
. Navigate to *Virtualization*->*VirtualMachines* in the web console.
19
+
. Select a VM to open the *VirtualMachine details* page.
20
+
. If the VM is running, click the options menu {kebab} and select *Stop* to power it down.
31
21
. Click the *Snapshots* tab and then click *Take Snapshot*.
32
-
33
-
. Fill in the *Snapshot Name* and optional *Description* fields.
34
-
22
+
. Enter the snapshot name.
35
23
. Expand *Disks included in this Snapshot* to see the storage volumes to be included in the snapshot.
36
-
37
-
. If your VM has disks that cannot be included in the snapshot and you still wish to proceed, select the *I am aware of this warning and wish to proceed* checkbox.
38
-
24
+
. If your VM has disks that cannot be included in the snapshot and you wish to proceed, select *I am aware of this warning and wish to proceed*.
Copy file name to clipboardExpand all lines: modules/virt-deleting-vm-snapshot-cli.adoc
+4-2Lines changed: 4 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -14,12 +14,14 @@ You can delete an existing virtual machine (VM) snapshot by deleting the appropr
14
14
15
15
.Procedure
16
16
17
-
* Delete the `VirtualMachineSnapshot` object. The snapshot controller deletes the `VirtualMachineSnapshot` along with the associated `VirtualMachineSnapshotContent` object.
17
+
* Delete the `VirtualMachineSnapshot` object:
18
18
+
19
19
[source,terminal]
20
20
----
21
-
$ oc delete vmsnapshot <my-vmsnapshot>
21
+
$ oc delete vmsnapshot <snapshot_name>
22
22
----
23
+
+
24
+
The snapshot controller deletes the `VirtualMachineSnapshot` along with the associated `VirtualMachineSnapshotContent` object.
0 commit comments