Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

vMA scripting 1

Status
Not open for further replies.

withanh

IS-IT--Management
Dec 17, 2008
221
US
I'm using the vMA5 to interface with my APC UPS's for controlled shutdowns when my power switches to battery.

The shutdowns work as expected.

My problem is during the restarts, I have my hosts starting properly, but the VMs need to start in a particular order (i.e. DC first, then Exch, then SQL, then vCenter, etc.)

I'm trying to use scripting in the vMA to poweron the VMs but cannot find an appropriate command to do so.

Does anyone know if this is even possible to do? I've been googling this all morning and just can't seem to find what I'm looking for.

Thanks!

h
 
Have you looked at Orchestrator? It was designed to do just what you ask and comes with vSphere.

To answer your question though, the vSphere CLI command is:

Power on a virtual machine with 'soft' power mode (requires VMware Tools):

vmware-cmd <connection_options> /vmfs/volumes/storage1/MyVM/MyVM.vmx start soft

Power on a virtual machine with 'hard' power mode:

vmware-cmd <connection_options> /vmfs/volumes/storage1/MyVM/MyVM.vmx start hard







=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+
Brent Schmidt Senior Network Engineer
Keep IT Simple[/color red] Novell Platinum Partner Microsoft Gold Partner
VMWare Enterprise Partner Citrix Gold Partner
 
Unfortunately, Orchestrator will not work for this. I'm working on a project to automate the startup of the datacenter after a power failure/restore. vCenter is not running at this point so I cannot use the Orchestrator.

But, the command you gave looks like what I need to feed into a script that runs on the vMA.

Thanks!
 
Status
Not open for further replies.

Similar threads

Part and Inventory Search

Sponsor

Back
Top