0 0

Upgrading VMstores with the Tintri Automation Toolkit for PowerShell

If you have a Tintri VMstore, we make it incredibly easy to upgrade to newer software versions. Just download the latest upgrade package from the Tintri Support Portal, drag and drop the file to the 'Upgrade' section in the VMstore UI and hit the Upgrade button.

However, many of our customers have multiple VMstores, and it can be a chore to upgrade each of them using the UI. We attempted to solve this problem with the latest release of the Tintri Automation Toolkit for PowerShell.

The Automation Toolkit v2.5 offers two new cmdlets - Update-TintriAppliance and Get-TintriApplianceUpgradeStatus for this purpose. With the toolkit installed, download the VMstore upgrade package from the support portal as you would normally do–and use the first cmdlet to kick off an upgrade.

Update-TintriAppliance -UpgradeFile $file -AdminPassword $password

Then, use the second cmdlet to monitor the upgrade process. With the -Monitor switch, the toolkit periodically displays the upgrade status and returns when done.

Get-TintriApplianceUpgradeStatus -Monitor -UpdateInterval EveryTwoMinutes

In practice, the upgrade workflow can be a bit more involved than what we just described. During the upgrade, the VMstore appliance goes through a restart, and the clients (including the UI) need to re-establish the connection to continue tracking the upgrade process.

To make things easier, we wrote a PowerShell script that uses the above cmdlets and orchestrates an upgrade. Here's what the script does:

  • Connect to the VMstore
  • Kick off the upgrade with the Update-TintriAppliance cmdlet
  • Monitor the upgrade process
  • When the VMstore restarts during the upgrade, reconnect.
  • Continue to monitor the upgrade and return the result

The script can be found on our GitHub repository. Just download the script to your machine and run Import-Module .\VmStoreUpgrade.ps1 and then invoke the upgrade function:

Upgrade-Vmstore "vmstore01.mycompany.com" $username $password $upgradeFile

It's that easy!

P.S. How do you upgrade multiple VMstores? Just invoke upgrade function in a loop! Can we make it even simpler? Find out in our next blog post.

Dhruv Vemula / Dec 14, 2015

Dhruv Vemula is a Member of Technical Staff at Tintri working on the Automation Toolkit. Prior to Tintri, Dhruv was a software engineer at Cisco working on Cisco's UCS and Nexus 1000V products. Dhr...more

Temporary_css