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

From wikieduonline
Jump to navigation Jump to search

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


Prerequisites: virsh pool-define-as, virsh pool-autostart and virsh pool-start

Overview: virsh dumpxml and virsh define

1. Stop you VMs: virsh shutdown VM_MACHINE and virsh autostart VM_MACHINE --disable
2. Dump XML configuration: 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]

  • https://serverfault.com/questions/434064/correct-way-to-move-kvm-vm
  • Advertising: