Skip to content

[regression] connection plugin against windows VM stopped working #198

Open
@leegarrett

Description

@leegarrett
SUMMARY

Using the libvirt connection plugin on a Windows 10 guest VM, a simple win_ping stops working when upgrading from ansible 2.18.3 to 2.19.0b5.

ISSUE TYPE
  • Bug Report
COMPONENT NAME

community.libvirt.libvirt

STEPS TO REPRODUCE
randall@batou:~/Coding/gits-playbook/test_playbooks$ cat inventory_libvirt.yml 
---
plugin: community.libvirt.libvirt
uri: qemu:///system
strict: true
randall@batou:~/Coding/gits-playbook/test_playbooks$ cat host_vars/win10work.yml 
---
ansible_shell_executable:     powershell
ansible_shell_type:           powershell
randall@batou:~/Coding/gits-playbook/test_playbooks$ ansible-galaxy collection list

# /home/randall/.ansible/collections/ansible_collections
Collection        Version
----------------- -------
ansible.windows   3.1.0  
community.libvirt 1.4.0  
EXPECTED RESULTS
randall@batou:~/Coding/gits-playbook/test_playbooks$ ansible --version
ansible [core 2.18.3]
  config file = /home/randall/Coding/gits-playbook/test_playbooks/ansible.cfg
  configured module search path = ['/home/randall/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
  ansible python module location = /usr/lib/python3/dist-packages/ansible
  ansible collection location = /home/randall/.ansible/collections:/usr/share/ansible/collections
  executable location = /usr/bin/ansible
  python version = 3.13.3 (main, Apr 10 2025, 21:38:51) [GCC 14.2.0] (/usr/bin/python3)
  jinja version = 3.1.6
  libyaml = True

randall@batou:~/Coding/gits-playbook/test_playbooks$ ansible -i inventory_libvirt.yml -m win_ping win10work -v
Using /home/randall/Coding/gits-playbook/test_playbooks/ansible.cfg as config file
Using inventory plugin 'ansible_collections.community.libvirt.plugins.inventory.libvirt' to process inventory source '/home/randall/Coding/gits-playbook/test_playbooks/inventory_libvirt.yml'
[WARNING]: Invalid characters were found in group names but not replaced, use -vvvv to see details
libvirt: QEMU Driver error : Requested operation is not valid: domain is not running
libvirt: Domain Config error : Requested operation is not valid: domain is not running
libvirt: QEMU Driver error : Requested operation is not valid: domain is not running
libvirt: Domain Config error : Requested operation is not valid: domain is not running
libvirt: QEMU Driver error : Requested operation is not valid: domain is not running
libvirt: Domain Config error : Requested operation is not valid: domain is not running
libvirt: QEMU Driver error : Requested operation is not valid: domain is not running
libvirt: Domain Config error : Requested operation is not valid: domain is not running
libvirt: QEMU Driver error : Requested operation is not valid: domain is not running
libvirt: Domain Config error : Requested operation is not valid: domain is not running
libvirt: QEMU Driver error : Requested operation is not valid: domain is not running
libvirt: Domain Config error : Requested operation is not valid: domain is not running
libvirt: QEMU Driver error : Requested operation is not valid: domain is not running
libvirt: Domain Config error : Requested operation is not valid: domain is not running
win10work | SUCCESS => 
    changed: false
    ping: pong
ACTUAL RESULTS
randall@batou:~/Coding/gits-playbook/test_playbooks$ ansible --version
ansible [core 2.19.0b5]
  config file = /home/randall/Coding/gits-playbook/test_playbooks/ansible.cfg
  configured module search path = ['/home/randall/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
  ansible python module location = /usr/lib/python3/dist-packages/ansible
  ansible collection location = /home/randall/.ansible/collections:/usr/share/ansible/collections
  executable location = /usr/bin/ansible
  python version = 3.13.3 (main, Apr 10 2025, 21:38:51) [GCC 14.2.0] (/usr/bin/python3)
  jinja version = 3.1.6
  pyyaml version = 6.0.2 (with libyaml v0.2.5)

randall@batou:~/Coding/gits-playbook/test_playbooks$ ansible -i inventory_libvirt.yml -m win_ping win10work -v
Using /home/randall/Coding/gits-playbook/test_playbooks/ansible.cfg as config file
Using inventory plugin 'ansible_collections.community.libvirt.plugins.inventory.libvirt' to process inventory source '/home/randall/Coding/gits-playbook/test_playbooks/inventory_libvirt.yml'
[WARNING]: Invalid characters were found in group names but not replaced, use -vvvv to see details
libvirt: QEMU Driver error : Requested operation is not valid: domain is not running
libvirt: Domain Config error : Requested operation is not valid: domain is not running
libvirt: QEMU Driver error : Requested operation is not valid: domain is not running
libvirt: Domain Config error : Requested operation is not valid: domain is not running
libvirt: QEMU Driver error : Requested operation is not valid: domain is not running
libvirt: Domain Config error : Requested operation is not valid: domain is not running
libvirt: QEMU Driver error : Requested operation is not valid: domain is not running
libvirt: Domain Config error : Requested operation is not valid: domain is not running
libvirt: QEMU Driver error : Requested operation is not valid: domain is not running
libvirt: Domain Config error : Requested operation is not valid: domain is not running
libvirt: QEMU Driver error : Requested operation is not valid: domain is not running
libvirt: Domain Config error : Requested operation is not valid: domain is not running
libvirt: QEMU Driver error : Requested operation is not valid: domain is not running
libvirt: Domain Config error : Requested operation is not valid: domain is not running
[ERROR]: Task failed: Action failed: Module result deserialization failed: No start of json char found

Task failed: Action failed.
Origin: <adhoc 'win_ping' task>

{'action': {'module': 'win_ping', 'args': {}}, 'timeout': 0, 'async_val': 0, 'poll': 15}

<<< caused by >>>

Module result deserialization failed: No start of json char found See stdout/stderr for the returned output.

win10work | FAILED! => 
    changed: false
    module_stderr: |-
        #< CLIXML
        <Objs Version="1.1.0.1" xmlns="http://schemas.microsoft.com/powershell/2004/04"><Obj S="progress" RefId="0"><TN RefId="0"><T>System.Management.Automation.PSCustomObject</T><T>System.Object</T></TN><MS><I64 N="SourceId">1</I64><PR N="Record"><AV>Module werden für erstmalige Verwendung vorbereitet.</AV><AI>0</AI><Nil /><PI>-1</PI><PC>-1</PC><T>Completed</T><SR>-1</SR><SD> </SD></PR></MS></Obj><S S="Error">ConvertFrom-Json : Das Argument kann nicht an den Parameter "InputObject" gebunden werden, da es NULL ist._x000D__x000A_</S><S S="Error">In Zeile:14 Zeichen:39_x000D__x000A_</S><S S="Error">+ $code = ConvertFrom-Json -InputObject $codeJson_x000D__x000A_</S><S S="Error">+                                       ~~~~~~~~~_x000D__x000A_</S><S S="Error">    + CategoryInfo          : InvalidData: (:) [ConvertFrom-Json], ParameterBindingValidationException_x000D__x000A_</S><S S="Error">    + FullyQualifiedErrorId : ParameterArgumentValidationErrorNullNotAllowed,Microsoft.PowerShell.Commands.ConvertFrom _x000D__x000A_</S><S S="Error">   JsonCommand_x000D__x000A_</S><S S="Error"> _x000D__x000A_</S></Objs>
    module_stdout: ''
    msg: 'Module result deserialization failed: No start of json char found'
    rc: 0

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions