VMware Cloud Community
JohnGibson
Hot Shot
Hot Shot

Virtual Machine Startup and Shutdown

Hi,

Anyone know how to configure the Virtual Machine Startup and Shutdown properties from a command line.

I'm wanting to include that in a scripted build and would prefer not to manually configure it in the VI Client.

Cheers,

John

0 Kudos
4 Replies
vmmeup
Expert
Expert

Well it's in the .vmx file for the virtual machine

autostart.order = "10"

autostart = "poweron"

autostop.order = "10"

but could always leave the VI setting to do nothing and create a script that uses:

vmware-cmd "Path_to_vmx" \{start | stop | getstate} to do a custom start up and shut down script.

Sid Smith ----- VCP, VTSP, CCNA, CCA(Xen Server), MCTS Hyper-V & SCVMM08 [http://www.dailyhypervisor.com] - Don't forget to award points for correct and helpful answers. 😉
0 Kudos
_ketchup_
Contributor
Contributor

Hi,

where can I configure "Virtual Machine Startup/Shutdown" via commandline?

I want to enable via Script/commandline the automatic startup and shutdown of the vms and I want to configure an automatic startup order or an manual order.

how can I do this?

thx.

juergen

0 Kudos
mattpound
Hot Shot
Hot Shot

0 Kudos
Hiney
Enthusiast
Enthusiast

vmware-vim-cmd hostsvc/autostartmanager/enable_autostart true

other things available are:

vmware-vim-cmd hostsvc/autostartmanager

Commands available under hostsvc/autostartmanager/:

autostart get_autostartseq update_defaults

autostop get_defaults

enable_autostart update_autostartentry

"I have an inferiority complex, it's just not a very good one."

"I have an inferiority complex, it's just not a very good one."
0 Kudos