I finally got around to do a proper fail over of a VM stored on VMware VVOL. I got the scripts from https://blogs.vmware.com/virtualblocks/2017/08/07/vvol-test-failover-power-cli-6-5-1/ but had to modify them a bit.
The original script was designed to fail over between two different vCenters. I wanted to do a local fail over within the same vCenter so I did some quick and dirty adjustments:
- DR-CommonFunctions, it failed at line 102. Replaced the line with $cfgLine = $cfgLines.
- DR-Reverse, it has two issues here with using a single vCenter:
Line 98; $allOtherGroups = get-SpbmReplicationGroup
That one fails since vCenter was disconnected in the previous line, so I just removed the disconnect and connect line.
I also had to remove the part about “Discover all VMs at the original site, to figure out which ones need to be unregistered”, on line 63 to 85.
After that it worked like a charm!
Some other things worth mentioning was that the Remote Copy groups for regular LUNs also were discovered by the script, but naturally it couldn’t do anything about them.
Getting an error in the middle of the script could leave your VMs left in a limbo state because you need the SourceVvolIdMap to mount it at your DR array. Being a test environment I just deleted them, adjusted the script and retried.
Cool enough the HPE Norway team got me in touch with the guy who actually wrote these script and I shared my experience. He added that the problem with loosing the SourceVvolIdMap information was a know issue and the requirement for it would be removed in a future release of PowerCLI from VMware.