As a follow on to the shut down home-lab script, I have also written a power up script for when power is restored to your home-lab and you want to get it up and running again quickly. This script will assume your hosts are powered on and waiting, but nothing else has happened yet.
The script can be downloaded below, make sure you read though it fully and understand how it works. I am not responsible for anything going wrong.!
At the top of the script, you will need to change the settings to match your own home-lab.
[string]$vCenter_Server = "svr-vc" [string]$vCenter_Server_UserName = "administrator" [string]$vCenter_Server_Password = "********" [string]$Known_ESX_Host = "xxx.xxx.xxx.xxx" [string]$Known_ESX_Host_UserName = "root" [string]$Known_ESX_Host_Password = "********" [string]$Critical_Servers_Startup_Order = ("live-dc","svr-dc","svr-sql", "svr-vc")
- The name of your virtual centre server
- The username you use to connect to your virtual centre server
- The password for the above username
- The IP address of one of your ESXi hosts. This is explained below
- The username of the root account of for the above host
- The password for the root account
- The servers in your critical folder, in the order they should be powered up
Starting from the known host (the same as in the shut down script), it will power up your critical servers in the order specified on line 9. Once they are fully powered on (it checks that the VMware tools are available) it will check and wait for the VMware VirtualCenter Server service to be up and running. Once running, the script will then start all the remaining virtual machines.
Download the script from the link below, and again, make sure you test it before putting it live.!