Salt-minion deployment failed on Windows VM with ERROR: 'Unable to execute command'
search cancel

Salt-minion deployment failed on Windows VM with ERROR: 'Unable to execute command'

book

Article ID: 415517

calendar_today

Updated On:

Products

VCF Operations/Automation (formerly VMware Aria Suite)

Issue/Introduction

  • Deploying the 'salt-minion' on windows VM using the command 'salt-cloud -p <profile> <VM-Name> -l debug' returns below error:

Traceback (most recent call last):
File "/opt/saltstack/salt/lib/python3.10/site-packages/salt/utils/cloud.py", line 1032, in wait_for_psexecsvc
stdout, stderr, ret_code = run_psexec_command(
File "/opt/saltstack/salt/lib/python3.10/site-packages/salt/utils/cloud.py", line 989, in run_psexec_command
with Client(
File "/opt/saltstack/salt/lib/python3.10/site-packages/salt/utils/cloud.py", line 898, in _init
self. client = Pstxecclient(server, username, password, port, encrypt)
NameError: name 'PsExecClient' is not defined
[DEBUG] Retrying psexec connection to host ##.##.#.## on port 445 (try 1)
[ERROR] Unable to execute command

  • The command "pip show pypsexec" returns below message"
    WARNING: Package(s) not found: pypsexec

Environment

Aria Automation Config 8.x

Cause

This issue occurs by the missing PsExecClient module, a required prerequisite for minion installation.

Resolution

To resolve this issue, follow the below steps on Salt master server:

  1. Install smbprotocol and pypsexec package using the below command:

pip3 install smbprotocol
pip3 install pypsexec

     2. Confirm the package installation using below command:

pip show pypsexec
pip show smbprotocol

     3. Re-initiate the 'salt-minion' deployment.

salt-cloud -p <profile> <VM-Name> -l debug

Additional Information