Skip to main content

Notebook entry

Migrating a VMware VM to KVM

Lovell Felix 1 min read

Archive note: the tools and versions have moved on. I have kept this entry because the debugging path and the underlying constraint may still be useful.

Moving a running VM off VMware and onto KVM doesn't require a reinstall. The disk image converts directly, and the guest boots on the new hypervisor with its data and configuration intact.

The -p flag on qemu-img convert prints progress, worth having on anything beyond a small disk since this step is the slow part. Sizing the target logical volume to match (or exceed) the source disk before the dd is the one step that isn't optional: undersize it and the copy fails partway through, on a volume that's now in an inconsistent state.

This is the same general technique behind most physical-to-virtual and virtual-to-virtual migrations: normalize to a raw block image, then hand that image to whatever the target platform expects. The hypervisor changes; the bytes on disk mostly don't have to.

About the author

Lovell Felix

Infrastructure and reliability engineer working on Linux platforms, configuration delivery, and deployment safety at fleet scale.

@lovellfelix

Continue through the notebook