• Quality / Stability / Reliability
    • False
    • Hide

      None

      Show
      None
    • False
    • ACM Console Train 37 - 1

      Summary

      Shell script (setup_virt-cclm_env.sh) that prepares an ACM environment (Hub + Spokes) for Fleet Virtualization, Fine-Grained RBAC, and Cross-Cluster Live Migration (CCLM) testing. Version-aware: auto-detects ACM version and uses appropriate component names (2.15 uses -preview suffix, 2.16+ uses GA names).


      What the script does

      Phase 1: RBAC / Virtualization (-rbac-only or -all)

      1. Enable MCH components – Safely enable cnv-mtv-integrations and fine-grained-rbac (version-aware names). Uses jq-based add/enable/skip logic to avoid overwriting existing components.
      2. Wait for CNV deployment – Wait for openshift-cnv namespace and HyperConverged CR to be Available.
      3. Wait for console plugins – Verify kubevirt-plugin and forklift-console-plugin are enabled (retry up to 5 min).
      4. Label local-cluster – Apply acm/cnv-operator-install=true (MTV Provider auto-creation) and environment=virtualization (acm-roles addon for full kubevirt role visibility).
      5. Label spokes for CNV installation – Apply acm/cnv-operator-install=true to trigger CNV addon deployment on each spoke.
      6. Wait for MTV Providers – Verify MTV Providers are created and Ready in mtv-integrations namespace (retry up to 5 min).

      Phase 2: CCLM (-cclm-only or -all)

      1. Check Submariner prerequisite – Abort with guidance if Submariner is not deployed.
      2. Configure CNV feature gates (Hub) – Enable decentralizedLiveMigration: true on HyperConverged CR (requires CNV 4.20+). Detects and verifies CNV version.
      3. Wait for virt-synchronization-controller – Verify controller pods are running (auto-deployed by CNV operator).
      4. Create Submariner sync Service + ServiceExport – On hub (directly) and spokes (via ManifestWork). Includes RBAC ManifestWork for klusterlet ServiceExport permissions on spokes.
      5. Enable MTV CCLM feature flag – Patch ForkliftController: feature_ocp_live_migration: true, restart forklift-controller pod.
      6. Enable CCLM UI feature flag – Set kubevirtCrossClusterMigration: true in kubevirt-ui-features ConfigMap, restart kubevirt-console-plugin.
      7. Configure spokes for CCLM – Verify addon ManifestWork includes decentralizedLiveMigration: true on each spoke.

      Common (all modes)

      1. Check KVM/nested virtualization – Wait for virt-handler pods, then check devices.kubevirt.io/kvm on nodes. Warns if unavailable (VMware/cloud without nested virt).

      Usage

      # Must be logged in to OCP hub as cluster-admin
      ./setup_virt-cclm_env.sh              # Full setup: RBAC + CCLM (default)
      ./setup_virt-cclm_env.sh --rbac-only  # RBAC/Virtualization only (no Submariner needed)
      ./setup_virt-cclm_env.sh --cclm-only  # Add CCLM to existing RBAC setup
      ./setup_virt-cclm_env.sh --dry-run    # Preview mode (combine with other flags)
      ./setup_virt-cclm_env.sh --help       # Full options with feature comparison table
      

      What this script does NOT do (CCLM)

      The following must be configured separately for a working CCLM environment:

      What When Details
      Submariner deployment Before running the script (full/cclm mode) Deploy Submariner between hub and spoke clusters via ACM Console (Infrastructure > Clusters > Cluster sets > Submariner add-ons) or CLI. The script checks for Submariner and aborts CCLM phase if missing.
      Persistent storage for CCLM After running the script Run setup_cclm_storage_network.sh (separate script) to configure shared storage classes and network attachments needed for live migration with persistent volumes.
      ClusterSet / ClusterSetBinding Before running the script Hub and spoke clusters must be in the same ManagedClusterSet with a ManagedClusterSetBinding in the relevant namespace. Required for Submariner and cross-cluster connectivity.
      Spoke cluster provisioning Before running the script Spoke clusters must already be created/imported into ACM and in Available state. The script configures existing spokes – it does not create them.
      CNV pre-install on Hub Handled automatically CNV is auto-installed on the hub when the MCH component is enabled. No manual install needed.
      VM creation / workload deployment After running the script The script only configures the infrastructure. Creating VMs, migration plans, or test workloads is done separately.

              rhn-support-ashafi Atif Shafi
              rh-ee-ecai Eveline Cai
              Atif Shafi Atif Shafi
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved: