?
Solved

how do i send a script to plink for a SSH connection to ESX 4

Posted on 2010-01-07
3
Medium Priority
?
718 Views
Last Modified: 2012-05-08
We have 3 ESX hosts, which i need to SSH into and send a script to automatically start a server.

i have created the Shell user, and can open a plink session to the host using the shell user,
i can also manually type the commands into the session and have the session perform the command, which is:
vmware-cmd -i
then listvms, or start server

now i want to do this automatically, but i havent been able to get it working.
probably cos i dont know what i am doing...lol

i created a txt file with vmware-cmd -i and listvms on 2 lines, to test but doesnt work using
plink -ssh 192.168.10.61 -l USER -pw PASS -m list.txt

any ideas or how comments on how i should do this
0
Comment
Question by:jcmurphy777
  • 2
3 Comments
 
LVL 21

Accepted Solution

by:
za_mkh earned 2000 total points
ID: 26212291
0
 

Author Closing Comment

by:jcmurphy777
ID: 31674782
that is awesome!!!

done so many search's but to noavail,

thanks for the find.

so for everyone who might find this, in the file, you need to reference the vmware commands in directory format, according to the link za-mkh wrote above.

for example, to stop a vm, include in the command file:
/usr/bin/vmware-cmd -i /vmfs/volumes/DataStoreName/VMName/VMName.vmx stop


i found a website with vmware script for the vmware-cmd

http://steveswanson.wordpress.com/category/scripting/esx-scripting/

i will test the scripting and post the full command line. will be a few weeks though. holidays...

thanks again za_mkh
0
 
LVL 21

Expert Comment

by:za_mkh
ID: 26274639
Thanks for the lesson jcmurphy77. We all learn new things everyday!
0

Featured Post

NEW Veeam Backup for Microsoft Office 365 1.5

With Office 365, it’s your data and your responsibility to protect it. NEW Veeam Backup for Microsoft Office 365 eliminates the risk of losing access to your Office 365 data.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

When converting a physical machine to a virtual machine using VMware vCenter Converter Standalone or vCenter Converter Enterprise, if an adapter type is not selected during the initial customization the resulting virtual machine may contain an IDE d…
It’s time for spooky stories and consuming way too much sugar, including the many treats we’ve whipped for you in the world of tech. Check it out!
Teach the user how to join ESXi hosts to Active Directory domains Open vSphere Client: Join ESXi host to AD domain: Verify ESXi computer account in AD: Configure permissions for domain user in ESXi: Test domain user login to ESXi host:
This video shows you how to use a vSphere client to connect to your ESX host as the root user. Demonstrates the basic connection of bypassing certification set up. Demonstrates how to access the traditional view to begin managing your virtual mac…
Suggested Courses

829 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question