Skip to content

Commit ec3e6d8

Browse files
authored
Merge pull request #64579 from apinnick/CNV-24272-live-migration-improvements
CNV- 24272: Live migration improvements
2 parents bbf601a + c5e332b commit ec3e6d8

File tree

40 files changed

+533
-520
lines changed

40 files changed

+533
-520
lines changed

_topic_maps/_topic_map.yml

Lines changed: 10 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -2721,7 +2721,7 @@ Topics:
27212721
Dir: application_backup_and_restore
27222722
Topics:
27232723
- Name: Introduction to OpenShift API for Data Protection
2724-
File: oadp-intro
2724+
File: oadp-intro
27252725
- Name: OADP release notes
27262726
File: oadp-release-notes
27272727
- Name: OADP features and plugins
@@ -3759,7 +3759,6 @@ Topics:
37593759
File: virt-high-availability-for-vms
37603760
- Name: Control plane tuning
37613761
File: virt-vm-control-plane-tuning
3762-
#A BETTER NAME THAN 'STORAGE 4 U'
37633762
- Name: VM disks
37643763
Dir: virtual_disks
37653764
Topics:
@@ -3819,29 +3818,23 @@ Topics:
38193818
- Name: Live migration
38203819
Dir: live_migration
38213820
Topics:
3822-
- Name: Virtual machine live migration
3823-
File: virt-live-migration
3824-
- Name: Live migration limits and timeouts
3825-
File: virt-live-migration-limits
3826-
- Name: Migrating a virtual machine instance to another node
3827-
File: virt-migrate-vmi
3828-
- Name: Cancelling the live migration of a virtual machine instance
3829-
File: virt-cancel-vmi-migration
3830-
- Name: Configuring virtual machine eviction strategy
3831-
File: virt-configuring-vmi-eviction-strategy
3832-
- Name: Configuring live migration policies
3833-
File: virt-configuring-live-migration-policies
3821+
- Name: About live migration
3822+
File: virt-about-live-migration
3823+
- Name: Configuring live migration
3824+
File: virt-configuring-live-migration
3825+
- Name: Initiating and canceling live migration
3826+
File: virt-initiating-live-migration
38343827
# Node maintenance mode
38353828
- Name: Nodes
38363829
Dir: nodes
38373830
Topics:
3838-
- Name: About node maintenance
3839-
File: virt-about-node-maintenance
3831+
- Name: Node maintenance
3832+
File: virt-node-maintenance
38403833
- Name: Managing node labeling for obsolete CPU models
38413834
File: virt-managing-node-labeling-obsolete-cpu-models
38423835
- Name: Preventing node reconciliation
38433836
File: virt-preventing-node-reconciliation
3844-
- Name: Deleting a failed node to trigger virtual machine failover
3837+
- Name: Deleting a failed node to trigger VM failover
38453838
File: virt-triggering-vm-failover-resolving-failed-node
38463839
- Name: Monitoring
38473840
Dir: monitoring

modules/virt-about-live-migration.adoc

Lines changed: 0 additions & 20 deletions
This file was deleted.

modules/virt-about-node-maintenance.adoc

Lines changed: 0 additions & 31 deletions
This file was deleted.

modules/virt-about-runstrategies-vms.adoc

Lines changed: 0 additions & 79 deletions
This file was deleted.

modules/virt-cancelling-vm-migration-cli.adoc renamed to modules/virt-canceling-vm-migration-cli.adoc

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
// Module included in the following assemblies:
22
//
3-
// * virt/live_migration/virt-cancel-vmi-migration.adoc
3+
// * virt/live_migration/virt-initiating-live-migration.adoc
44

55
:_content-type: PROCEDURE
6-
[id="virt-cancelling-vm-migration-cli_{context}"]
7-
= Cancelling live migration of a virtual machine instance in the CLI
6+
[id="virt-canceling-vm-migration-cli_{context}"]
7+
= Canceling live migration by using the command line
88

