Virtualization

Migrate a KVM VM to Another Host

Preflight CPU, networks, storage paths, and destination capacity; Shut down and transfer XML plus all writable disks; Start only the destination copy; Verify identity, disks, networks, data, and a tested rollback path.

By InventiveHQ Team

Episode 18 of the InventiveHQ KVM virtualization series.

Lab verified July 2026 · Ubuntu 26.04 · libvirt 12.0.0 · QEMU 10.2.1

What this episode proves

  • Preflight CPU, networks, storage paths, and destination capacity
  • Shut down and transfer XML plus all writable disks
  • Start only the destination copy
  • Verify identity, disks, networks, data, and a tested rollback path

Validated workflow

1. Preflight CPU, networks, storage paths, and destination capacity

./preflight.sh ep18-migrate01 qemu+ssh://sean@destination/system

2. Shut down and transfer XML plus all writable disks

virsh shutdown ep18-migrate01

3. Start only the destination copy

qemu-img info --backing-chain ep18-migrate01.qcow2

4. Verify identity, disks, networks, data, and a tested rollback path

sha256sum ep18-migrate01.qcow2

Finished state

The migration test guest is defined on one host only; rollback assets are documented and bounded. The public scripts contain no private keys, passwords, or tokens. Review names, addresses, paths, ownership, backups, quorum, and fencing for your own environment before running them.

Need help from an IT & cybersecurity partner?

InventiveHQ helps businesses secure, modernize, and run their technology. Let's talk about your goals.

Get in touch