# Unable to gather virtual machines configuration information from KVM hypervisor

**URL:** <https://forum.ansible.com/t/unable-to-gather-virtual-machines-configuration-information-from-kvm-hypervisor/34449>\
**Category:** Ansible Project\
**Created:** [January 15, 2021, 1:40pm UTC](https://forum.ansible.com/t/unable-to-gather-virtual-machines-configuration-information-from-kvm-hypervisor/34449 "2021-01-15T13:40:17Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jayan\_Anirudhan](https://avatars.discourse-cdn.com/v4/letter/j/8491ac/32.png) [@Jayan\_Anirudhan](https://forum.ansible.com/u/Jayan_Anirudhan)\
**Post date:** [January 15, 2021, 1:40pm UTC](https://forum.ansible.com/t/unable-to-gather-virtual-machines-configuration-information-from-kvm-hypervisor/34449/1 "2021-01-15T13:40:17Z")

</div>

Hi Team,

I am trying to gather the entire configuration details of the virtual machine from KVM hypervisor and created a playbook as mentioned. Play book execution ends up with below mentioned error. I would highly appreciate if someone can guide me in this.

---

<div class="post-metadata">

**Author:** ![racke](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/racke/32/4767_2.png) [@racke](https://forum.ansible.com/u/racke)\
**Post date:** [January 15, 2021, 1:48pm UTC](https://forum.ansible.com/t/unable-to-gather-virtual-machines-configuration-information-from-kvm-hypervisor/34449/2 "2021-01-15T13:48:42Z")

</div>

> Hi Team,
> 
> I am trying to gather the entire configuration details of the virtual machine from KVM hypervisor and created a playbook  
> as mentioned. Play book execution ends up with below mentioned error. I would highly appreciate if someone can guide me  
> in this.
> 
> ---  
> - hosts: all  
> name:  
> become: yes  
> tasks:  
> - name: Gathering Facts  
> ovirt.ovirt.ovirt\_vm\_info:  
> register: result  
> debug:  
> msg: "{{ result.ovirt\_vms }}"

You are mixing two tasks, debug needs to be an extra task.

Regards  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Racke

---

<div class="post-metadata">

**Author:** ![Jayan\_Anirudhan](https://avatars.discourse-cdn.com/v4/letter/j/8491ac/32.png) [@Jayan\_Anirudhan](https://forum.ansible.com/u/Jayan_Anirudhan)\
**Post date:** [January 15, 2021, 2:01pm UTC](https://forum.ansible.com/t/unable-to-gather-virtual-machines-configuration-information-from-kvm-hypervisor/34449/3 "2021-01-15T14:01:59Z")

</div>

Hi Racke,

Thanks a lot for the update.

I have corrected the playbook as mentioned below and ends up with different error.

---

<div class="post-metadata">

**Author:** ![racke](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/racke/32/4767_2.png) [@racke](https://forum.ansible.com/u/racke)\
**Post date:** [January 15, 2021, 2:10pm UTC](https://forum.ansible.com/t/unable-to-gather-virtual-machines-configuration-information-from-kvm-hypervisor/34449/4 "2021-01-15T14:10:12Z")

</div>

> Hi Racke,
> 
> Thanks a lot for the update.
> 
> I have corrected the playbook as mentioned below and ends up with different error.
> 
> ---  
> - hosts: all  
> name:  
> become: yes  
> tasks:  
> - name: Gathering Facts  
> ovirt.ovirt.ovirt\_vm\_info:  
> register: result  
> debug:  
> msg: "{{ result.ovirt\_vms }}"
> 
> ERROR! 'debug' is not a valid attribute for a Play

Please take the time and study the basics of Ansible playbooks.

Regards  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Racke

---

<div class="post-metadata">

**Author:** ![Ramakrishna\_V](https://avatars.discourse-cdn.com/v4/letter/r/ecae2f/32.png) [@Ramakrishna\_V](https://forum.ansible.com/u/Ramakrishna_V)\
**Post date:** [January 15, 2021, 2:27pm UTC](https://forum.ansible.com/t/unable-to-gather-virtual-machines-configuration-information-from-kvm-hypervisor/34449/5 "2021-01-15T14:27:26Z")

</div>



---

<div class="post-metadata">

**Author:** ![Jayan\_Anirudhan](https://avatars.discourse-cdn.com/v4/letter/j/8491ac/32.png) [@Jayan\_Anirudhan](https://forum.ansible.com/u/Jayan_Anirudhan)\
**Post date:** [January 15, 2021, 3:09pm UTC](https://forum.ansible.com/t/unable-to-gather-virtual-machines-configuration-information-from-kvm-hypervisor/34449/6 "2021-01-15T15:09:19Z")

</div>

Hi Ramkrishna,

Thanks for the update.

I tried the same but still no luck.

ERROR! couldn’t resolve module/action ‘ovirt.ovirt.ovirt\_vm\_info’. This often indicates a misspelling, missing collection, or incorrect module path.

The error appears to be in ‘/home/testuser/ansible/testx.yml’: line 6, column 5, but may  
be elsewhere in the file depending on the exact syntax problem.

The offending line appears to be:

tasks:

- name: Gathering Facts  
^ here

Thanks,  
Jayan
