Skip to content

Commit 6cb7ae7

Browse files
authored
Merge pull request #48241 from sabrinajess/CNV12562
CNV-12562: New content for configuring live migration policies
2 parents 9de63e5 + d68f178 commit 6cb7ae7

File tree

3 files changed

+71
-1
lines changed

3 files changed

+71
-1
lines changed

_topic_maps/_topic_map.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -284,7 +284,7 @@ Topics:
284284
File: installing-bare-metal-network-customizations
285285
- Name: Installing a user-provisioned bare metal cluster on a restricted network
286286
File: installing-restricted-networks-bare-metal
287-
- Name: Installing on-premise with Assisted Installer
287+
- Name: Installing on-premise with Assisted Installer
288288
Dir: installing_on_prem_assisted
289289
Distros: openshift-enterprise
290290
Topics:
@@ -3395,6 +3395,8 @@ Topics:
33953395
File: virt-cancel-vmi-migration
33963396
- Name: Configuring virtual machine eviction strategy
33973397
File: virt-configuring-vmi-eviction-strategy
3398+
- Name: Configuring live migration policies
3399+
File: virt-configuring-live-migration-policies
33983400
# Node maintenance mode
33993401
- Name: Node maintenance
34003402
Dir: node_maintenance
Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
// Module included in the following assemblies:
2+
//
3+
// * virt/live_migration/virt-configuring-live-migration-policies.adoc
4+
5+
6+
:_content-type: PROCEDURE
7+
[id="virt-configuring-a-live-migration-policy_{context}"]
8+
= Configuring a live migration policy
9+
10+
Use the `MigrationPolicy` custom resource definition (CRD) to define migration policies for one or more groups of selected virtual machine instances (VMIs).
11+
12+
You can specify groups of VMIs by using any combination of the following:
13+
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.
16+
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.
18+
19+
[NOTE]
20+
====
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.
22+
====
23+
24+
.Procedure
25+
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+
28+
+
29+
[source,yaml]
30+
----
31+
apiVersion: migrations.kubevirt.io/v1alpha1
32+
kind: MigrationPolicy
33+
metadata:
34+
name: my-awesome-policy
35+
spec:
36+
# Migration Configuration
37+
allowAutoConverge: true
38+
bandwidthPerMigration: 217Ki
39+
completionTimeoutPerGiB: 23
40+
allowPostCopy: false
41+
42+
# Matching to VMIs
43+
selectors:
44+
namespaceSelector: <1>
45+
matchLabels:
46+
hpc-workloads: true
47+
xyz-workloads-type: ""
48+
virtualMachineInstanceSelector: <2>
49+
matchLabels:
50+
workload-type: db
51+
operating-system: ""
52+
----
53+
<1> Use `namespaceSelector` to define a group of VMIs by using namespace labels.
54+
<2> Use `virtualMachineInstanceSelector` to define a group of VMIs by using VMI labels.
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
:_content-type: ASSEMBLY
2+
[id="virt-configuring-live-migration-policies"]
3+
= Configuring live migration policies
4+
include::_attributes/common-attributes.adoc[]
5+
:context: virt-live-migration
6+
7+
toc::[]
8+
9+
You can define different migration configurations for specified groups of virtual machine instances (VMIs) by using a live migration policy.
10+
11+
:FeatureName: Live migration policy
12+
include::snippets/technology-preview.adoc[]
13+
14+
include::modules/virt-configuring-a-live-migration-policy.adoc[leveloffset=+1]

0 commit comments

Comments
 (0)