9-
Cancel the live migration of a virtual machine instance by deleting the
9+
Cancel the live migration of a virtual machine by deleting the
1010
`VirtualMachineInstanceMigration` object associated with the migration.
1111

1212
.Procedure
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
// Module included in the following assemblies:
2+
//
3+
// * virt/live_migration/virt-initiating-live-migration.adoc
4+
5+
:_content-type: PROCEDURE
6+
[id="virt-canceling-vm-migration-web_{context}"]
7+
= Canceling live migration by using the web console
8+
9+
You can cancel the live migration of a virtual machine (VM) by using the {product-title} web console.
10+
11+
.Procedure
12+
13+
. Navigate to *Virtualization* -> *VirtualMachines* in the web console.
14+
. Select *Cancel Migration* on the Options menu {kebab} beside a VM.
15+

modules/virt-cancelling-vm-migration-web.adoc

Lines changed: 0 additions & 16 deletions
This file was deleted.
Lines changed: 21 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,45 +1,36 @@
11
// Module included in the following assemblies:
22
//
3-
// * virt/live_migration/virt-configuring-live-migration-policies.adoc
4-
3+
// * virt/live_migration/virt-configuring-live-migration.adoc
54

65
:_content-type: PROCEDURE
76
[id="virt-configuring-a-live-migration-policy_{context}"]
8-
= Configuring a live migration policy from the command line
9-
10-
Use the `MigrationPolicy` custom resource definition (CRD) to define migration policies for one or more groups of selected virtual machine instances (VMIs).
7+
= Creating a live migration policy by using the command line
118

12-
You can specify groups of VMIs by using any combination of the following:
9+
You can create a live migration policy by using the command line. A live migration policy is applied to selected virtual machines (VMs) by using any combination of labels:
1310

14-
* Virtual machine instance labels such as `size`, `os`, `gpu`, and other VMI labels.
15-
* Namespace labels such as `priority`, `bandwidth`, `hpc-workload`, and other namespace labels.
11+
* VM labels such as `size`, `os`, or `gpu`
12+
* Project labels such as `priority`, `bandwidth`, or `hpc-workload`
1613
17-
For the policy to apply to a specific group of VMIs, all labels on the group of VMIs must match the labels in the policy.
14+
For the policy to apply to a specific group of VMs, all labels on the group of VMs must match the labels of the policy.
1815

1916
[NOTE]
2017
====
21-
If multiple live migration policies apply to a VMI, the policy with the highest number of matching labels takes precedence. If multiple policies meet this criteria, the policies are sorted by lexicographic order of the matching labels keys, and the first one in that order takes precedence.
18+
If multiple live migration policies apply to a VM, the policy with the greatest number of matching labels takes precedence.
19+
20+
If multiple policies meet this criteria, the policies are sorted by alphabetical order of the matching label keys, and the first one in that order takes precedence.
2221
====
2322

2423
.Procedure
2524

