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 glanceBeforeAfter
Virtualization platformvSphere, about 10 team-owned clustersKubeVirt on Kubernetes
ScaleAbout 300 hosts, about 2,500 test VMsSame hosts, VMs migrated in place in batches
Out-of-band managementVirtualBMC for vSphereKubeVirtBMC
Provisioning stackMetal3 (Ironic) over IPMIMetal3 (Ironic) over IPMI, unchanged
Migration toolNoneForklift

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:

  1. How do we move the workloads?
  2. 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.

DimensionBefore: VirtualBMC + vSphereAfter: KubeVirtBMC + KubeVirt
Managed objectvSphere VMKubeVirt VirtualMachine
BMC translation targetvCenter APIKubernetes and KubeVirt API
Protocol used by Metal3IPMI lanplusIPMI lanplus (Redfish also available)
How a BMC is createdImperative CLI on a VirtualBMC hostDeclarative VirtualMachineBMC resource
Where the BMC runsA long-lived VirtualBMC processA pod and Service per VM, managed by the operator
CredentialsStored in VirtualBMC configurationKubernetes Secret referenced by the resource
Audit and lifecycleHost-level logs and scriptsKubernetes API, RBAC, and GitOps history
Metal3 BMH change neededNoneOnly 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 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.

Figure 2. Inside the destination cluster. The numbers show the order of events for one migrated VM.

  1. Forklift creates the VM, and CDI imports its disks as DataVolumes.
  2. You apply a Secret and a VirtualMachineBMC for the VM, by kubectl or GitOps.
  3. The KubeVirtBMC controller creates a virtbmc pod and Service for that VM.
  4. Metal3 (Ironic) sends IPMI lanplus commands to the Service on port 623.
  5. The virtbmc pod turns each command into a KubeVirt API call.
  6. 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.

PhaseKey activitiesCompletion criteria
1. Initial source shrinkageRemove the first group of physical servers from the vSphere cluster to free resources for bootstrapping the target environmentReleased nodes are available, and the remaining vSphere capacity still meets workload needs
2. Target bootstrapDeploy Kubernetes on the released nodes, then install KubeVirt, CDI, Forklift, and KubeVirtBMCTest VMs pass validation of the IPMI lanplus, NodePort, and BMH path
3. Pilot migrationCreate a Forklift migration plan with a set of representative VMsOperating systems, drivers, networking, and workloads all work correctly
4. Rolling migrationMigrate VMs in batches; after each batch is accepted, shrink vSphere further and add the released nodes to KubernetesEach batch passes workload and BMH management acceptance before the next one starts
5. Final decommissioningSwitch the management endpoints, observe operations, and decommission the old environmentMonitoring stays stable beyond the rollback retention period

Prerequisites

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.

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:

  1. Register the vSphere source and the destination cluster as Provider resources.
  2. Map vSphere networks and datastores to destination networks and StorageClasses with a NetworkMap and a StorageMap.
  3. List the batch’s VMs in a Plan and wait for its validation conditions to pass.
  4. Start the batch with a Migration.
  5. 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:

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.

SymptomLikely causeFix
Conversion fails with no operating system detectedUnsupported or customized OS, or encrypted disks virt-v2v cannot inspectConfirm the OS is supported by virt-v2v; decrypt or migrate those VMs separately
Linux VM drops to an emergency shell on first bootInitramfs has no VirtIO block or SCSI driverRebuild 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/sdaSwitch to UUIDs or labels before migration
Windows VM shows a boot device errorVirtIO storage driver missingMake the virtio-win drivers available to the conversion, or preinstall them in the source VM
VM boots but has no networkInterface renamed or VirtIO network driver missingCheck 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

unchecked KubeVirt, CDI, cert-manager, and KubeVirtBMC pods are healthy

unchecked Every migrated VM has a VirtualMachineBMC with spec.ipmi.enabled: true

unchecked Every BMC Secret is unique per VM and access is limited by RBAC

unchecked Every BMC Service is reachable from Ironic on UDP 623 and from nowhere else

unchecked Power and boot-device commands used by your tests pass against each endpoint

unchecked Every BMH points to its KubeVirtBMC address and reports no BMC errors

unchecked End-to-end deployment tests pass on the migrated VMs

unchecked 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:

CNCF Projects Used

ProjectCNCF maturityRole in this migration
KubernetesGraduatedPlatform for the rebuilt test lab
KubeVirtGraduatedRuns the migrated VMs; CDI handles disk import
Metal3IncubatingProvisions and manages VMs as BareMetalHosts over IPMI
cert-managerGraduatedIssues KubeVirtBMC webhook certificates
HelmGraduatedInstalls 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