Hi list,
I was trying to execute some commands on an ESX server, but I'm having some problems.
ESX has a custom Linux, it lacks of sudo, bash among many other things.
Anyway, I just want to run a simple ls so the code I'm trying to run is:
@task
def esx_cmd( command ):
env.shell = '/bin/sh'
return run(command)
>fab esx_cmd:"ls" -H host
[host] Executing task 'run_cmd'
[host] Login password for 'user':
[host] out: /bin/sh: can't open 'ls'
Fatal error: run() received nonzero return code 2 while executing!
Disconnecting from host... done.
If I run the same command in an interactive SSH session on that host:
The ESXi Shell can be disabled by an administrative user. See the
vSphere Security documentation for more information.
SSH_CLIENT=X.X.X.X 50909 22
TERMINFO=/usr/share/terminfo
SSH_CONNECTION=X.X.X.X 50909 X.X.X.X 22
VIB bootbank etc local.tgz opt sbin tardisks usr vmimages
altbootbank bootpart.gz lib locker proc scratch tardisks.noauto var vmupgrade
bin dev lib64 mbr productLocker store tmp vmfs
What I'm doing wrong??
Thanks in advance