1 Reply Latest reply on Apr 11, 2018 12:57 AM by iiliev

    Run Program in Guest - Linux

    michael_stefani Enthusiast

      In the past we used the Run SSH command on our Linux hosts if we needed to execute something remotely.  I was trying to do the same thing via the Run Program in Guest workflow with no success.  First off I'm confused about the username / password.  I'm assuming since the VMTools run as root I don't really have to pass a username and password?  They don't appear to be required fields.


      Second, not fully sure on the program path, arguments, working directory inputs.  I just run a simple command like "uptime" to get it working and I can build from there.  Tried a bunch of combinations though and it just doesn't seem to take.  Any one have a working example of a simple example of this workflow inputs and or know about the authentication piece?  Thanks,

        • 1. Re: Run Program in Guest - Linux
          iiliev Champion
          Community WarriorsVMware Employees



          You need to pass username/password to connect remotely to the VM where the program will be executed.


          Here is a simple example how to run a Linux 'ls' command to get a listing of files inside a directory and redirect the listing output to a file:


          vmUsername -> root

          vmPassword -> mysecretpass

          vm -> <some-virtual-machine-object>

          interactiveSession -> No

          programPath -> /bin/ls

          arguments -> /some/folder/ > /tmp/listing

          workingDirectory -> <Not set>

          environment -> <Not set>




          Also, you can take a look at Guest script manager package for an alternative way to run scripts - https://communities.vmware.com/docs/DOC-25474