ovirt_vm - HTTP response code is 404

Hi Expert,

Currently I’m using Ansible 2.8.1 module ovirt_vm for provisioning VM in RHEV 4.0.
I able to log in to RHEV using ovirt_auth but when I provision VM using ovirt_vm, it failed with error 404.
Could you give me advise how to fix it? Does RHEV 4.0 supported in ovirt_vm Ansible 2.8?
Thanks in advance.

Following is my playbook & its output.

Playbook








- name: Create VM on RHV



hosts: localhost



connection: local



gather_facts: false



tasks:



- name: Login to oVirt



ovirt_auth:



url: “https://172.16.11.65/ovirt-engine/api/



username: “admin@internal”



password: “password1234”



ca_file: “/etc/pki/ovirt-engine/ca.pem”



insecure: “true”







- name: Debug ovirt auth result



debug:



msg: “{{ ovirt_auth }}”







- name: Provisioning VM from template



ovirt_vm:



auth: “{{ ovirt_auth }}”



state: running



name: bimo_ansiblevm



template: VmTestTemplate



cluster: root-Local

|

  • |

Response



PLAY [Create VM on RHV] *********************







TASK [Login to oVirt] *********************



ok: [localhost]







TASK [Debug ovirt auth result] ******************



ok: [localhost] => {



“msg”: {



“ca_file”: “/etc/pki/ovirt-engine/ca.pem”,



“compress”: true,



“headers”: null,



“insecure”: true,



“kerberos”: false,



“timeout”: 0,



“token”: “Vae2y_gZuKMZhxweXoJdcA4bALKE5UeZmSqc7SCW–EC-4MCt1B6HdKFsj87SfNXnNfcX8UefNdqxdi2KVvmWw”,



“url”: “https://172.16.11.65/ovirt-engine/api/



}



}







TASK [Provisioning VM from template] ****************



An exception occurred during task execution. To see the full traceback, use -vvv. The error was: NotFoundError: HTTP response code is 404.



fatal: [localhost]: FAILED! => {“changed”: false, “msg”: “HTTP response code is 404.”}



…ignoring







PLAY RECAP ************************



localhost : ok=3 changed=0 unreachable=0 failed=0 skipped=0 rescued=0 ignored=1

|

  • |

Best Regards,
Alexander

everything looks good to me. Can you access that apo link?

Jonathan Lozada De La Matta on mobile

– You received this message because you are subscribed to the Google Groups “Ansible Project” group. To unsubscribe from this group and stop receiving emails from it, send an email to . To view this discussion on the web visit .

Hi Jonathan,

Thanks for giving guide.
I change the URL from https://172.16.11.65/ovirt-engine/api/ to https://172.16.11.65/ovirt-engine/api and it works.

Best Regards,
Alexander