If there is free booze and Virtualization; I'm there!
Category Archives: REST APIs
June 26, 2017Posted by on
Since my first post back in 2014, many of the example scripts that I’ve shared integrate with Zerto using their bolt-on REST APIs. After 4 years of stability, in 5.0 U3, Zerto changed the requirements of the authorization header to require the content type in addition to the session token as a “security” feature.
Unfortunately, this means that any Zerto script you have downloaded from my blog, customized, or written, needs to be edited to continue working after the upgrade. Without any modification, your REST API calls to Zerto won’t even give you an error, they will just return null. Pretty annoying huh? I’ll be honest in that I was completely livid when I found out. To me, this looks like a pointless change to fix a problem that didn’t exist while creating a heap more by how it is was implemented and communicated.
On top of this, the Zerto API documentation leaves a lot to be desired as it hasn’t even been updated (as of 06/25/17) to reflect the new requirements! But that’s why I’m here to help. So how do you go about fixing your Zerto scripts?
May 15, 2017Posted by on
Following hot on the heels of my first post on an “Introduction to Rubrik REST APIs using PowerShell & Swagger” I’d now like to show you how to easily automate the recovery and boot ordering of VMs as a Recovery Plan.
In the Rubrik HTML5 interface, you can easily recover any VM in just a few clicks with the VMs running on a whopping 30,000 IOPS per brik (Rubrik appliance) giving you a sub 1 minute RTO. However, at scale, clicking on each VM to recover can become tedious, hard to manage and it will always require human interaction. This is where using PowerShell to interact with REST APIs is going to make your life easier by automating the entire process for anything from 1 to 10,000+ VMs. Use cases include: Read more of this post
May 8, 2017Posted by on
One thing I’ve always been passionate about is writing scripts that are easy to read and consume. By showing you how to directly interact with REST APIs this enables you to do anything, and not be limited to the PowerShell functions provided by the vendor.
When it comes to working with REST APIs and PowerShell this starts to pay dividends when you want to take all the knowledge you’ve learned from working with 1 platform then use the same skills to connect and leverage another.
My first example of porting skills between platforms follows my recent journey of switching from working for Zerto to Rubrik. In this post I will give you all the information needed to connect and leverage Rubrik REST APIs using PowerShell.
April 25, 2017Posted by on
A few days ago a Zerto prospect reached out to me on LinkedIn with an interesting script request and there is nothing like a good challenge to get me motivated to pull out PowerShell ISE! With over 1000 VMs to protect their key requirement was to log the start and end time of initial syncs. While the ZVR GUI shows when a VPG was created, it doesn’t show when the initial sync finishes:
This is certainly an annoying omission and the lack of specific data points isn’t limited to just Zerto; how many other solutions do you use in your environment where you want to know/see something that just isn’t there for seemingly no logical reason? Of course, you could contact your vendor account manager, raise a feature request, wait 3-6 months and cross your fingers that it was even considered let alone in the product. Or you can use the REST APIs to get the data yourself, today, in minutes!
March 14, 2017Posted by on
One of the most popular blog posts in the archive has been scripting recovery plans in Zerto. This is most likely because one of the most frequent requests I hear is the ability to control the boot ordering of Virtual Protection Groups (VPGs), not just the VMs within a VPG. This makes total sense when you have multiple tiers of applications and you want to recover them in order of priority or based on inter-dependencies.
In version 5.0 U2, Zerto included the ability to reverse the protection using the REST API. This meant I could finally deliver a script that automates failover and failback operations in a orchestrated fashion! In a first for virtuallysober.com I decided to give an overview of the script using a video: