Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Script to shutdown ESXi host

Posted on 2010-09-21
3
Medium Priority
?
2,015 Views
Last Modified: 2012-05-10
I'm looking for a script that will shutdown the ESXi host that I can tie to my UPS agent from a Windows VM. I found some command line tools that will allow me to do what I want, but here lies the dilemma:

vmcontrol.pl lets me cleanly shutdown the VM's, but has no way to shut the host down

vicfg-hostops lets me shutdown the host, but only gives me an option to either power off or suspend the VMs

I can't really use one after the other because after issuing vmcontrol, my VM will probably be shutdown before it can issue the host shutdown from vicfg-hostops

At the end of the day, I just need command that I can issue to the host that will cleanly shutdown the guests, then power off the host. Any advice on how you guys are doing this?
0
Comment
Question by:jschweg
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 16

Expert Comment

by:Bryan Butler
ID: 33728192
0
 
LVL 4

Author Comment

by:jschweg
ID: 33728315
I have a paid version, however I need to do this via a Windows box, so VMA is out.
0
 
LVL 16

Accepted Solution

by:
Bryan Butler earned 2000 total points
ID: 33728532
And you say:
"my VM will probably be shutdown before it can issue the host shutdown from vicfg-hostops"
Did you mean it "will probably NOT be shutdown before it can issue the host shutdown..."


And what about vmware-cmd:
http://www.petri.co.il/virtual_script_startup_shutdown_vmware_servers.htm
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

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

If we need to check who deleted a Virtual Machine from our vCenter. Looking this task in logs can be painful and spend lot of time, so the best way to check this is in the vCenter DB. Just connect to vCenter DB(default DB should be VCDB and using…
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…
Teach the user how to use create log bundles for vCenter Server or ESXi hosts Open vSphere Web Client: Generate vCenter Server and ESXi host log bundle:  Open vCenter Server Appliance Web Management interface and generate log bundle: Open vCenter Se…
This Micro Tutorial steps you through the configuration steps to configure your ESXi host Management Network settings and test the management network, ensure the host is recognized by the DNS Server, configure a new password, and the troubleshooting…

604 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