Closed goetzk closed 4 years ago
I forgot to include the actual task output. sorry if its a bit munted, i tried to remove the identifying information.
TASK [ansible-role-libvirt-vm : Ensure the VM disk volumes exist] ********************************************************************************************
failed: [.au] (item={u'capacity': u'50GB', u'name': u'windows-desktop-00.qcow', u'format': u'qcow', u'device': u'disk', u'image': u'W10-V1.vdi.qcow', u'type': u'file', u'pool': u'default'}) => {"ansible_loop_var": "item", "changed": false, "item": {"capacity": "50GB", "device": "disk", "format": "qcow", "image": "W10-V1.vdi.qcow", "name": "windows-desktop-00.qcow", "pool": "default", "type": "file"}, "msg": "non-zero return code", "rc": 1, "stderr": "Shared connection to au closed.\r\n", "stderr_lines": ["Shared connection to au closed."], "stdout": "Failed to resize volume to 50GB\r\nerror: Failed to change size of volume 'windows-desktop-00.qcow' to 50GB\r\nerror: invalid argument: Can't shrink capacity below current capacity unless shrink flag explicitly specified\r\nVol windows-desktop-00.qcow deleted\r\n\r\n", "stdout_lines": ["Failed to resize volume to 50GB", "error: Failed to change size of volume 'windows-desktop-00.qcow' to 50GB", "error: invalid argument: Can't shrink capacity below current capacity unless shrink flag explicitly specified", "Vol windows-desktop-00.qcow deleted", ""]}
The light of day and contemplation reveals the cause:
ls -lh *
-rwxr-xr-x 1 1000 1002 8.8G May 13 08:08 serp-2019.vdi.qcow
-rwxr-xr-x 1 1000 1002 9.1G May 13 08:19 serp-w10.qcow
file *
serp-2019.vdi.qcow: QEMU QCOW Image (v1), 53687091200 bytes
serp-w10.qcow: QEMU QCOW Image (v1), 53687091200 bytes
They're preallocated to 50 GiB (Base 2) / 53GB (Base 10) so resizing them to 50GB (base 10) causes them to shrink.
Hi, This feels like a variation of #23 , but I'm reporting in case. I'm trying to build instances copying an existing qcow image; the process fails due to a resizing error.
I haven't investigated beyond this yet but I will try and update if I find a cause for the issue.