Get VCSA backup expiration w/PowerCLi

Cover

Did you know your VCSA backups have expiration date!!!? OK, same here Emoj. I say you more, not all VMware GSS engineers know about this issue!

The issue

  • Actually what is expiring is a root password in OVF template within VCSA installation ISO! I was also surprised, but VMware terms it “known issue” Emoj in their KB51124.
  • As a result, you won’t be able to restore your VCSA backups after your release expired!
  • The restore procedure will have stuck forever at 80% in the Restore - Stage 1.

01.Get-VAMISummary

  • At the same time if you open the VCSA console, you will see the following errors: Root password is not set. RPM Installation failed.

02.Get-VAMISummary

  • If you will try to restore with any recent ISO (not expired yet) you will get an error message in the Stage 2 stating about version mismatch Emoj. Surprised again? Yes, same here Emoj.
  • The requirement: you must restore with the same ISO build you have backed up!!!

How to prevent?

  • How to foresee the VCSA backups expiration? Very simple, just use the updated Get-VAMISummary function from my VAMI PowerCLi module.
Connect-CisServer VC1, VC2, PSC1, PSC2, VCSA
Get-VAMISummary

03.Get-VAMISummary

  • At the time of writing, two first VCSA 6.5 releases (6.5.0GA and 6.5.0a) have already expired Emoj.
  • The next “Friday 13” Emoj will occur at 03-Feb-2018. This is very soon. Four!!! releases will expire – all pre U1 releases.

What am I to do?

  • First things of first, foresee the expiration and timely upgrade/patch your appliances. No patch – no VCSA restore!
  • In production environments always make one more backup in addition to the free API backup. It may be 3-d party backup solution of your choice or storage based backup.
  • There is one solution if your backups nevertheless have expired.

The solution

  • To work around this issue, we need to backdate the target ESXi host to a time prior to the root expiry date:
  • Isolate an ESXi host by vMotioning/migrating all of the VMs off. The best thing is temporarily to remove it from a cluster.
  • Change the time on the host to a time prior to the expiry date, for example to 10th April 2014, 10:18 (AM)
esxcli system time set -d 10 -H 10 -m 18 -M 04 -y 2014
  • Also, make sure to also set the hardware clock time as the system time will revert to this on a reboot.
esxcli hardware clock set -d 10 -H 10 -m 18 -M 04 -y 2014
  • To check the hardware and system time use the following commands.
esxcli hardware clock get
esxcli system time get
  • Now perform restore of your VCSA expired backup to this ESXi host.
  • Change date back to the correct date. You can use previously mentioned esxcli … get commands to retrieve correct time from another ESXi host in a cluster.

 

Summary

  • I will try to keep my Get-VAMISummary function updated with every new VCSA release. Just remember periodically to check and download the latest VAMI module from my PowerCLi GitHub repo.
Get-Command Get-VAMISummary | Get-FunctionVersion
  • The backup expiration related properties are: Release, ReleaseDate, BackupExpireDate and DaysToExpire.
Get-Command Get-VAMISummary | Get-Member
  • Another tip. You must not, but always add the VCSA release number to the backup folder name, this will save your time at restore.

You might also like

VMware Vi-Module Home
VMware VSAN PowerCLi module
VMware VAMI PowerCLi module

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s