mirror of
https://github.com/openshift/openshift-docs.git
synced 2026-02-05 12:46:18 +01:00
48 lines
1.4 KiB
Plaintext
48 lines
1.4 KiB
Plaintext
// Module included in the following assemblies:
|
|
// * migration_toolkit_for_containers/mtc-migrating-vms.adoc
|
|
|
|
:_mod-docs-content-type: PROCEDURE
|
|
[id="mtc-vm-creating-mig-plan-yaml_{context}"]
|
|
= Creating the migration plan using YAML manifests
|
|
|
|
You can create a migration plan using YAML. However, it is recommended to create a migration plan in the {mtc-first} web console.
|
|
|
|
.Procedure
|
|
|
|
. To migrate the `mig-vm` namespace, ensure that the `namespaces` field of the migration plan includes `mig-vm`.
|
|
. Modify the contents of the migration plan by adding `mig-vm` to the namespaces.
|
|
+
|
|
.Example migration plan YAML
|
|
+
|
|
[source,yaml]
|
|
----
|
|
apiVersion: migration.openshift.io/v1alpha1
|
|
kind: MigPlan
|
|
metadata:
|
|
name: live-migrate-plan
|
|
namespace: openshift-migration
|
|
spec:
|
|
namespaces:
|
|
- mig-vm # <1>
|
|
...
|
|
----
|
|
<1> Add `mig-vm` to the namespaces.
|
|
|
|
* To attempt a live storage migration, the `liveMigrate` field in the migration plan specification must be set to true, and `KubeVirt` must be configured, and be enabled to perform live storage migration.
|
|
+
|
|
[source,yaml]
|
|
----
|
|
apiVersion: migration.openshift.io/v1alpha1
|
|
kind: MigPlan
|
|
metadata:
|
|
name: live-migrate-plan
|
|
namespace: openshift-migration
|
|
spec:
|
|
liveMigrate: true # <2>
|
|
namespaces:
|
|
...
|
|
----
|
|
<2> Live migration only happens during the cutover of a migration plan.
|
|
|
|
Staging the migration plan skips any running virtual machines and does not sync the data. Any stopped virtual machine disks are synced.
|