Ben's notes

Linux, Unix, network, radio...

User Tools

Site Tools


migrate_kvm_vm

Differences

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

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
Next revisionBoth sides next revision
migrate_kvm_vm [2014/07/03 19:38] – [KVM Migrate VM to other host] adminmigrate_kvm_vm [2015/03/18 11:38] admin
Line 2: Line 2:
  
 =====KVM Migrate VM to other host===== =====KVM Migrate VM to other host=====
 +
 +===Prerequisites===
 +  * Restart VM on source host to be sure reboot is successful before the change.
 +
 +===Migration iSCSI LV to image===
 Example migration from iSCSI backed storage host to other host with local LVM based storage. Example migration from iSCSI backed storage host to other host with local LVM based storage.
  
Line 35: Line 40:
   * Modify the disk stanza, adding a type to the driver line; on the source line change 'dev' to 'file' and modify the path: <code>driver name='qemu' type='qcow2'   * Modify the disk stanza, adding a type to the driver line; on the source line change 'dev' to 'file' and modify the path: <code>driver name='qemu' type='qcow2'
 source file='/var/lib/libvirt/images/image_name.qcow2'</code> source file='/var/lib/libvirt/images/image_name.qcow2'</code>
 +  * Shrink the file <code>qemu-img convert -c -O qcow2 source.qcow2 shrunk.qcow2</code>
migrate_kvm_vm.txt · Last modified: 2021/10/09 15:14 by 127.0.0.1