ovirt-ansible-collection icon indicating copy to clipboard operation
ovirt-ansible-collection copied to clipboard

Ovirt_vms error when creating vm with pre-allocated disk from a pre-allocated disk template

Open github-lexaux opened this issue 3 years ago • 6 comments

SUMMARY

ansible 2.9.11 ovirt_engine-sdk4-4.4.4 ovirt_engine-4.3.10.4

Seems, the reported bug, wasn't resolved: https://github.com/ansible/ansible/issues/34154

We are getting the same error message reported in the bug

"msg": "Fault reason is "Operation Failed". Fault detail is "[Cannot add VM. Thin provisioned template disks can not be defined as Raw.]". HTTP response code is 400." } The template has only one boot drive and this is the pre-allocated drive:
template8_Disk1 Preallocated VirtIO-SCSI Image

COMPONENT NAME

ovirt_vm

STEPS TO REPRODUCE

EXPECTED RESULTS
ACTUAL RESULTS

github-lexaux avatar Oct 09 '20 15:10 github-lexaux

Hey Team,

@mnecas any update on this?

I have an environment where we are hitting the same issue.

ovirt-engine-4.4.7.7
ovirt_engine-sdk4-4.4.4
ansible-2.9.27-1

NOTE: We are using a SAN storage (fiber channel)

regards rbertol

rbertol avatar Apr 08 '22 19:04 rbertol

use the clone=yes parameter to create a deep copy VM not linked to the parent template

michalskrivanek avatar Apr 09 '22 06:04 michalskrivanek

Hey @michalskrivanek,

Unfortunately, the clone option did not help to workaround the thin provisioning issue.

Following the snippet of the ovirt_vm task that we are running.

       - name: build vm
          ovirt_vm:
            auth:
              hostname: '{{ lookup("env","OVIRT_URL") }}'
              username: '{{ lookup("env","OVIRT_USERNAME") }}'
              password: '{{ lookup("env","OVIRT_PASSWORD") }}'
              kerberos: no
              insecure: yes
            state: running
            name: "{{ vm_name  }}"
            template: "{{ template_image }}"
            cluster: "{{ rhv_cluster }}"
            type: server
            clone: yes
            comment: "{{ cc_comment }}"
            cpu_cores: "{{ vm_cores }}"
            description: "{{ vm_description }}"
            high_availability: "{{ ha_choice }}"
            memory: "{{ vm_memory + 'GiB'}}"
            memory_guaranteed: "{{ vm_memory + 'GiB'}}"
            cloud_init_persist: true
            cloud_init:
              nic_boot_protocol: static
              nic_name: ens3
              nic_ip_address: "{{ ipaddr }}"
              nic_netmask: 255.255.255.0
              nic_gateway: "{{ gateway_setting }}"
              dns_servers: "{{ dns_setting1 }} {{ dns_setting2 }}"
              dns_search: "{{ dns_search }}"
              host_name: "{{ vm_name  }}"
              nic_on_boot: true

regards rbertol

rbertol avatar Apr 13 '22 12:04 rbertol

Currently the above is a customer in RHV experiencing this issue. As noted they have attempted to use clone=yes but this has not resolved their issue.

I see that the assignee has been removed. @michalskrivanek, is there anything else we can do to get movement on this? Thanks!

rmcswain-rh avatar Jul 06 '22 18:07 rmcswain-rh

If there is a RHV customer behing this request, then could you please create RHV bug to track it?

@rmcswain-rh

mwperina avatar Jul 07 '22 07:07 mwperina

@mwperina I'll do that, thanks!

rmcswain-rh avatar Jul 08 '22 17:07 rmcswain-rh