KVM guest: converting IMG to LVM

Submitted by fmadmin on Tue, 10/04/2016 - 21:28
  • # virsh shutdown vm_guest
  • # lvcreate -L16G -n vm_guest volume_group
  • # qemu-img convert /var/lib/libvirt/images/vm_guest.img -O host_device /dev/volume_group/vm_guest
  • # nano /etc/libvirt/qemu/vm_guest.xml
    :: file to block
    :: source file to dev...
  • # virsh define /etc/libvirt/qemu/vm_guest.xml
  • # virsh start vm_guest
  • # rm -f /var/lib/libvirt/images/vm_guest.img