stackhpc / ansible-role-libvirt-vm

This role configures and creates VMs on a KVM hypervisor.
128 stars 67 forks source link

When creating a volume with format == raw, the resize step will fail. #23

Closed jovial closed 5 years ago

jovial commented 5 years ago

Can reproduce with:

(venv) [verne@kef1c-cde-ucd0001 vm]$ sudo virsh vol-create-as --pool libvirt-storage --name test --capacity 1GiB --format raw
Vol test created

(venv) [verne@kef1c-cde-ucd0001 vm]$ sudo virsh vol-resize --pool libvirt-storage --vol test --capacity 1GiB
error: Failed to change size of volume 'test' to 1GiB
error: invalid argument: can't shrink capacity below existing allocation

(venv) [verne@kef1c-cde-ucd0001 vm]$ sudo virsh vol-resize --pool libvirt-storage --vol test --capacity 2GiB
Size of volume 'test' successfully changed to 2GiB