Offline Migrate or move a virtual machine between two KVM servers without shared storage
Jump to navigation
Jump to search
↑ https://serverfault.com/questions/434064/correct-way-to-move-kvm-vm
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
andvirsh 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
orvirsh 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
: Storage information, Connecting, Operations, Memory, Snapshots, Networking, CPU, release notes,virsh nodedev-list
- libvirt qemu support for migration of VMs with non-shared storage over TLS (v4.4.0 2018-06-04)
- KVM, Installation, QEMU,
virsh
,virtinst
,libguestfs-tools
, libvirt, qemu, Red Hat Virtualization (RHV), MacVTap, Virtio, oVirt, KVM services, KVM networking, KVM graphics, CPU, KVM on ARM
Advertising: