# ovirt\_vm - HTTP response code is 404

**URL:** <https://forum.ansible.com/t/ovirt-vm-http-response-code-is-404/30938>\
**Category:** Ansible Project\
**Created:** [August 2, 2019, 10:47am UTC](https://forum.ansible.com/t/ovirt-vm-http-response-code-is-404/30938 "2019-08-02T10:47:13Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Alexander\_Li](https://avatars.discourse-cdn.com/v4/letter/a/b9bd4f/32.png) [@Alexander\_Li](https://forum.ansible.com/u/Alexander_Li)\
**Post date:** [August 2, 2019, 10:47am UTC](https://forum.ansible.com/t/ovirt-vm-http-response-code-is-404/30938/1 "2019-08-02T10:47:13Z")

</div>

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/](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/](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

---

<div class="post-metadata">

**Author:** ![Jonathan\_Lozada\_De\_L](https://avatars.discourse-cdn.com/v4/letter/j/eb8c5e/32.png) [@Jonathan\_Lozada\_De\_L](https://forum.ansible.com/u/Jonathan_Lozada_De_L)\
**Post date:** [August 2, 2019, 12:06pm UTC](https://forum.ansible.com/t/ovirt-vm-http-response-code-is-404/30938/2 "2019-08-02T12:06:25Z")

</div>

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 .

---

<div class="post-metadata">

**Author:** ![Alexander\_Li](https://avatars.discourse-cdn.com/v4/letter/a/b9bd4f/32.png) [@Alexander\_Li](https://forum.ansible.com/u/Alexander_Li)\
**Post date:** [August 5, 2019, 3:27am UTC](https://forum.ansible.com/t/ovirt-vm-http-response-code-is-404/30938/3 "2019-08-05T03:27:25Z")

</div>

Hi Jonathan,

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

**Best Regards,**  
Alexander
