ZertoApiWrapper icon indicating copy to clipboard operation
ZertoApiWrapper copied to clipboard

Copy-Zerto VPG bug fixes and VCD compatibility

Open alex-colvin opened this issue 5 months ago • 0 comments

Copy-ZertoVPG is lacking functionality when run at the recovery site ZVM and for VCD sites. I'm proposing adding an optional parameter to this function to add the VCD StorageProfile Identifier, which is added to the appropriate spot in the vpg settings object. On top of this I am adding source site IDs parameters to bother get-zerto(un)protectedVM functions to be able to run this function at the recovery site ZVM. Ordinarily I make 2 commits here, but these changes paired together were necessary for the function to work for me.

Description

Added Parameter for VCD compatibility Used parameters in the VM functions to specify source site. updated error action on the vm POST request so you can run the function in a for loop without breaking when vms aren't found. Added if statement to check for VCD settings and to input the VCD storage profile identifier Updated Docs

Related Issue

Copy-ZertoVpg bug fixes and VCD compatibility #129

Motivation and Context

When mapping the VMs to add to the VPG, The VMs only populate from the local site. If you are connected to the recovery site, the function will not find the VMs. Additionally, VPG settings PUTs and POSTs fail without the VCD StorageProfile added to the VPG settings object, so I will throw that in my solutions as well.

How Has This Been Tested?

I tested this on Mulittenant cloud ZVMA connected to VCD Module version used: 2.0.0 Operating System and PowerShell version: Windows 10 PSVersion 5.1.19041.4648 Zerto Virtual Manager Version: 10.0.1 U2

Screenshots (if appropriate):

Types of changes

  • [x] Bug fix (non-breaking change which fixes an issue)
  • [x] New feature (non-breaking change which adds functionality)
  • [ ] Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • [x] My code follows the code style of this project.
  • [x] My change requires a change to the documentation.
  • [x] I have updated the documentation accordingly.
  • [x] I have read the CONTRIBUTING document.
  • [x] I have added tests to cover my changes.
  • [x] All new and existing tests passed.

alex-colvin avatar Aug 30 '24 17:08 alex-colvin