VPLEX is another of my favourite products, and for good reason. I currently run a Metro cluster underneath a VMware platform that has proven to be super reliable.
One important design consideration for this is to ensure that VM’s are configured for site bias.
Why ? Glad you asked. In a VPLEX Metro configuration, a VPLEX detach rule is defined for every Distributed Virtual volume. If a communication failure occurs between the two VPLEX clusters, these detach rules define which cluster should detach it’s mirror leg to prevent both sites continuing to permit I/O activity during a failure. If this was not done, data inconsistency is the obvious outcome.
The site with bias ( the preferred site) will continue to service the I/O to the volume(s) and the non-preferred site will suspend all I/O. This process is transparent to the users and is fully automated.
Once the communications issue is resolved (in our case, monitored by the VPLEX witness) the Distributed volumes will be re-synched and I/O will resume.
TL:DR ??
Here’s a quick and easy PowerCLI script that enumerates all the Virtual Machines that are running off a set of datastores with the same prefix, and then add’s them to a DRS Group that has a ‘should‘ rule;
The Datastores all have the same prefix in their name “SiteA_VPLEX” and the DRS Group Rules are called “SiteA_VMs SiteBVMS” ( 1 rule, VM Group and Datastore list per side of the cluster)
1 2 |
$SourceVMs = (Get-datastore | Where {$_.name -like 'SiteA_VPLEX*'} | Get-VM | foreach { $_.Name }) Get-DRSVMGroup -Name SiteA_VMs | SetDrsVMGroup -VM $SourceVMs -append |
This makes use of the most-excellent DRSRule module by Luc Dekens & Matt Boren available from github.
In my next post I’ll expand this theme to report on the missing VM’s from the groups and email this to a recipient for review of the action.
Great post. We use similar script. 1 SDRS cluster for each detach group. Script adjusts DRS based on VM vnx file location
Thanks 🙂
Great post. We use similar script. 1 SDRS cluster for each detach group. Script adjusts DRS based on VM vnx file location
Thanks 🙂