Molecule doesn't work well with WSL2 #185
Replies: 3 comments
-
The error handling from molecule-vagrant 0.3 is not so good, leading to a not very helpful message. Can you try git HEAD to see if you can get a better error message ? |
Beta Was this translation helpful? Give feedback.
-
@apatard , I'm so sorry. I'm very new to molecule and others. How to git HEAD to see better error message? Also, my colleagues working on Mac and they have no issues with Molecule + winrm , is this WSL 2 thing? (also I have trouble with WSL 1). |
Beta Was this translation helpful? Give feedback.
-
I've had similar issues with WSL2 and HyperV. For the they turned out to be related to the configuration of the virtual network switches created by Windows. I run a small snippet of PowerShell as a user with administrative rights in order to remedy this:
These changes unfortunately are not permanent. I'm planning on creating a ScheduledTask I can trigger from WSL2 in order to make it permanent unless anybody has a better solution I hope you solved this problem before and this is just for the next person stumbling over this. |
Beta Was this translation helpful? Give feedback.
-
My environment:
W10 laptop
WSL2, Ubuntu 20,
molecule 3.0.8
molecule-vagrant 0.3
I can create win2019 VM in virtualbox via Molecule create, but can't reach VM after creation and configure winrm.
I can run small ansible-playbook to reach from Ubuntu 20 to win2019 VM and create folder.
ssh vagrant@192.168.0.38 -p 2222 is working too.
but got follow error message.
`
ansible-playbook 2.9.12
config file = /home/silver/.cache/molecule/ansible-role-example-role/default/ansible.cfg
configured module search path = ['/home/silver/virtualenvs/windowslob/lib/python3.8/site-packages/molecule/provisioner/ansible/plugins/modules', '/home/silver/virtualenvs/windowslob/lib/python3.8/site-packages/molecule_vagrant/modules', '/home/silver/.cache/molecule/ansible-role-example-role/default/library', '/home/silver/projects/winlob/ansible-role-example-role/library', '/home/silver/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
ansible python module location = /home/silver/virtualenvs/windowslob/lib/python3.8/site-packages/ansible
executable location = /home/silver/virtualenvs/windowslob/bin/ansible-playbook
python version = 3.8.10 (default, Sep 28 2021, 16:10:42) [GCC 9.3.0]
Using /home/silver/.cache/molecule/ansible-role-example-role/default/ansible.cfg as config file
host_list declined parsing /home/silver/.cache/molecule/ansible-role-example-role/default/inventory/ansible_inventory.yml as it did not pass its verify_file() method
script declined parsing /home/silver/.cache/molecule/ansible-role-example-role/default/inventory/ansible_inventory.yml as it did not pass its verify_file() method
Parsed /home/silver/.cache/molecule/ansible-role-example-role/default/inventory/ansible_inventory.yml inventory source with yaml plugin
ERROR: `
Any ideas why Molecule can't reach win2019 VM in virtualbox?
Beta Was this translation helpful? Give feedback.
All reactions