26-
. Create a `MigrationPolicy` CRD for your specified group of VMIs. The following example YAML configures a group with the labels `hpc-workloads:true`, `xyz-workloads-type: ""`, `workload-type: db`, and `operating-system: ""`:
27-
25+
. Create a `MigrationPolicy` object as in the following example:
2826
+
2927
[source,yaml]
3028
----
31-
apiVersion: migrations.kubevirt.io/v1beta1
29+
apiVersion: migrations.kubevirt.io/v1alpha1
3230
kind: MigrationPolicy
3331
metadata:
34-
name: my-awesome-policy
32+
name: <migration_policy>
3533
spec:
36-
# Migration Configuration
37-
allowAutoConverge: true
38-
bandwidthPerMigration: 217Ki
39-
completionTimeoutPerGiB: 23
40-
allowPostCopy: false
41-
42-
# Matching to VMIs
4334
selectors:
4435
namespaceSelector: <1>
4536
hpc-workloads: "True"
@@ -48,5 +39,12 @@ spec:
4839
workload-type: "db"
4940
operating-system: ""
5041
----
51-
<1> Use `namespaceSelector` to define a group of VMIs by using namespace labels.
52-
<2> Use `virtualMachineInstanceSelector` to define a group of VMIs by using VMI labels.
42+
<1> Specify project labels.
43+
<2> Specify VM labels.
44+
45+
. Create the migration policy by running the following command:
46+
+
47+
[source,terminal]
48+
----
49+
$ oc create migrationpolicy -f <migration_policy>.yaml
50+
----
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
// Module included in the following assemblies:
2+
//
3+
// * virt/nodes/virt-node-maintenance.adoc
4+
5+
:_content-type: PROCEDURE
6+
[id="virt-configuring-cluster-eviction-strategy-cli_{context}"]
7+
= Configuring a cluster eviction strategy by using the command line
8+
9+
You can configure an eviction strategy for a cluster by using the command line.
10+
11+
.Procedure
12+
13+
. Edit the `hyperconverged` resource by running the following command:
14+
+
15+
[source,terminal,subs="attributes+"]
16+
----
17+
$ oc edit hyperconverged kubevirt-hyperconverged -n {CNVNamespace}
18+
----
19+
20+
. Set the cluster eviction strategy as shown in the following example:
21+
+
22+
.Example cluster eviction strategy
23+
[source,yaml]
24+
----
25+
apiVersion: hco.kubevirt.io/v1beta1
26+
kind: HyperConverged
27+
metadata:
28+
name: kubevirt-hyperconverged
29+
spec:
30+
evictionStrategy: LiveMigrate
31+
# ...
32+
----
33+

modules/virt-configuring-live-migration-limits.adoc

Lines changed: 14 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11

22
// Module included in the following assemblies:
33
//
4-
// * virt/live_migration/virt-live-migration-limits.adoc
4+
// * virt/live_migration/virt-configuring-live-migration.adoc
55

66
:_content-type: PROCEDURE
77
[id="virt-configuring-live-migration-limits_{context}"]
@@ -12,7 +12,7 @@ Configure live migration limits and timeouts for the cluster by updating the `Hy
1212

1313
.Procedure
1414

15-
* Edit the `HyperConverged` CR and add the necessary live migration parameters.
15+
* Edit the `HyperConverged` CR and add the necessary live migration parameters:
1616
+
1717
[source,terminal,subs="attributes+"]
1818
----
@@ -28,15 +28,19 @@ metadata:
2828
name: kubevirt-hyperconverged
2929
namespace: {CNVNamespace}
3030
spec:
31-
liveMigrationConfig: <1>
32-
bandwidthPerMigration: 64Mi
33-
completionTimeoutPerGiB: 800
34-
parallelMigrationsPerCluster: 5
35-
parallelOutboundMigrationsPerNode: 2
36-
progressTimeout: 150
31+
liveMigrationConfig:
32+
bandwidthPerMigration: 64Mi <1>
33+
completionTimeoutPerGiB: 800 <2>
34+
parallelMigrationsPerCluster: 5 <3>
35+
parallelOutboundMigrationsPerNode: 2 <4>
36+
progressTimeout: 150 <5>
3737
----
38-
<1> In this example, the `spec.liveMigrationConfig` array contains the default values for each field.
39-
+
38+
<1> Bandwidth limit of each migration, in MiB/s or GiB/s. Default: `0`, which is unlimited.
39+
<2> The migration is canceled if it has not completed in this time, in seconds per GiB of memory. For example, a VM with 6GiB memory times out if it has not completed migration in 4800 seconds. If the `Migration Method` is `BlockMigration`, the size of the migrating disks is included in the calculation.
40+
<3> Number of migrations running in parallel in the cluster. Default: `5`.
41+
<4> Maximum number of outbound migrations per node. Default: `2`.
42+
<5> The migration is canceled if memory copy fails to make progress in this time, in seconds. Default: `150`.
43+
4044
[NOTE]
4145
====
4246
You can restore the default value for any `spec.liveMigrationConfig` field by deleting that key/value pair and saving the file. For example, delete `progressTimeout: <value>` to restore the default `progressTimeout: 150`.

0 commit comments

Comments
 (0)