None of ssh tasks work, strange Errno5 Input/Output Error

Hello

I am running Ansible in a docker container. Now, my docker software was recently “updated” to stop using Windows WSL and use HyperV instead. Since then, none of my playbooks work. Each task that does SSH to a remote system ends with “FAILED! => {“msg”: “[Errno 5] Input/output error”}”

I am mapping a /root folder to the root home directory using: -v C:\portable\root:/root
Ansible creates in this folder (temp) socket mappings and i believe it has something to do with that:

TASK [show ip arp] ******************************************************************************************************************************
task path: /play/gn-ansible-discovery/saveiparp.yml:51
Loading collection ansible.netcommon from /root/.ansible/collections/ansible_collections/ansible/netcommon
redirecting (type: terminal) ansible.builtin.ios to cisco.ios.ios
redirecting (type: cliconf) ansible.builtin.ios to cisco.ios.ios
redirecting (type: become) ansible.builtin.enable to ansible.netcommon.enable
redirecting (type: modules) ansible.builtin.ios_command to cisco.ios.ios_command
redirecting (type: action) ansible.builtin.ios to cisco.ios.ios
Using network group action ios for ios_command
redirecting (type: action) ansible.builtin.ios to cisco.ios.ios
attempting to start connection
using connection plugin ansible.netcommon.network_cli
local domain socket does not exist, starting it
control socket path is /root/.ansible/pc/ec00c5f8e1
Loading collection ansible.builtin from
Loading collection ansible.netcommon from /root/.ansible/collections/ansible_collections/ansible/netcommon
redirecting (type: terminal) ansible.builtin.ios to cisco.ios.ios
Loading collection cisco.ios from /usr/local/lib/python3.12/site-packages/ansible_collections/cisco/ios
redirecting (type: cliconf) ansible.builtin.ios to cisco.ios.ios
loaded cliconf plugin ansible_collections.cisco.ios.plugins.cliconf.ios from path /usr/local/lib/python3.12/site-packages/ansible_collections/cisco/ios/plugins/cliconf/ios.py for network_os ios
ssh type is set to auto
autodetecting ssh_type
[WARNING]: ansible-pylibssh not installed, falling back to paramiko
ssh type is now set to paramiko
Loading collection ansible.builtin from
The full traceback is:
Traceback (most recent call last):
File “/usr/local/lib/python3.12/site-packages/ansible/cli/scripts/ansible_connection_cli_stub.py”, line 104, in start
self.sock.bind(self.socket_path)
OSError: [Errno 5] Input/output error
fatal: [wavndse21b02ab]: FAILED! => {
“msg”: “[Errno 5] Input/output error”
}
…ignoring
Read vars_file ‘../group_vars/all.yml’

When i don’t map the /root dir, and just keep the container default, it seems to work.
However, when using WSL, this has never given problems.

I can write to the folder from within the container:

drwxrwxrwx 1 root root 0 Aug 12 10:27 pc

root@c9b548cc9ca7:~/.ansible# pwd
/root/.ansible
root@c9b548cc9ca7:~/.ansible#

In Windows, i have given anonymous full access to this folder.

ansible [core 2.18.7]
config file = /play/ansible.cfg
configured module search path = [‘/root/.ansible/plugins/modules’, ‘/usr/share/ansible/plugins/modules’]
ansible python module location = /usr/local/lib/python3.12/site-packages/ansible
ansible collection location = /root/.ansible/collections:/usr/share/ansible/collections
executable location = /usr/local/bin/ansible
python version = 3.12.11 (main, Jul 22 2025, 04:28:39) [GCC 12.2.0] (/usr/local/bin/python3.12)
jinja version = 3.1.6
libyaml = True

do i have to map specific UID or so in container ? I think i will just stop mapping the root folder then, i don’t even remember why i did this in the first place

fyi
uname --all
Linux c9b548cc9ca7 6.10.14-linuxkit #1 SMP PREEMPT_DYNAMIC Thu Mar 20 16:36:58 UTC 2025 x86_64 GNU/Linux

Docker container based off python:3.12 container:

FROM python:3.12

RUN apt-get update -y

RUN apt-get install python3 -y

# ping util

RUN apt install iputils-ping -y

RUN apt install openssh-client -y

RUN apt install vim -y

# ps util

RUN apt install procps -y

# nslookup & dig util

RUN apt install dnsutils -y

RUN pip install ansible --no-cache-dir