Categories
Geeky Virtualisation

Move a KVM VirtualMachines LVM Volume to another Server

On the target Server, open Firewall for netcat port:

iptables -A ext-in-allow -p tcp -s 1.2.1.2 --dport 19000:19000 -j ACCEPT

Start nc on the target server to read on the port above:

nc -l 19000|dd bs=16M of=/dev/mapper/myTargetLVMDisk

On the source server, dump LV with nc to the target server:

dd bs=16M if=/dev/mapper/sourceLV | nc targetserver 19000

Only for Windows Guests, be sure the disk controller is using IDE instead of VirtIO:

      <target dev='hda' bus='ide'/>
      <address type='drive' controller='0' bus='0' unit='0'/>