Quantcast
Channel: VMware Communities : All Content - VMware vCenter™
Viewing all articles
Browse latest Browse all 24426

shutdown the guest OS and host by SDK perl script

$
0
0

Hi all:

I want to shutdown the host and all the VMs  on the pointed host in the vcenter though the perl script(as attachment):

 

shutdownESXi_vcenter.pl --server vcenter_IP --username vcenter_username --password  vcenter_password --host "needToShutdownhost_IP"
The perl script run successfully  when the host VM Startup/Shutdown settings are enabled, the host and VMs can be shutdown gracefully

but it fail if the host VM Startup/Shutdown settings are disabled (when the Cluster in the HA, the  host VM Startup/Shutdown settings are disabled by forcely)

 

I hope the VMs can be shut down by VM tools whenever the  host VM Startup/Shutdown settings are enable or disable, how can I modify the script?

for example: shut down VMs with VMTools running on an HA host,when host VM Startup/Shutdown settings are disable.


Viewing all articles
Browse latest Browse all 24426

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>