VMware Cloud Community
Jmuldown
Contributor
Contributor

Enhanced Linked Mode VSphere 7.0.3 - Pre Update/Upgrade Powershell Script (Safe or not)

if I have 5 - 10 vCenters in Enhanced Linked Mode can I safely run a PowerCLi script to connect to the associated ESXi Hosts, Power the VC's VM's down gracefully and take a snapshot (with well defined description) when their all offline wait for a defined time e.g 2.30pm - 10 minutes post the snapshot and power them back online for pre update work. 

Currently have it lab tested and it works but my question is it safe or advised to do vs accessing the GUI VAMI and gracefully shutting down from there and accessing the ESXi Hosts and taking a snap and powering on ?

Thanks in advance 

Labels (3)
0 Kudos
1 Reply
markey165
Expert
Expert

@Jmuldown - Yes perfectly safe and exactly as per VMware best practise - see https://kb.vmware.com/s/article/85662

i've been using this method for some time - the idea being that the vCenters are off, and no writes are happening, therefore you get 100% guaranteed application consistent snapshots for all vCenters prior to upgrade, so you can roll them all back if anything goes wrong.    In terms of how long to wait, you just need to monitor the snapshot tasks on each ESXi host until they have all finished, then you can power them back on.  In case you havn't done this before, i've summarized my vCenter 7.0.3 upgrade steps below.

 

Pre-upgrade (ie 1-2 days before)

  1. Starting with the first vCenter, check there are no snapshots prior to upgrade. If there are, delete them.
  2. Run the Interoperability check - From the top level vCenter object > Summary > Click Updates Available > select the version > Generate report > Interoperability > Ensure the test passes
  3. Run the Pre-Update check (same as above but select Pre-Update checks at the Report step) > ensure it passes
  4. Log into the VAMI, check its health, check Backups are working, and you have a most recent backup, for added recovery options.
  5. Stage the upgrade (this saves time on the day) - From the VAMI, go to Update > Select the build > Stage Only > Wait until status shows "staged"
  6. Repeat the above for all vCenters (I have a nice table in my Wiki which I use as a checklist so I don't miss anthing)
  7. Make sure the planned upgrade window doesn't clash with any other Operations (such as Backups!)
  8. If any of the above checks fail, or any vCenter is not healthy, you should not proceed until all checks have passed.

 

On the day

  1. Check there are no running tasks or backups running
  2. Make a note of which ESXi host each vCenter is running on
  3. Power off all vCenters from the ESXi host(s)
  4. Snapshot all vCenters (ensure all complete successfully)
  5. Power on all vCenters (takes 5-10 minutes for all services to initialize)
  6. Select your first vCenter, log into VAMI as root > Update > the version you selected should be showing as Staged > Click Install > follow the prompts to completion (this step takes 35-45 mins to complete in my environment). Note that the upgrade can appear to get stuck for up to 30 minutes on the stage called "Converting Data as part of post install", don't worry this is normal.
  7. When completed, from the VAMI > Click Summary and confirm all components are green.
  8. Confirm the version and build are displaying the new versions
  9. Log back into the vCenter UI and confirm all is showing healthy
  10. Move onto the next vCenters and upgrade each one in turn until all are finished.
  11. Once completed make sure all vCenters can see each other in the UI (which will confirm ELM is still working
  12. Once you are happy everything is working, remove the snapshots.

 

HTH

_____________________________________________
If this post helps you, please leave Kudo | or mark this reply as an answer
0 Kudos