User Tools

Site Tools


virtualisation:kvm

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
virtualisation:kvm [2018/12/04 10:40]
Luc Nieland Migration of VMs to another host
virtualisation:kvm [2018/12/04 10:46] (current)
Luc Nieland
Line 653: Line 653:
 ====Offline==== ====Offline====
  
-Create a destination KVM-hypervisor system, including bridges on the required networks and VLANs.+Create a destination KVM-hypervisor system, including bridges on the required networks and VLANs. Try to use the same names for bridges, filesystems,​ logical-volumes. Else use "virsh edit" to make the modifications befor starting the VM on the destination hypervisor.
  
-Create the required logical-volumes,​ and symlinks: 
-  lvcreate -L 4G -n vpstest2 vg0 
-  ln -s /​dev/​mapper/​vg0-vpstest2 /​var/​lib/​libvirt/​images/​vpstest2.img 
  
 +===On the source-hypervisor===
  
-On the source-hypervisor, ​create a definition-file:​+create a definition-file:​
   virsh list --all   virsh list --all
   virsh dumpxml --security-info ​ vpstest2 ​ >  /​var/​lib/​libvirt/​images/​vpstest2.xml   virsh dumpxml --security-info ​ vpstest2 ​ >  /​var/​lib/​libvirt/​images/​vpstest2.xml
Line 667: Line 665:
  
  
-On the destination-hypervisor, pull the image-file of raw-logical-volume:​+===On the destination-hypervisor=== 
 + 
 +Create ​the required logical-volumes, and symlinks: 
 +  lvcreate -L 4G -n vpstest2 vg0 
 +  ln -s /​dev/​mapper/​vg0-vpstest2 /​var/​lib/​libvirt/​images/​vpstest2.img 
 + 
 +And get the raw-logical-volume ​with a dd piped through ssh:
   ssh root@sourcehyp "dd if=/​dev/​mapper/​vg0-vpstest2"​ | dd of=/​dev/​mapper/​vg0-vpstest2   ssh root@sourcehyp "dd if=/​dev/​mapper/​vg0-vpstest2"​ | dd of=/​dev/​mapper/​vg0-vpstest2
  
virtualisation/kvm.txt · Last modified: 2018/12/04 10:46 by Luc Nieland