Migrating a virtual machine over a dedicated additional network
To configure a dedicated secondary network for live migration, you must first create a bridge network attachment definition for the namespace by using the CLI. Then, add the name of the NetworkAttachmentDefinition
object to the HyperConverged
custom resource (CR).
Prerequisites
You installed the OpenShift CLI (
oc
).You logged in to the cluster as a user with the
cluster-admin
role.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.
Procedure
Create a
NetworkAttachmentDefinition
manifest.Example configuration file
Open the CR in your default editor by running the following command:
Add the name of the
NetworkAttachmentDefinition
object to thespec.liveMigrationConfig
stanza of theHyperConverged
CR. For example:Example configuration file
1 The name of the Multus NetworkAttachmentDefinition
object to be used for live migrations.
Verification
When the node that the virtual machine runs on is placed into maintenance mode, the VM automatically migrates to another node in the cluster. You can verify that the migration occurred over the secondary network and not the default pod network by checking the target IP address in the virtual machine instance (VMI) metadata.
You can select a dedicated network for live migration by using the OKD web console.
Prerequisites
- You configured a Multus network for live migration.
Procedure
Navigate to Virtualization > Overview in the OKD web console.
Select the network from the Live migration network list.