[libvirt-users] Resize qcow2 disks

Javi Legido javi at legido.com
Fri Jun 1 15:07:07 UTC 2012


Good morning.

I already tried:

1. http://michael.orlitzky.com/articles/resizing_a_kvm_or_qemu_disk_image.php

Result: OS system can't see the disk space

    sudo qemu-img resize /var/lib/libvirt/images/mysql-1.qcow2 +8G

    ls -lath /var/lib/libvirt/images/mysql-1.qcow2
    -rw------- 1 libvirt-qemu kvm 10G jun  1 15:35
/var/lib/libvirt/images/mysql-1.qcow2

    # pvresize /dev/vda5
      Physical volume "/dev/vda5" changed
      1 physical volume(s) resized / 0 physical volume(s) not resized

    # lvextend -L8G /dev/template/root
      Extending logical volume root to 8.00 GiB
      Insufficient free space: 1630 extents needed, but only 0 available

2. http://blog.wpkg.org/2010/10/04/resizing-qcow2-images/

Result: OS system can't see the disk space

My 3rd option is to install libguestfs-tools package, but I would like
to avoid it since it's not part of Debian release.

Any good step by step guide to enlarge a qcow2 + LVM virtual disk?

Thanks




More information about the libvirt-users mailing list