Upload of qcow2 image to RHV using the Ansible module ovirt_disk fails if the size is not specified

Solution Verified - Updated -

Issue

We upload a qcow2 disk with the Ansible module ovirt_disk and we don't specify the disk size:

      - name: Upload qcow2 image and create Disk
        ovirt_disk:
          auth: "{{ ovirt_auth }}"
          name: "Disk-test"
          format: cow
          sparse: true
          sparsify: true
          bootable: yes
          upload_image_path: /tmp/Fedora-Cloud-Base-32-1.6.x86_64.qcow2
          storage_domain: data-block
          interface: virtio

Based on the ovirt_disk documentation:

"Note if size is not specified the size of the disk will be determined by the size of the specified image."

The upload task finally fails.

Environment

  • Red Hat Virtualization (RHV) 4.3
  • ovirt-engine-4.3.5.6-0.1.el7.noarch
  • Ansible 2.9

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content