One of KubeVirtBMC’s adopters rebuilt its 2,500-VM test lab on CNCF projects: Kubernetes as the platform, KubeVirt to run the VMs, and Metal3 to provision and manage them over IPMI, with cert-manager and Helm handling certificates and installs. Two open source projects outside the CNCF completed the stack: KubeVirtBMC gave every VM a virtual BMC, and Forklift moved the VMs off vSphere.
In our previous CNCF Blog, Metal3 Meets KubeVirtBMC: Provisioning KubeVirt VMs Like Bare Metal, we showed how Metal3 can manage KubeVirt virtual machines through KubeVirtBMC exactly as if they were physical servers. Here we follow this adopter as it took that same pattern into production, migrating in-place and batch-by-batch.
After vSphere licensing moved to a subscription model, a large engineering organization running about 10 team-owned vSphere clusters (about 300 hosts and about 2,500 test VMs) decided to rebuild its test lab on Kubernetes. Its deployment and end-to-end tests relied on vSphere plus VirtualBMC, so test VMs could be provisioned and managed over IPMI like physical servers. The goal was to move every VM to KubeVirt without changing how those tests talk to their machines.
| At a glance | Before | After |
| Virtualization platform | vSphere, about 10 team-owned clusters | KubeVirt on Kubernetes |
| Scale | About 300 hosts, about 2,500 test VMs | Same hosts, VMs migrated in place in batches |
| Out-of-band management | VirtualBMC for vSphere | KubeVirtBMC |
| Provisioning stack | Metal3 (Ironic) over IPMI | Metal3 (Ironic) over IPMI, unchanged |
| Migration tool | None | Forklift |
Note: The adopter asked to remain unnamed. All numbers in this post are from its real environment.
This post covers the architecture, the in-place rollout plan, deployment steps, the Forklift migration practice, guest OS troubleshooting, and how the team accepted each cutover.
Migration Is About More Than Booting VMs
Moving compute, storage, and networking from vSphere to KubeVirt is the visible part of the job. The out-of-band management path is the part that is easy to overlook.
In the original environment, VirtualBMC for vSphere translated IPMI commands into vCenter operations. Metal3 (Ironic) managed these VMs through BareMetalHost (BMH) resources, so it could power them on and off and set boot devices just as it would for physical servers.
If a migration moves only VMs and disks, every existing BMH loses its working BMC endpoint. KubeVirtBMC fills that gap. It is a Kubernetes operator that exposes IPMI and Redfish endpoints for KubeVirt VMs and translates each request into KubeVirt API operations. This adopter used its IPMI lanplus support.
A complete migration, therefore, has to answer two questions:
- How do we move the workloads?
- How do we keep every BMH management endpoint working?
The team decoupled the two. Forklift migrates VMs and disks, while KubeVirtBMC recreates a virtual BMC for each VM at the destination. This allowed batch-by-batch cutover, and it brought BMC creation, auditing, and lifecycle management into the declarative Kubernetes resource model.
Equivalent Roles: VirtualBMC and KubeVirtBMC
The key idea is simple: VirtualBMC and KubeVirtBMC play the same role, exposing an IPMI BMC for each VM. The backend control plane changes, while the upstream management practice stays the same.
| Dimension | Before: VirtualBMC + vSphere | After: KubeVirtBMC + KubeVirt |
| Managed object | vSphere VM | KubeVirt VirtualMachine |
| BMC translation target | vCenter API | Kubernetes and KubeVirt API |
| Protocol used by Metal3 | IPMI lanplus | IPMI lanplus (Redfish also available) |
| How a BMC is created | Imperative CLI on a VirtualBMC host | Declarative VirtualMachineBMC resource |
| Where the BMC runs | A long-lived VirtualBMC process | A pod and Service per VM, managed by the operator |
| Credentials | Stored in VirtualBMC configuration | Kubernetes Secret referenced by the resource |
| Audit and lifecycle | Host-level logs and scripts | Kubernetes API, RBAC, and GitOps history |
| Metal3 BMH change needed | None | Only the BMC address and credentials |
Note: “Equivalent” here means the same external management model and core usage. It does not mean identical internals, complete IPMI command coverage, or feature parity. Validate the exact IPMI command set your tooling uses before go-live. The supported commands are listed in the KubeVirtBMC IPMI Guide.
Architecture and Deployment
The target architecture has five core parts. Kubernetes provides the unified control plane, KubeVirt hosts the VMs, the CDI and CSI storage path handles disk data, Forklift performs the migration, and KubeVirtBMC exposes an IPMI lanplus endpoint for each target VM through a NodePort Service. Metal3 (Ironic) keeps managing the machines through the same BMHs; only what sits behind each BMC address changes.

Figure 1. Before and after. Metal3 keeps the same BareMetalHost records; only the BMC layer behind each address changes, and Forklift moves the VMs and disks.

Figure 2. Inside the destination cluster. The numbers show the order of events for one migrated VM.
- Forklift creates the VM, and CDI imports its disks as DataVolumes.
- You apply a Secret and a VirtualMachineBMC for the VM, by kubectl or GitOps.
- The KubeVirtBMC controller creates a virtbmc pod and Service for that VM.
- Metal3 (Ironic) sends IPMI lanplus commands to the Service on port 623.
- The virtbmc pod turns each command into a KubeVirt API call.
- KubeVirt starts, stops or reboots the VM, or changes its boot device.
Webhook certificates for KubeVirtBMC are issued by cert-manager, and Helm installs both charts..
Implementation sequence: an in-place, rolling migration
The team did not do a one-time, big-bang cutover. The migration ran in place, on the same physical servers: a first group of hosts was removed from vSphere to bootstrap Kubernetes, and each accepted batch then freed more hosts, shrinking vSphere and growing the Kubernetes cluster.
| Phase | Key activities | Completion criteria |
| 1. Initial source shrinkage | Remove the first group of physical servers from the vSphere cluster to free resources for bootstrapping the target environment | Released nodes are available, and the remaining vSphere capacity still meets workload needs |
| 2. Target bootstrap | Deploy Kubernetes on the released nodes, then install KubeVirt, CDI, Forklift, and KubeVirtBMC | Test VMs pass validation of the IPMI lanplus, NodePort, and BMH path |
| 3. Pilot migration | Create a Forklift migration plan with a set of representative VMs | Operating systems, drivers, networking, and workloads all work correctly |
| 4. Rolling migration | Migrate VMs in batches; after each batch is accepted, shrink vSphere further and add the released nodes to Kubernetes | Each batch passes workload and BMH management acceptance before the next one starts |
| 5. Final decommissioning | Switch the management endpoints, observe operations, and decommission the old environment | Monitoring stays stable beyond the rollback retention period |
Prerequisites
- Kubernetes v1.32 or later, with hardware virtualization on worker nodes
- KubeVirt and CDI (the KubeVirtBMC Quick Start is tested with KubeVirt v1.9.0)
- cert-manager, for KubeVirtBMC webhook certificates
- A CSI driver and StorageClass for VM disks
- Network reachability from Ironic to each BMC NodePort (UDP)
- ipmitool 1.8.19 or later if you use options=persistent,efiboot
Step 1: Deploy the KubeVirt foundation
# KubeVirt
export KUBEVIRT_VERSION=$(curl -s https://storage.googleapis.com/kubevirt-prow/release/kubevirt/kubevirt/stable.txt)
kubectl create -f https://github.com/kubevirt/kubevirt/releases/download/${KUBEVIRT_VERSION}/kubevirt-operator.yaml
kubectl create -f https://github.com/kubevirt/kubevirt/releases/download/${KUBEVIRT_VERSION}/kubevirt-cr.yaml
kubectl -n kubevirt wait kv kubevirt --for condition=Available --timeout=10m
# CDI (Containerized Data Importer)
export CDI_TAG=$(curl -s -w %{redirect_url}
https://github.com/kubevirt/containerized-data-importer/releases/latest)
export CDI_VERSION=${CDI_TAG##*/}
kubectl create -f https://github.com/kubevirt/containerized-data-importer/releases/download/${CDI_VERSION}/cdi-operator.yaml
kubectl create -f https://github.com/kubevirt/containerized-data-importer/releases/download/${CDI_VERSION}/cdi-cr.yaml
Step 2: Deploy KubeVirtBMC
helm upgrade --install cert-manager oci://quay.io/jetstack/charts/cert-manager \
--namespace=cert-manager --create-namespace \
--set=crds.enabled=true
helm repo add kubevirtbmc https://charts.kubevirtbmc.io/
helm repo update
helm upgrade --install kubevirtbmc kubevirtbmc/kubevirtbmc \
--namespace=kubevirtbmc-system --create-namespace
kubectl get pods -n kubevirtbmc-system
kubectl get crd virtualmachinebmcs.bmc.kubevirt.io
Step 3: Create an IPMI BMC for a VM
Each migrated VM gets a credentials Secret and a VirtualMachineBMC resource in its own namespace.
kubectl create secret generic testvm-bmc-secret \
--from-literal=username=<bmc-user> \
--from-literal=password=<bmc-password> \
-n default
apiVersion: bmc.kubevirt.io/v1beta1
kind: VirtualMachineBMC
metadata:
name: testvm-bmc
namespace: default
spec:
virtualMachineRef:
name: testvm
authSecretRef:
name: testvm-bmc-secret
ipmi:
enabled: true
The controller creates a Deployment and a Service named testvm-virtbmc, listening on 623/UDP for IPMI and 80/TCP for Redfish. Verify it from any pod that has ipmitool:
ipmitool -I lanplus -H testvm-virtbmc.default.svc.cluster.local -p 623 \
-U <bmc-user> -P <bmc-password> power status
# Chassis Power is on
Finally, point the existing BMH at the new endpoint. Nothing else in the BMH changes.
apiVersion: metal3.io/v1alpha1
kind: BareMetalHost
metadata:
name: testvm
namespace: default
spec:
bmc:
address: ipmi://testvm-virtbmc.default.svc.cluster.local:623
credentialsName: testvm-bmc-secret
Note: IPMI is disabled by default on a VirtualMachineBMC; set spec.ipmi.enabled: true. A one-shot boot override is applied when the VMI is recreated, so an in-guest reboot keeps the old boot order. Setting rebootPolicy: Terminate fixes this and requires KubeVirt 1.8.0 or later with the RebootPolicy feature gate. Details are in the IPMI Guide.
Step 4: External exposure and security boundaries
The BMC Service is ClusterIP by default, which works only when Ironic runs in the same cluster. This adopter exposed each BMC through a NodePort Service, so each BMH points at ipmi://<node-ip>:<node-port>. Keep those ports reachable only from the provisioning network.
- Restrict BMC traffic with a NetworkPolicy that admits only Ironic.
- Use one Secret per VM and rotate credentials on a schedule.
- Limit who can create or read VirtualMachineBMC resources and their Secrets through RBAC.
- Prefer Redfish for new integrations; the KubeVirtBMC docs recommend it for production use.
Note: A BMC can power off or re-image a VM. Treat every BMC endpoint and credential with the same care as a physical server’s BMC network.
Migrate vSphere VMs with Forklift
Forklift, an open source tool for migrating VMs to KubeVirt, moved the VMs and their disks. Everything is declared as Kubernetes resources, so each batch is reviewable and repeatable.
The team worked one team-owned vSphere cluster at a time. Each batch followed the same pattern:
- Register the vSphere source and the destination cluster as Provider resources.
- Map vSphere networks and datastores to destination networks and StorageClasses with a NetworkMap and a StorageMap.
- List the batch’s VMs in a Plan and wait for its validation conditions to pass.
- Start the batch with a Migration.
- Create the VirtualMachineBMC resources and update the BMHs for that batch.
apiVersion: forklift.konveyor.io/v1beta1
kind: Provider
metadata:
name: vsphere-team-a
namespace: konveyor-forklift
spec:
type: vsphere
url: https://<vcenter-host>/sdk
secret:
name: vsphere-team-a-credentials
namespace: konveyor-forklift
---
apiVersion: forklift.konveyor.io/v1beta1
kind: Plan
metadata:
name: team-a-batch-01
namespace: konveyor-forklift
spec:
warm: false
targetNamespace: team-a
provider:
source:
name: vsphere-team-a
namespace: konveyor-forklift
destination:
name: host
namespace: konveyor-forklift
map:
network:
name: team-a-network-map
namespace: konveyor-forklift
storage:
name: team-a-storage-map
namespace: konveyor-forklift
vms:
- name: <vm-name-1>
- name: <vm-name-2>
---
apiVersion: forklift.konveyor.io/v1beta1
kind: Migration
metadata:
name: team-a-batch-01-run-1
namespace: konveyor-forklift
spec:
plan:
name: team-a-batch-01
namespace: konveyor-forklift
Practices that kept batches predictable:
- Cold migration for test VMs. Test VMs can tolerate downtime, and cold migration runs the full guest conversion, including VirtIO driver injection.
- A VDDK image on the vSphere provider. It speeds up disk transfer considerably for large batches.
- Keep VM names and MAC addresses. Tests and BMH records reference them, so unchanged identities make cutover invisible to the test harness.
- Never delete source VMs during a batch. Powered-off source VMs are the rollback path.
Note: Forklift migrates VMs and disks only. It does not create BMC endpoints, so the VirtualMachineBMC and BMH steps must be part of every batch runbook. See the Forklift documentation for provider and mapping options.
Troubleshooting: Guest OS Detection and VirtIO Driver Injection
At this scale, failed conversions usually come down to two things: the converter could not identify the guest OS, or the guest booted without the VirtIO drivers it needed. During cold migration, Forklift uses virt-v2v to inspect each guest, inject VirtIO drivers, and adjust the boot configuration.
| Symptom | Likely cause | Fix |
| Conversion fails with no operating system detected | Unsupported or customized OS, or encrypted disks virt-v2v cannot inspect | Confirm the OS is supported by virt-v2v; decrypt or migrate those VMs separately |
| Linux VM drops to an emergency shell on first boot | Initramfs has no VirtIO block or SCSI driver | Rebuild the initramfs with virtio_blk, virtio_scsi, virtio_net, and virtio_pci before migration |
| Linux VM cannot find its root or data disks | /etc/fstab or the bootloader uses device names such as /dev/sda | Switch to UUIDs or labels before migration |
| Windows VM shows a boot device error | VirtIO storage driver missing | Make the virtio-win drivers available to the conversion, or preinstall them in the source VM |
| VM boots but has no network | Interface renamed or VirtIO network driver missing | Check the network map and guest interface naming rules |
For stubborn Linux guests, preparing the source VM before migration avoided repeated attempts:
# RHEL family
sudo dracut -f --add-drivers "virtio_blk virtio_scsi virtio_net virtio_pci"
# Debian and Ubuntu
printf 'virtio_blk\nvirtio_scsi\nvirtio_net\nvirtio_pci\n' | sudo tee -a /etc/initramfs-tools/modules
sudo update-initramfs -u
Note: As a last resort, temporarily set the VM’s disk bus to sata in the KubeVirt VirtualMachine spec, boot it, install VirtIO drivers inside the guest, then switch back to virtio. This is slower and should not be the default path.
Cutover Acceptance and Rollback
A batch was accepted only when Metal3 could drive every migrated VM through KubeVirtBMC the same way it drove the vSphere VM before.
Acceptance commands, run against each new endpoint:
BMC="-I lanplus -H testvm-virtbmc.default.svc.cluster.local -p 623 -U <bmc-user> -P <bmc-password>"
ipmitool $BMC power status
ipmitool $BMC power off
ipmitool $BMC power on
ipmitool $BMC power reset
ipmitool $BMC chassis bootdev pxe
ipmitool $BMC chassis bootdev disk options=persistent
ipmitool $BMC chassis bootparam get 5
Then confirm at the Metal3 level:
kubectl get baremetalhost -A
# Every migrated host should report a healthy operational status, with no BMC errors
Rollback stays simple because the two paths are decoupled. Keep the source VMs powered off in vSphere until the batch is accepted. To roll back, power the source VM back on and restore the BMH’s original VirtualBMC address and credentials.
Note: During power transitions KubeVirtBMC may return a retryable Node Busy (0xC0) response instead of an immediate success. Ironic retries automatically; custom scripts should retry too.
Go-live checklist
KubeVirt, CDI, cert-manager, and KubeVirtBMC pods are healthy
Every migrated VM has a VirtualMachineBMC with spec.ipmi.enabled: true
Every BMC Secret is unique per VM and access is limited by RBAC
Every BMC Service is reachable from Ironic on UDP 623 and from nowhere else
Power and boot-device commands used by your tests pass against each endpoint
Every BMH points to its KubeVirtBMC address and reports no BMC errors
End-to-end deployment tests pass on the migrated VMs
Source VMs stay powered off, not deleted, until the batch is signed off
Environment Scale and Outcomes
The migration covered about 10 team-owned vSphere clusters, about 300 hosts, and about 2,500 test VMs, moved batch by batch onto KubeVirt.
What changed for the teams:
- Tests did not change. Deployment and end-to-end suites kept talking IPMI to the same BMH records; only each BMC address moved.
- BMCs became Kubernetes resources. Creating, auditing, and deleting a BMC is now a kubectl or GitOps operation instead of a host-level script.
- Credentials moved into Secrets. Per-VM credentials are managed and rotated with standard Kubernetes tooling and RBAC.
- Cutover risk stayed small. Decoupling the workload path from the BMC path meant each batch could be accepted or rolled back on its own.
- One platform for the lab. Test VMs now run on the same Kubernetes foundation as the rest of the team’s cloud native workloads.
- Same hardware. The migration ran in place: each accepted batch freed vSphere hosts, which then joined the Kubernetes cluster.
CNCF Projects Used
| Project | CNCF maturity | Role in this migration |
| Kubernetes | Graduated | Platform for the rebuilt test lab |
| KubeVirt | Graduated | Runs the migrated VMs; CDI handles disk import |
| Metal3 | Incubating | Provisions and manages VMs as BareMetalHosts over IPMI |
| cert-manager | Graduated | Issues KubeVirtBMC webhook certificates |
| Helm | Graduated | Installs cert-manager and KubeVirtBMC |
Other open source used: KubeVirtBMC (virtual BMCs for KubeVirt VMs), Forklift with virt-v2v (VM migration and conversion), and OpenStack Ironic and VirtualBMC.
Conclusion: Turn a Migration into a Management Upgrade
A hypervisor migration is easiest when the tools above do not notice. By pairing Forklift for workloads with KubeVirtBMC for out-of-band management, this adopter moved about 2,500 test VMs to KubeVirt while Metal3 and every IPMI-based test kept working unchanged. Along the way, BMCs became declarative, auditable Kubernetes resources instead of host-level processes.
If your test lab or CI still depends on VirtualBMC, the same pattern applies: migrate in batches, recreate each BMC with a VirtualMachineBMC, repoint the BMH, and accept each batch before moving on.
Get Involved
- Read the docs, including the Quick Start, IPMI Guide, and Redfish Guide
- Star the project, open issues, or contribute on GitHub
- Running KubeVirtBMC in production? Add your organization to the adopters list in the repository