VMware Cloud Community
RanjnaAggarwal
VMware Employee
VMware Employee

ESXi Services in vMA

Is it possible to start or stop ESXi services from vMA?

Regards, Ranjna Aggarwal
0 Kudos
4 Replies
vfk
Expert
Expert

What services are you intending to restart remotely?  You can use esxcli <conn_options> to connect esxi hosts from vma

--- If you found this or any other answer helpful, please consider the use of the Helpful or Correct buttons to award points. vfk Systems Manager / Technical Architect VCP5-DCV, VCAP5-DCA, vExpert, ITILv3, CCNA, MCP
0 Kudos
RanjnaAggarwal
VMware Employee
VMware Employee

suppose ssh service of host.

Regards, Ranjna Aggarwal
0 Kudos
Wh33ly
Hot Shot
Hot Shot

Yes this is possible with the use of a custom scripthostServiceManagement.pl

Copy the script to your VMA and go ahead! I tested it on VMA 5.1 and ESXi 5.1 hosts and works fine

Query the services

perl hostServiceManagemenet.pl --server server1.local.net --username root --operation query

Start the SSH service

perl hostServiceManagemenet.pl --server server1.local.net --username root --operation start --service TSM-SSH

Stop the SSH service

perl hostServiceManagemenet.pl --server server1.local.net --username root --operation stop --service TSM-SSH

0 Kudos
vfk
Expert
Expert

well that is a good use of the api, nice work.

--- If you found this or any other answer helpful, please consider the use of the Helpful or Correct buttons to award points. vfk Systems Manager / Technical Architect VCP5-DCV, VCAP5-DCA, vExpert, ITILv3, CCNA, MCP
0 Kudos