KVM/Offline Migrate or move a virtual machine between two KVM servers without shared storage

< KVM

How To offline Migrate or move a virtual machine between two KVM servers without shared storage [1]

Overview: virsh dumpxml and virsh define

1. Stop you VMs: virsh shutdown VM_MACHINE and virsh autostart VM_MACHINE --disable
2. Create a configuration xml dump: virsh dumpxml VM_MACHINE > VM_MACHINE_dump.xml
3. cp files to new server image directory: /var/lib/libvirt/images or virsh vol-list POOL_NAME --details (verify files owner and group)
4. Depending on your Origin and destination host you may need to edit xml file and modify network interface and remove MAC address. (See MacVTap)
5. Create machine but do not start it: virsh define VM_MACHINE_dump.xml (virsh list --all)
6. Configure autostart: virsh autostart VM_MACHINE
7. Start Machine: virsh start VM_MACHINE

See also edit

  • virsh
  • libvirt qemu support for migration of VMs with non-shared storage over TLS (v4.4.0 2018-06-04)
  1. https://serverfault.com/questions/434064/correct-way-to-move-kvm-vm