DR Automation using SimpliVity’s REST API

I was working with a partner last week brainstorming different ways the SimpliVity REST API could be leveraged to simplify and automate the recovery of workloads protected using SimpliVity’s data protection to a Disaster Recovery site. From that discussion I put together a quick powershell script to demostrate how the SimpliVity REST API could be used to automate the recovery of a predefined set of protected VMs to a disaster recovery datacenter in a SimpliVity Federation.

This script is fairly simple, but it shows how powershell and the SimpliVity REST API can be used to help simplify the recovery process. There are other actions which would also need to be taken as part of the recovery, such as powering on the VMs, connecting the network adapters to a specific PortGroup in the recovery datacenter, or changing the VMs IP addresses, each of these can also be automated using powershell and PowerCLI.

The powershell script to recover a set of VMs from SimpliVity backups is included in this post but the most up-to-date version can be found here https://github.com/herseyc/SVT/blob/master/SVTRestore-to-DR.ps1
This script allows you to define a set of VMs to restore by setting $vmstorestore to the vCenter inventory names of the VMs you want to restore into the $recoverydatacenter. The $recoverydatacenter can be set to any datacenter in the a SimpliVity Federation where SimpliVity backups for the defined virtual machines have been replicated.

When the script is run it will prompt you for an OmniStack Virtual Controller (OVC) management IP address, which can be any OVC available in the environment, and credentials to access the OVC. The script will then restore each of the $vmstorestore from the most recent backup to the $recoverydatacenter.

This script was developed based on a conversation around disaster recovery, but it could also be used to restore a specific set of VMs into a test/dev datacenter or to simply test the SimpliVity backups of a set of VMs.

OmniStack 3.5.2 is scheduled to be released next week which will contain a number of enhancements to SimpliVity’s REST API. Looking forward to it.

vHersey

Hersey Cartwright is an IT professional with extensive experience designing, implementing, managing, and supporting technologies that improve business processes. Hersey is Solutions Architect for HPE SimpliVity covering Virginia, Washington DC, and Maryland. He holds the VMware Certified Design Expert (VCDX-DV #128) certification. Hersey actively participates in the VMware community and was awarded the VMware vExpert title in 2016, 2015, 2014, 2013, and 2012. He enjoys working with, teaching, and writing about virtualization and other data center technologies. Follow Hersey on Twitter @herseyc