So I have a bit of a dilemma where my company needs to update a very large number of VMs on a regular basis as these connect to customer networks. Right now this is done by manually powering up, ssh and powering down the machines but that's pretty cumbersome as that's my responsibility and eats up a day and a half of my week once a month. What I want to do is the following:
- Check VM Power State
- If VM is off, power on and wait 5 minutes
- SSH into machine and update
- Wait 20 minutes for VM to complete updates
- Power off if VM was originally off
- Move to next VM