-
Sub-task
-
Resolution: Done
-
Critical
-
ACM 2.15.0
-
None
-
Quality / Stability / Reliability
-
False
-
-
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)
- 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.
- Wait for CNV deployment – Wait for openshift-cnv namespace and HyperConverged CR to be Available.
- Wait for console plugins – Verify kubevirt-plugin and forklift-console-plugin are enabled (retry up to 5 min).
- Label local-cluster – Apply acm/cnv-operator-install=true (MTV Provider auto-creation) and environment=virtualization (acm-roles addon for full kubevirt role visibility).
- Label spokes for CNV installation – Apply acm/cnv-operator-install=true to trigger CNV addon deployment on each spoke.
- 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)
- Check Submariner prerequisite – Abort with guidance if Submariner is not deployed.
- Configure CNV feature gates (Hub) – Enable decentralizedLiveMigration: true on HyperConverged CR (requires CNV 4.20+). Detects and verifies CNV version.
- Wait for virt-synchronization-controller – Verify controller pods are running (auto-deployed by CNV operator).
- Create Submariner sync Service + ServiceExport – On hub (directly) and spokes (via ManifestWork). Includes RBAC ManifestWork for klusterlet ServiceExport permissions on spokes.
- Enable MTV CCLM feature flag – Patch ForkliftController: feature_ocp_live_migration: true, restart forklift-controller pod.
- Enable CCLM UI feature flag – Set kubevirtCrossClusterMigration: true in kubevirt-ui-features ConfigMap, restart kubevirt-console-plugin.
- Configure spokes for CCLM – Verify addon ManifestWork includes decentralizedLiveMigration: true on each spoke.
Common (all modes)
- 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. |