Hello,
Which command can I use for clean and graceful shutdown all VM and turn off esxi host in sequence?
D.
Hi
this is just an example... sure you could try many improvement following powercli commands guide (see official doc)... sure before use it you should connect using command Connect-VIServer.
You should use this script via powercli (Download link: https://my.vmware.com/web/vmware/info/slug/datacenter_cloud_infrastructure/vmware_vsphere/6_0#driver...) then save file with ps1 extension.
There are some commands you could be executed via ssh directly to the single host... I define this way as a big management workaround, because the purpose of the host cli is for emergency or straordinary management. I suggest to try powercli before.
Regards
Hi, I suggest the use of powercli with this sequence:
$host = "192.168.1.10"
$vms = Get-Vm
foreach($vm in $vms){
Shutdown-VMGuest -VM $vm -Confirm
}
Stop-VMHost $host -Confirm
Regards
Thank you!
Please tell me, how I can run this script on esxi host via ssh ?
Hi
this is just an example... sure you could try many improvement following powercli commands guide (see official doc)... sure before use it you should connect using command Connect-VIServer.
You should use this script via powercli (Download link: https://my.vmware.com/web/vmware/info/slug/datacenter_cloud_infrastructure/vmware_vsphere/6_0#driver...) then save file with ps1 extension.
There are some commands you could be executed via ssh directly to the single host... I define this way as a big management workaround, because the purpose of the host cli is for emergency or straordinary management. I suggest to try powercli before.
Regards