Community.general.proxmox_disk: Parameter mixup?

Hello,
I have a strange issue with creating disks on a proxmox hos, I get the error: “Unable to create/update disk scsi1 in VM 105: 500 Internal Server Error: unable to parse zfs volume name ‘1G’”:

    - name: Set user disk options
      community.general.proxmox_disk:
        vmid: "{{ proxmox_vm_id }}"
        disk: "{{ item.key }}"
        storage: Data-Volumes
        size: "{{ item.value.size }}"
        state: present
      loop: "{{ proxmox_vm_disks | dict2items }}"

The proxmox_vm_disks contains:

        "scsi1": {
            "mountpoint": "/home/backupuser",
            "size": "1G"
        },
        "scsi2": {
            "mountpoint": "/data",
            "size": "2G"
        }

I checked the module parameter already (first loop only):

"module_args": {
            "aio": null,
            "api_host": "xxx",
            "api_password": null,
            "api_port": null,
            "api_token_id": "ansible",
            "api_token_secret": "VALUE_SPECIFIED_IN_NO_LOG_PARAMETER",
            "api_user": "root@pam",
            "backup": null,
            "bps_max_length": null,
            "bps_rd_max_length": null,
            "bps_wr_max_length": null,
            "bwlimit": null,
            "cache": null,
            "create": "regular",
            "cyls": null,
            "delete_moved": null,
            "detect_zeroes": null,
            "discard": null,
            "disk": "scsi2",
            "format": null,
            "heads": null,
            "import_from": null,
            "iops": null,
            "iops_max": null,
            "iops_max_length": null,
            "iops_rd": null,
            "iops_rd_max": null,
            "iops_rd_max_length": null,
            "iops_wr": null,
            "iops_wr_max": null,
            "iops_wr_max_length": null,
            "iothread": null,
            "iso_image": null,
            "mbps": null,
            "mbps_max": null,
            "mbps_rd": null,
            "mbps_rd_max": null,
            "mbps_wr": null,
            "mbps_wr_max": null,
            "media": null,
            "name": null,
            "queues": null,
            "replicate": null,
            "rerror": null,
            "ro": null,
            "scsiblock": null,
            "secs": null,
            "serial": null,
            "shared": null,
            "size": "2G",
            "snapshot": null,
            "ssd": null,
            "state": "present",
            "storage": "Data-Volumes",
            "target_disk": null,
            "target_storage": null,
            "target_vmid": null,
            "timeout": 600,
            "trans": null,
            "validate_certs": true,
            "vmid": 105,
            "werror": null,
            "wwn": null
        }

Any idea what’s going on? The “storage” and “size” parameter are correctly set, but the API uses “size” as volume name??
If I omit the parameter “size” then it uses “None” as zfs volume name…

Thanks a lot for any hints.
Thomas

Define size without any suffix:

    disk: scsi3
    format: qcow2
    storage: local
    size: 16

Use documentation examples as reference.

Ups… wow :rofl: interesting behavior… I have a second task for resizing the disk and there its working with “8G”…
And in the module code I can see that “size” is defined as str, not as int…

@castorsky thanks a lot :slight_smile: