You can configure a dedicated Multus network for live migration. A dedicated network minimizes the effects of network saturation on tenant workloads during live migration.

Configuring a dedicated secondary network for virtual machine live migration

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).

  • You installed the OpenShift CLI (oc).

  • You logged in to the cluster as a user with the cluster-admin role.

  • The Multus Container Network Interface (CNI) plugin is installed on the cluster.

  • 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.

  • The virtual machine (VM) is running with the LiveMigrate eviction strategy.

  1. Create a NetworkAttachmentDefinition manifest.

    Example configuration file
    apiVersion: "k8s.cni.cncf.io/v1"
    kind: NetworkAttachmentDefinition
      name: my-secondary-network (1)
      namespace: openshift-cnv (2)
      config: '{
        "cniVersion": "0.3.1",
        "name": "migration-bridge",
        "type": "macvlan",
        "master": "eth1", (3)
        "mode": "bridge",
        "ipam": {
          "type": "whereabouts", (4)
          "range": "" (5)
    1 The name of the NetworkAttachmentDefinition object.
    2 The namespace where the NetworkAttachmentDefinition object resides. This must be openshift-cnv.
    3 The name of the NIC to be used for live migration.
    4 The name of the CNI plugin that provides the network for this network attachment definition.
    5 The IP address range for the secondary network. This range must not have any overlap with the IP addresses of the main network.
  2. Open the HyperConverged CR in your default editor by running the following command:

    oc edit hyperconverged kubevirt-hyperconverged -n openshift-cnv
  3. Add the name of the NetworkAttachmentDefinition object to the spec.liveMigrationConfig stanza of the HyperConverged CR. For example:

    Example configuration file
    apiVersion: hco.kubevirt.io/v1beta1
    kind: HyperConverged
      name: kubevirt-hyperconverged
        completionTimeoutPerGiB: 800
        network: my-secondary-network  (1)
        parallelMigrationsPerCluster: 5
        parallelOutboundMigrationsPerNode: 2
        progressTimeout: 150
    1 The name of the Multus NetworkAttachmentDefinition object to be used for live migrations.
  4. Save your changes and exit the editor. The virt-handler pods restart and connect to the secondary network.

  • 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.

    oc get vmi <vmi_name> -o jsonpath='{.status.migrationState.targetNodeAddress}'

Selecting a dedicated network by using the web console

You can select a dedicated network for live migration by using the OpenShift Container Platform web console.

  • You configured a Multus network for live migration.

  1. Navigate to Virtualization > Overview in the OpenShift Container Platform web console.

  2. Click the Settings tab and then click Live migration.

  3. Select the network from the Live migration network list.

Additional resources