A large engineering group retired a 10‑cluster vSphere environment that hosted about 300 physical servers and 2,500 test VMs, and rebuilt the same capacity on a single Kubernetes cluster using KubeVirt for the VMs, Metal3 (Ironic) for IPMI provisioning, and KubeVirtBMC to expose virtual BMCs. The migration preserved the existing IPMI‑lanplus workflow, so test automation that talks to machines over IPMI required no changes.
Why the Change Matters
Consolidating the test lab onto Kubernetes eliminates a separate virtualization stack, reduces host sprawl, and aligns VM workloads with cloud‑native services. For AI engineers, platform engineers, and SREs, the shift means a single control plane for both container and VM workloads, enabling unified observability, scaling, and policy enforcement. Security teams benefit from moving BMC credentials into Kubernetes Secret objects, where RBAC and audit logs can be applied consistently.
Architecture Overview
The target stack consists of five core components:
- Kubernetes – provides the unified API and control plane.
- KubeVirt – runs the virtual machines as
VirtualMachineresources. - Metal3 (Ironic) – continues to manage
BareMetalHost(BMH) objects and issues IPMI commands. - KubeVirtBMC – a Kubernetes operator that creates a pod and a
NodePortService per VM, exposing an IPMI lanplus endpoint. - Forklift – migrates VM definitions and disks from vSphere into the destination cluster, using CDI to import disks as
DataVolumeobjects.
Certificates for the BMC webhook are provisioned by cert-manager and the whole stack is installed with Helm. The BMC address for each VM remains the same; only the backend implementation changes from VirtualBMC to KubeVirtBMC.
Migration Process and Operational Shifts
The migration was performed in‑place, batch‑by‑batch, rather than a single cut‑over. The high‑level steps were:
- Free initial capacity by removing a subset of physical hosts from vSphere and bootstrapping the Kubernetes control plane on them.
- Use
Forkliftto create aVirtualMachineresource and import the VM’s disks asDataVolumeobjects. - Apply a
Secretcontaining the BMC credentials and a declarativeVirtualMachineBMCresource for the new VM. - The
KubeVirtBMCcontroller spawns a pod and Service that listen on port 623 for IPMI lanplus traffic. Metal3continues to send IPMI commands to the same address; the virtual BMC translates them into KubeVirt API calls to power on, power off, reboot, or change boot devices.- Repeat the batch process until all hosts are migrated, then decommission the remaining vSphere clusters.
This approach kept the external management model unchanged, allowing existing test pipelines to run without modification. Operationally, BMC lifecycle moved from an imperative CLI process to a declarative resource model, enabling GitOps workflows and automated auditing via the Kubernetes API.
Security and Management Implications
Storing BMC credentials in Kubernetes Secret objects introduces a single source of truth that can be protected with standard RBAC policies. The BMC pod runs in its own namespace, and access to the VirtualMachineBMC resource is governed by the Kubernetes API server, providing audit trails for creation, updates, and deletions. However, the source notes that command coverage may differ between VirtualBMC and KubeVirtBMC; practitioners should validate that their specific IPMI commands are supported before production cut‑over.
Related CloudNinjas coverage: hands-on guides.
What This Means For Practitioners
Adopting the KubeVirtBMC migration pattern lets teams consolidate VM‑based test labs onto Kubernetes without rewriting IPMI‑driven automation. The shift to declarative BMC resources simplifies lifecycle management, aligns security controls with the rest of the cluster, and supports incremental rollouts. Before starting, verify command compatibility, configure appropriate RBAC for BMC Secrets, and plan a batch migration that frees capacity gradually to avoid service disruption.
