Server Room once a year power maintenance.
Need shut down all server。
How shut down a group of VMs use Schedule task.
Then Shut down ESXi host?
Hi,
Use this below blog for shutting down multiple VM. Good Information and explanation provided
Using PowerShell to Gracefully Shut Down Multiple Virtual Machines in VMware | Pipe2Text.com
Use bash shell to create the script.
But it is not the good practice, usually before any power maintenance, configuration backup is necessary before any shutdown. Or else, we may face server unable to up.
In my lab environment I'm using PowerCLI scripts to start/stop the lab (power on ESXi hosts via HPE iLO powershell cmdlets, wait until ESXi pings, wait until I can connect-viserver, exit maintenance mode, start VMs in several stages; start VMs of stage, wait until VMware Tools status for all stage VMs is OK or OLD, do next stage until done. Shutdown almost the same procedure only inverse order and no iLO commands needed)
How to configuration backup?
Have you seen this article and is it applicable to your situation- http://www.itingredients.com/vmware-scheduled-task-power-off-power-virtual-machine/
If you found my answers useful please consider marking them as Correct OR Helpful
Regards,
Randhir
if you have third party backup tool like netbackup , TSM etc. you can take full backup from their before going to shutdown.
Regards,
Randhir
Hi,
Use this below blog for shutting down multiple VM. Good Information and explanation provided
Using PowerShell to Gracefully Shut Down Multiple Virtual Machines in VMware | Pipe2Text.com
I want to shut down a group of VMs, don't a VM.
It's OK. Thanks
Easy and Effective solution in PowerCLI to Shutdown VMs with one click:
First LOGON into the vCenter from locally/remotely PowerCLI
Connect-VIServer -server YouvCenterServerName
PASTE,
get-content c:\cli\vm.txt | foreach-object { shutdown-vmguest $_ }
Press ENTER > DONE!
EXAMPLE:
C: Is your local C:\ Drive
CLI: You need to create a folder in the C: Drive & name it "cli" or anything you want
VM.TXT: then create a txt file & input all the VM names in it. EX:
VM01
VM02
Vm03
Regards,
Randhir
Thanks