Compare commits
41 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 97e3c20792 | |||
| ad8b61e19f | |||
| 14d36ab32b | |||
| 7e61fbec7e | |||
| 315cdf6db9 | |||
| ccc4118d22 | |||
| 764738b015 | |||
| 4b1506f962 | |||
| 55b6614a69 | |||
| f9291ed933 | |||
| a2d724a54c | |||
| f06157c75e | |||
| d413374c09 | |||
| 1513cd4f4b | |||
| 1daac508b2 | |||
| a22d9e3416 | |||
| 06e81b46d6 | |||
| af33715f02 | |||
| 912bca0f9c | |||
| 4ac951607b | |||
| d3d01f892f | |||
| 84b7922156 | |||
| 0eaf89608b | |||
| 50e03b36f5 | |||
| 4531d2d53b | |||
| e6e6be9ede | |||
| 5c2dd620d8 | |||
| a5a91febcf | |||
| bb5dbaa0d4 | |||
| e6b5777e64 | |||
| ddee165575 | |||
| f0279633dd | |||
| 139e52f3e2 | |||
| eea6e95988 | |||
| 0630cbb20e | |||
| 682750fc6d | |||
| 7e58672bc2 | |||
| 34f2f937aa | |||
| f59d0bece4 | |||
| 13ee62de6c | |||
| 8fd820ff38 |
@@ -5,6 +5,44 @@ All notable changes to this project will be documented in this file.
|
|||||||
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
||||||
and this project is transitioning to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
and this project is transitioning to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
||||||
|
|
||||||
|
## [1.5.4]
|
||||||
|
|
||||||
|
### Zerto Virtual Manager
|
||||||
|
|
||||||
|
#### Updated
|
||||||
|
|
||||||
|
* Updated `Install-ZertoVra` function [help documentation](https://github.com/ZertoPublic/ZertoApiWrapper/blob/master/docs/Install-ZertoVra.md) to allow for configuring the number of vCPUs during deployment. Special thanks to @mitchellen for the fix.
|
||||||
|
|
||||||
|
## [1.5.3]
|
||||||
|
|
||||||
|
### Zerto Virtual Manager
|
||||||
|
|
||||||
|
#### Fixed
|
||||||
|
|
||||||
|
* Fixed an [issue](https://github.com/ZertoPublic/ZertoApiWrapper/issues/112) where `New-ZertoVpg` would fail when specifying the local site as the target site.
|
||||||
|
* Updated the method where a Site Identifer is obtained during the `New-ZertoVpg` execution that would occasionally fail on some versions of PowerShell.
|
||||||
|
|
||||||
|
#### Updated
|
||||||
|
|
||||||
|
* Updated `New-ZertoVpg` function [help documentation](https://github.com/ZertoPublic/ZertoApiWrapper/blob/master/docs/New-ZertoVpg.md) to more clearly specify the return value and the requirement to pass it into the `Save-ZertoVpgSetting` function to commit the VPG.
|
||||||
|
|
||||||
|
## [1.5.2]
|
||||||
|
|
||||||
|
### Zerto Virtual Manager
|
||||||
|
|
||||||
|
#### Fixed
|
||||||
|
|
||||||
|
* Fixed an issue when attempting to export more than 100 VPGs with the `Export-ZertoVpg` function that would cause an error.
|
||||||
|
|
||||||
|
## [1.5.1]
|
||||||
|
|
||||||
|
### Zerto Virtual Manager
|
||||||
|
|
||||||
|
#### Fixed
|
||||||
|
|
||||||
|
* Fixed an [issue](https://github.com/ZertoPublic/ZertoApiWrapper/issues/108) with `New-ZertoVpg` where when specifying a single host as a recovery target, the host identifier was not properly assigned. - Thanks @jonsouzerto!
|
||||||
|
* Fixed an [issue](https://github.com/ZertoPublic/ZertoApiWrapper/issues/86) with `Invoke-ZertoMoveVpg` where parameters should have been mandatory in certain workflows. - Thanks @gdbarron!
|
||||||
|
|
||||||
## [1.5.0]
|
## [1.5.0]
|
||||||
|
|
||||||
### Zerto Virtual Manager
|
### Zerto Virtual Manager
|
||||||
|
|||||||
@@ -36,6 +36,7 @@ All recent updates can now be tracked via the [Change Log](https://github.com/Ze
|
|||||||
|
|
||||||
## TODO
|
## TODO
|
||||||
|
|
||||||
|
* Support ZVM appliance (different connection flow)
|
||||||
* JFLR Functionality
|
* JFLR Functionality
|
||||||
* Create VPG (Per-VM modification and Backup Settings)
|
* Create VPG (Per-VM modification and Backup Settings)
|
||||||
* Edit VPG
|
* Edit VPG
|
||||||
|
|||||||
@@ -46,6 +46,10 @@ Describe $global:function -Tag 'Unit', 'Source', 'Built' {
|
|||||||
return "1024d377-afb8-4880-82f0-96eeff413ffd"
|
return "1024d377-afb8-4880-82f0-96eeff413ffd"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Mock -ModuleName ZertoApiWrapper -CommandName Remove-ZertoVpgSettingsIdentifier {
|
||||||
|
return $null
|
||||||
|
}
|
||||||
|
|
||||||
Mock -ModuleName ZertoApiWrapper -CommandName Get-ZertoVpgSetting {
|
Mock -ModuleName ZertoApiWrapper -CommandName Get-ZertoVpgSetting {
|
||||||
$returnObj = @{
|
$returnObj = @{
|
||||||
Backup = $null
|
Backup = $null
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ Describe $global:function -Tag 'Unit', 'Source', 'Built' {
|
|||||||
|
|
||||||
Context "$global:function::Parameter Unit Tests" {
|
Context "$global:function::Parameter Unit Tests" {
|
||||||
It "$global:function should have exactly 24 parameters defined" {
|
It "$global:function should have exactly 24 parameters defined" {
|
||||||
(Get-Command $global:function).Parameters.Count | Should -Be 24
|
(Get-Command $global:function).Parameters.Count | Should -Be 25
|
||||||
}
|
}
|
||||||
|
|
||||||
$ParameterTestCases = @(
|
$ParameterTestCases = @(
|
||||||
|
|||||||
@@ -5,17 +5,18 @@ $global:function = ((Split-Path -leaf $PSCommandPath).Split('.'))[0]
|
|||||||
Describe $global:function -Tag 'Unit', 'Source', 'Built' {
|
Describe $global:function -Tag 'Unit', 'Source', 'Built' {
|
||||||
|
|
||||||
Context "$global:function::Parameter Unit Tests" {
|
Context "$global:function::Parameter Unit Tests" {
|
||||||
It "$global:function should have exactly 20 parameters defined" {
|
It "$global:function should have exactly 21 parameters defined" {
|
||||||
(Get-Command $global:function).Parameters.Count | Should -Be 20
|
(Get-Command $global:function).Parameters.Count | Should -Be 21
|
||||||
}
|
}
|
||||||
|
|
||||||
$ParameterTestCases = @(
|
$ParameterTestCases = @(
|
||||||
|
@{ParameterName = 'vpgIdentifier'; Type = 'Guid[]'; Mandatory = $true; Validation = 'NotNullOrEmpty' }
|
||||||
@{ParameterName = 'vpgName'; Type = 'String[]'; Mandatory = $true; Validation = 'NotNullOrEmpty' }
|
@{ParameterName = 'vpgName'; Type = 'String[]'; Mandatory = $true; Validation = 'NotNullOrEmpty' }
|
||||||
@{ParameterName = 'commitPolicy'; Type = 'String'; Mandatory = $false; Validation = 'Set' }
|
@{ParameterName = 'commitPolicy'; Type = 'String'; Mandatory = $false; Validation = 'Set' }
|
||||||
@{ParameterName = 'commitPolicyTimeout'; Type = 'Int'; Mandatory = $false; Validation = 'Range' }
|
@{ParameterName = 'commitPolicyTimeout'; Type = 'Int'; Mandatory = $false; Validation = 'Range' }
|
||||||
@{ParameterName = 'forceShutdown'; Type = 'Switch'; Mandatory = $false; Validation = $null }
|
@{ParameterName = 'forceShutdown'; Type = 'Switch'; Mandatory = $false; Validation = $null }
|
||||||
@{ParameterName = 'disableReverseProtection'; Type = 'Switch'; Mandatory = $true; Validation = $null }
|
@{ParameterName = 'disableReverseProtection'; Type = 'Switch'; Mandatory = $false; Validation = $null }
|
||||||
@{ParameterName = 'keepSourceVms'; Type = 'Switch'; Mandatory = $true; Validation = $null }
|
@{ParameterName = 'keepSourceVms'; Type = 'Switch'; Mandatory = $false; Validation = $null }
|
||||||
@{ParameterName = 'ContinueOnPreScriptFailure'; Type = 'Switch'; Mandatory = $false; Validation = $null }
|
@{ParameterName = 'ContinueOnPreScriptFailure'; Type = 'Switch'; Mandatory = $false; Validation = $null }
|
||||||
@{ParameterName = 'whatIf'; Type = 'Switch'; Mandatory = $false; Validation = 'ShouldProcess' }
|
@{ParameterName = 'whatIf'; Type = 'Switch'; Mandatory = $false; Validation = 'ShouldProcess' }
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -38,6 +38,7 @@ function Export-ZertoVpg {
|
|||||||
$vpgSettings = Get-ZertoVpgSetting -vpgSettingsIdentifier $vpgSettingsIdentifier
|
$vpgSettings = Get-ZertoVpgSetting -vpgSettingsIdentifier $vpgSettingsIdentifier
|
||||||
$filePath = "{0}\{1}.json" -f $outputPath, $name
|
$filePath = "{0}\{1}.json" -f $outputPath, $name
|
||||||
$vpgSettings | Convertto-Json -depth 10 | Out-File -FilePath $filePath
|
$vpgSettings | Convertto-Json -depth 10 | Out-File -FilePath $filePath
|
||||||
|
$null = Remove-ZertoVpgSettingsIdentifier -vpgSettingsIdentifier $vpgSettingsIdentifier
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -25,6 +25,11 @@ function Install-ZertoVra {
|
|||||||
)]
|
)]
|
||||||
[ValidateRange(1, 16)]
|
[ValidateRange(1, 16)]
|
||||||
[int]$memoryInGB = 3,
|
[int]$memoryInGB = 3,
|
||||||
|
[Parameter(
|
||||||
|
HelpMessage = "Initial number of CPUs to assign to the VRA. Default is 1, Minimum is 1, Maximum is 4"
|
||||||
|
)]
|
||||||
|
[ValidateRange(1, 4)]
|
||||||
|
[int]$NumOfCpus = 1,
|
||||||
[Parameter(
|
[Parameter(
|
||||||
HelpMessage = "Bandwidth group to assign to the VRA. If unspecified will assign to the 'default_group'"
|
HelpMessage = "Bandwidth group to assign to the VRA. If unspecified will assign to the 'default_group'"
|
||||||
)]
|
)]
|
||||||
@@ -136,6 +141,7 @@ function Install-ZertoVra {
|
|||||||
}
|
}
|
||||||
$vraBasic['HostIdentifier'] = $hostIdentifier.toString()
|
$vraBasic['HostIdentifier'] = $hostIdentifier.toString()
|
||||||
$vraBasic['MemoryInGB'] = $memoryInGB
|
$vraBasic['MemoryInGB'] = $memoryInGB
|
||||||
|
$vraBasic['NumOfCpus'] = $NumOfCpus
|
||||||
$vraBasic['NetworkIdentifier'] = $networkIdentifier.toString()
|
$vraBasic['NetworkIdentifier'] = $networkIdentifier.toString()
|
||||||
$vraBasic['UsePublicKeyInsteadOfCredentials'] = $true
|
$vraBasic['UsePublicKeyInsteadOfCredentials'] = $true
|
||||||
$vraBasicNetwork = [ordered]@{ }
|
$vraBasicNetwork = [ordered]@{ }
|
||||||
|
|||||||
@@ -1,22 +1,57 @@
|
|||||||
<# .ExternalHelp ./en-us/ZertoApiWrapper-help.xml #>
|
<# .ExternalHelp ./en-us/ZertoApiWrapper-help.xml #>
|
||||||
function Invoke-ZertoMove {
|
function Invoke-ZertoMove {
|
||||||
[CmdletBinding( DefaultParameterSetName = "main", SupportsShouldProcess = $true )]
|
[CmdletBinding( DefaultParameterSetName = "id", SupportsShouldProcess = $true )]
|
||||||
param(
|
param(
|
||||||
[Parameter(
|
[Parameter(
|
||||||
|
ParameterSetName = 'name',
|
||||||
|
HelpMessage = "Name(s) of the VPG(s) you want to move.",
|
||||||
|
Mandatory
|
||||||
|
)]
|
||||||
|
[Parameter(
|
||||||
|
ParameterSetName = 'commitName',
|
||||||
HelpMessage = "Name(s) of the VPG(s) you want to move.",
|
HelpMessage = "Name(s) of the VPG(s) you want to move.",
|
||||||
Mandatory
|
Mandatory
|
||||||
)]
|
)]
|
||||||
[ValidateNotNullOrEmpty()]
|
[ValidateNotNullOrEmpty()]
|
||||||
[string[]]$vpgName,
|
[string[]]$vpgName,
|
||||||
[Parameter(
|
[Parameter(
|
||||||
|
ParameterSetName = 'id',
|
||||||
|
HelpMessage = "ID(s) of the VPG(s) you want to move.",
|
||||||
|
Mandatory,
|
||||||
|
ValueFromPipelineByPropertyName
|
||||||
|
)]
|
||||||
|
[Parameter(
|
||||||
|
ParameterSetName = 'commitId',
|
||||||
|
HelpMessage = "ID(s) of the VPG(s) you want to move.",
|
||||||
|
Mandatory,
|
||||||
|
ValueFromPipelineByPropertyName
|
||||||
|
)]
|
||||||
|
[ValidateNotNullOrEmpty()]
|
||||||
|
[guid[]]$vpgIdentifier,
|
||||||
|
[Parameter(
|
||||||
|
ParameterSetName = 'commitName',
|
||||||
HelpMessage = "'Rollback': After the seconds specified in the commitValue setting have elapsed, the failover is rolled back.
|
HelpMessage = "'Rollback': After the seconds specified in the commitValue setting have elapsed, the failover is rolled back.
|
||||||
'Commit': After the seconds specified in the commitValue setting have elapsed, the failover continues, committing the virtual machines in the recovery site.
|
'Commit': After the seconds specified in the commitValue setting have elapsed, the failover continues, committing the virtual machines in the recovery site.
|
||||||
'None': The virtual machines in the VPG being failed over remain in the Before Commit state until either they are committed with Commit a failover, or rolled back with Roll back a failover.
|
'None': The virtual machines in the VPG being failed over remain in the Before Commit state until either they are committed with Commit a failover, or rolled back with Roll back a failover.
|
||||||
Default is the Site Settings setting."
|
Default is the Site Settings setting.",
|
||||||
|
Mandatory
|
||||||
|
)]
|
||||||
|
[Parameter(
|
||||||
|
ParameterSetName = 'commitId',
|
||||||
|
HelpMessage = "'Rollback': After the seconds specified in the commitValue setting have elapsed, the failover is rolled back.
|
||||||
|
'Commit': After the seconds specified in the commitValue setting have elapsed, the failover continues, committing the virtual machines in the recovery site.
|
||||||
|
'None': The virtual machines in the VPG being failed over remain in the Before Commit state until either they are committed with Commit a failover, or rolled back with Roll back a failover.
|
||||||
|
Default is the Site Settings setting.",
|
||||||
|
Mandatory
|
||||||
)]
|
)]
|
||||||
[ValidateSet("Rollback", "Commit", "None")]
|
[ValidateSet("Rollback", "Commit", "None")]
|
||||||
[string]$commitPolicy,
|
[string]$commitPolicy,
|
||||||
[Parameter(
|
[Parameter(
|
||||||
|
ParameterSetName = 'commitName',
|
||||||
|
HelpMessage = "The amount of time, in seconds, the Move is in a 'Before Commit' state, before performing the commitPolicy setting. If omitted, the site settings default will be applied."
|
||||||
|
)]
|
||||||
|
[Parameter(
|
||||||
|
ParameterSetName = 'commitId',
|
||||||
HelpMessage = "The amount of time, in seconds, the Move is in a 'Before Commit' state, before performing the commitPolicy setting. If omitted, the site settings default will be applied."
|
HelpMessage = "The amount of time, in seconds, the Move is in a 'Before Commit' state, before performing the commitPolicy setting. If omitted, the site settings default will be applied."
|
||||||
)]
|
)]
|
||||||
# Min 5 Minutes, Max 24 Hours, Default Site Settigns.
|
# Min 5 Minutes, Max 24 Hours, Default Site Settigns.
|
||||||
@@ -27,15 +62,11 @@ function Invoke-ZertoMove {
|
|||||||
)]
|
)]
|
||||||
[switch]$forceShutdown,
|
[switch]$forceShutdown,
|
||||||
[Parameter(
|
[Parameter(
|
||||||
ParameterSetName = "disableReverseProtection",
|
HelpMessage = "Do not enable reverse protection. The VPG definition is kept with the status Needs Configuration and the reverse settings in the VPG definition are not set."
|
||||||
HelpMessage = "Do not enable reverse protection. The VPG definition is kept with the status Needs Configuration and the reverse settings in the VPG definition are not set.",
|
|
||||||
Mandatory
|
|
||||||
)]
|
)]
|
||||||
[switch]$disableReverseProtection,
|
[switch]$disableReverseProtection,
|
||||||
[Parameter(
|
[Parameter(
|
||||||
ParameterSetName = "keepSourceVms",
|
HelpMessage = "Prevent the protected virtual machines from being deleted in the protected site. Using this setting disables reverse protection."
|
||||||
HelpMessage = "Prevent the protected virtual machines from being deleted in the protected site. Using this setting disables reverse protection.",
|
|
||||||
Mandatory
|
|
||||||
)]
|
)]
|
||||||
[switch]$keepSourceVms,
|
[switch]$keepSourceVms,
|
||||||
[Parameter(
|
[Parameter(
|
||||||
@@ -46,54 +77,52 @@ function Invoke-ZertoMove {
|
|||||||
|
|
||||||
begin {
|
begin {
|
||||||
$baseUri = "vpgs"
|
$baseUri = "vpgs"
|
||||||
|
$body = @{
|
||||||
|
forceShutdown = $forceShutdown.IsPresent
|
||||||
|
ContinueOnPreScriptFailure = $ContinueOnPreScriptFailure.IsPresent
|
||||||
|
keepSourceVms = $keepSourceVms.IsPresent
|
||||||
|
reverseProtection = -not $disableReverseProtection.IsPresent
|
||||||
|
}
|
||||||
|
|
||||||
|
if ( $keepSourceVms.IsPresent -and -not $disableReverseProtection.IsPresent ) {
|
||||||
|
Write-Verbose 'Disabling reverse protection as keepSourceVms requires it'
|
||||||
|
$body['reverseProtection'] = $false
|
||||||
}
|
}
|
||||||
|
|
||||||
process {
|
|
||||||
$body = @{ }
|
|
||||||
#TODO - use a foreach loop to populate the body without all the if statments
|
|
||||||
if ($PSBoundParameters.ContainsKey('commitPolicy')) {
|
if ($PSBoundParameters.ContainsKey('commitPolicy')) {
|
||||||
$body['commitPolicy'] = $commitPolicy
|
$body['commitPolicy'] = $commitPolicy
|
||||||
}
|
|
||||||
if ($PSBoundParameters.ContainsKey('commitPolicyTimeout')) {
|
if ($PSBoundParameters.ContainsKey('commitPolicyTimeout')) {
|
||||||
$body['commitPolicyTimeout'] = $commitPolicyTimeout
|
$body['commitPolicyTimeout'] = $commitPolicyTimeout
|
||||||
}
|
}
|
||||||
if ($PSBoundParameters.ContainsKey('forceShutdown')) {
|
|
||||||
$body['forceShutdown'] = $true
|
|
||||||
} else {
|
|
||||||
$body['forceShutdown'] = $false
|
|
||||||
}
|
}
|
||||||
if ($PSBoundParameters.ContainsKey('ContinueOnPreScriptFailure')) {
|
|
||||||
$body['ContinueOnPreScriptFailure'] = $true
|
|
||||||
} else {
|
|
||||||
$body['ContinueOnPreScriptFailure'] = $false
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
process {
|
||||||
|
|
||||||
switch ($PSCmdlet.ParameterSetName) {
|
switch ($PSCmdlet.ParameterSetName) {
|
||||||
"disableReverseProtection" {
|
{ $_ -in 'name', 'commitName' } {
|
||||||
$body['reverseProtection'] = $false
|
$vpgIds = foreach ($name in $vpgName) {
|
||||||
$body['keepSourceVms'] = $false
|
|
||||||
}
|
|
||||||
|
|
||||||
"keepSourceVms" {
|
|
||||||
$body['reverseProtection'] = $false
|
|
||||||
$body['keepSourceVms'] = $true
|
|
||||||
}
|
|
||||||
|
|
||||||
"main" {
|
|
||||||
$body['reverseProtection'] = $true
|
|
||||||
$body['keepSourceVms'] = $false
|
|
||||||
}
|
|
||||||
}
|
|
||||||
foreach ($name in $vpgName) {
|
|
||||||
$vpgId = $(Get-ZertoVpg -name $name).vpgIdentifier
|
$vpgId = $(Get-ZertoVpg -name $name).vpgIdentifier
|
||||||
if ( -not $vpgId ) {
|
if ( -not $vpgId ) {
|
||||||
Write-Error "VPG: $name not found. Please check the name and try again. Skipping"
|
Write-Error "VPG: '$name' not found. Please check the name and try again. Skipping"
|
||||||
} else {
|
} else {
|
||||||
$uri = "{0}/{1}/move" -f $baseUri, $vpgId
|
Write-Verbose "VPG: $name, ID: $vpgId"
|
||||||
if ($PSCmdlet.ShouldProcess("Moving VPG: $name with settings: $($body | convertto-json)")) {
|
$vpgId
|
||||||
Invoke-ZertoRestRequest -uri $uri -method "POST" -body $($body | ConvertTo-Json)
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
{ $_ -in 'id', 'commitId' } {
|
||||||
|
$vpgIds = $vpgIdentifier
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
foreach ($thisId in $vpgIds) {
|
||||||
|
$uri = "{0}/{1}/move" -f $baseUri, $thisId
|
||||||
|
if ($PSCmdlet.ShouldProcess("Moving VPG: $thisId with settings: $($body | ConvertTo-Json)")) {
|
||||||
|
Invoke-ZertoRestRequest -uri $uri -method "POST" -body $($body | ConvertTo-Json)
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
end {
|
end {
|
||||||
|
|||||||
@@ -165,7 +165,7 @@ function New-ZertoVpg {
|
|||||||
begin {
|
begin {
|
||||||
# Create an identifiers table, and start converting names to identifiers.
|
# Create an identifiers table, and start converting names to identifiers.
|
||||||
$identifiersTable = @{ }
|
$identifiersTable = @{ }
|
||||||
$identifiersTable['recoverySiteIdentifier'] = (Get-ZertoPeerSite).Where({$_.PeerSiteName -like $recoverySite}) | Select-Object -ExpandProperty SiteIdentifier
|
$identifiersTable['recoverySiteIdentifier'] = Get-ZertoVirtualizationSite | Where-Object { $_.VirtualizationSiteName -like $recoverySite } | Select-Object -ExpandProperty SiteIdentifier
|
||||||
$peerSiteNetworks = $(Get-ZertoVirtualizationSite -siteIdentifier $identifiersTable['recoverySiteIdentifier'] -networks)
|
$peerSiteNetworks = $(Get-ZertoVirtualizationSite -siteIdentifier $identifiersTable['recoverySiteIdentifier'] -networks)
|
||||||
$identifiersTable['failoverNetworkIdentifier'] = $peerSiteNetworks | Where-Object { $_.VirtualizationNetworkName -like $recoveryNetwork } | Select-Object -ExpandProperty NetworkIdentifier
|
$identifiersTable['failoverNetworkIdentifier'] = $peerSiteNetworks | Where-Object { $_.VirtualizationNetworkName -like $recoveryNetwork } | Select-Object -ExpandProperty NetworkIdentifier
|
||||||
$identifiersTable['testNetworkIdentifier'] = $peerSiteNetworks | Where-Object { $_.VirtualizationNetworkName -like $testNetwork } | Select-Object -ExpandProperty NetworkIdentifier
|
$identifiersTable['testNetworkIdentifier'] = $peerSiteNetworks | Where-Object { $_.VirtualizationNetworkName -like $testNetwork } | Select-Object -ExpandProperty NetworkIdentifier
|
||||||
@@ -295,11 +295,11 @@ function New-ZertoVpg {
|
|||||||
|
|
||||||
"recoveryHostDatastoreCluster" {
|
"recoveryHostDatastoreCluster" {
|
||||||
$baseSettings.Recovery.DefaultDatastoreClusterIdentifier = $identifiersTable['datastoreClusterIdentifier']
|
$baseSettings.Recovery.DefaultDatastoreClusterIdentifier = $identifiersTable['datastoreClusterIdentifier']
|
||||||
$baseSettings.Recovery.DefaultHostIdentifier = $identifiersTable['hostIdentifier']
|
$baseSettings.Recovery.DefaultHostIdentifier = $identifiersTable['recoveryHostIdentifier']
|
||||||
}
|
}
|
||||||
|
|
||||||
"recoveryHostDatastore" {
|
"recoveryHostDatastore" {
|
||||||
$baseSettings.Recovery.DefaultHostIdentifier = $identifiersTable['hostIdentifier']
|
$baseSettings.Recovery.DefaultHostIdentifier = $identifiersTable['recoveryHostIdentifier']
|
||||||
$baseSettings.Recovery.DefaultDatastoreIdentifier = $identifiersTable['datastoreIdentifier']
|
$baseSettings.Recovery.DefaultDatastoreIdentifier = $identifiersTable['datastoreIdentifier']
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -30,7 +30,7 @@ function Remove-ZertoVpgVm {
|
|||||||
}
|
}
|
||||||
$VmIdentifiers = foreach ($machine in ($vm | Select-Object -Unique)) {
|
$VmIdentifiers = foreach ($machine in ($vm | Select-Object -Unique)) {
|
||||||
if ($machine -in $protectedVms.VmName) {
|
if ($machine -in $protectedVms.VmName) {
|
||||||
$protectedVms.Where( { $_.VmName -like $machine }) | Select-Object -ExpandProperty VmIdentifier
|
$protectedVms | Where-Object ( { $_.VmName -like $machine }) | Select-Object -ExpandProperty VmIdentifier
|
||||||
} else {
|
} else {
|
||||||
Write-Warning "Virtual Machine: '$machine' is not found in Vpg: '$VpgName'. Check your parameters. Skipping $machine"
|
Write-Warning "Virtual Machine: '$machine' is not found in Vpg: '$VpgName'. Check your parameters. Skipping $machine"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -165,6 +165,22 @@ Accept pipeline input: False
|
|||||||
Accept wildcard characters: False
|
Accept wildcard characters: False
|
||||||
```
|
```
|
||||||
|
|
||||||
|
### -numofCPU
|
||||||
|
Initial number of vCPUs to assign to the VRA.
|
||||||
|
Default is 1, Minimum is 1, Maximum is 4
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
Type: Int32
|
||||||
|
Parameter Sets: (All)
|
||||||
|
Aliases:
|
||||||
|
|
||||||
|
Required: False
|
||||||
|
Position: Named
|
||||||
|
Default value: None
|
||||||
|
Accept pipeline input: False
|
||||||
|
Accept wildcard characters: False
|
||||||
|
```
|
||||||
|
|
||||||
### -memoryInGB
|
### -memoryInGB
|
||||||
Initial amount of memory to assign to the VRA in GB.
|
Initial amount of memory to assign to the VRA in GB.
|
||||||
Default is 3, Minimum is 1, Maximum is 16
|
Default is 3, Minimum is 1, Maximum is 16
|
||||||
|
|||||||
+55
-18
@@ -12,22 +12,30 @@ Start a move of a VPG.
|
|||||||
|
|
||||||
## SYNTAX
|
## SYNTAX
|
||||||
|
|
||||||
### main (Default)
|
### id (Default)
|
||||||
```
|
```
|
||||||
Invoke-ZertoMove -vpgName <String[]> [-commitPolicy <String>] [-commitPolicyTimeout <Int32>] [-forceShutdown]
|
Invoke-ZertoMove -vpgIdentifier <Guid[]> [-forceShutdown] [-disableReverseProtection] [-keepSourceVms]
|
||||||
[-ContinueOnPreScriptFailure] [-WhatIf] [-Confirm] [<CommonParameters>]
|
[-ContinueOnPreScriptFailure] [-WhatIf] [-Confirm] [<CommonParameters>]
|
||||||
```
|
```
|
||||||
|
|
||||||
### disableReverseProtection
|
### commitName
|
||||||
```
|
```
|
||||||
Invoke-ZertoMove -vpgName <String[]> [-commitPolicy <String>] [-commitPolicyTimeout <Int32>] [-forceShutdown]
|
Invoke-ZertoMove -vpgName <String[]> -commitPolicy <String> [-commitPolicyTimeout <Int32>] [-forceShutdown]
|
||||||
[-disableReverseProtection] [-ContinueOnPreScriptFailure] [-WhatIf] [-Confirm] [<CommonParameters>]
|
[-disableReverseProtection] [-keepSourceVms] [-ContinueOnPreScriptFailure] [-WhatIf] [-Confirm]
|
||||||
|
[<CommonParameters>]
|
||||||
```
|
```
|
||||||
|
|
||||||
### keepSourceVms
|
### name
|
||||||
```
|
```
|
||||||
Invoke-ZertoMove -vpgName <String[]> [-commitPolicy <String>] [-commitPolicyTimeout <Int32>] [-forceShutdown]
|
Invoke-ZertoMove -vpgName <String[]> [-forceShutdown] [-disableReverseProtection] [-keepSourceVms]
|
||||||
[-keepSourceVms] [-ContinueOnPreScriptFailure] [-WhatIf] [-Confirm] [<CommonParameters>]
|
[-ContinueOnPreScriptFailure] [-WhatIf] [-Confirm] [<CommonParameters>]
|
||||||
|
```
|
||||||
|
|
||||||
|
### commitId
|
||||||
|
```
|
||||||
|
Invoke-ZertoMove -vpgIdentifier <Guid[]> -commitPolicy <String> [-commitPolicyTimeout <Int32>] [-forceShutdown]
|
||||||
|
[-disableReverseProtection] [-keepSourceVms] [-ContinueOnPreScriptFailure] [-WhatIf] [-Confirm]
|
||||||
|
[<CommonParameters>]
|
||||||
```
|
```
|
||||||
|
|
||||||
## DESCRIPTION
|
## DESCRIPTION
|
||||||
@@ -37,10 +45,24 @@ Start a move of a VPG.
|
|||||||
|
|
||||||
### Example 1
|
### Example 1
|
||||||
```powershell
|
```powershell
|
||||||
PS C:\> Invoke-ZertoMove -vpgName "MyVpg"
|
PS C:\> Invoke-ZertoMove -vpgName 'MyVpg'
|
||||||
```
|
```
|
||||||
|
|
||||||
Starts a move operation of VPG "MyVpg"
|
Specify the name of a vpg to move
|
||||||
|
|
||||||
|
### Example 2
|
||||||
|
```powershell
|
||||||
|
PS C:\> Invoke-ZertoMove -vpgIdentifier '2fbbf6b5-cddc-4653-b1fe-564f069eeb64'
|
||||||
|
```
|
||||||
|
|
||||||
|
Specify the identifier of a vpg to move
|
||||||
|
|
||||||
|
### Example 3
|
||||||
|
```powershell
|
||||||
|
PS C:\> Get-ZertoVpg | Invoke-ZertoMove
|
||||||
|
```
|
||||||
|
|
||||||
|
Utilize the pipeline to move multiple vpgs
|
||||||
|
|
||||||
## PARAMETERS
|
## PARAMETERS
|
||||||
|
|
||||||
@@ -55,11 +77,11 @@ Default is the Site Settings setting.
|
|||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
Type: String
|
Type: String
|
||||||
Parameter Sets: (All)
|
Parameter Sets: commitName, commitId
|
||||||
Aliases:
|
Aliases:
|
||||||
Accepted values: Rollback, Commit, None
|
Accepted values: Rollback, Commit, None
|
||||||
|
|
||||||
Required: False
|
Required: True
|
||||||
Position: Named
|
Position: Named
|
||||||
Default value: None
|
Default value: None
|
||||||
Accept pipeline input: False
|
Accept pipeline input: False
|
||||||
@@ -72,7 +94,7 @@ If omitted, the site settings default will be applied.
|
|||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
Type: Int32
|
Type: Int32
|
||||||
Parameter Sets: (All)
|
Parameter Sets: commitName, commitId
|
||||||
Aliases:
|
Aliases:
|
||||||
|
|
||||||
Required: False
|
Required: False
|
||||||
@@ -102,10 +124,10 @@ Do not enable reverse protection. The VPG definition is kept with the status Nee
|
|||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
Type: SwitchParameter
|
Type: SwitchParameter
|
||||||
Parameter Sets: disableReverseProtection
|
Parameter Sets: (All)
|
||||||
Aliases:
|
Aliases:
|
||||||
|
|
||||||
Required: True
|
Required: False
|
||||||
Position: Named
|
Position: Named
|
||||||
Default value: None
|
Default value: None
|
||||||
Accept pipeline input: False
|
Accept pipeline input: False
|
||||||
@@ -132,13 +154,28 @@ Use this switch to Prevent the protected virtual machines from being deleted in
|
|||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
Type: SwitchParameter
|
Type: SwitchParameter
|
||||||
Parameter Sets: keepSourceVms
|
Parameter Sets: (All)
|
||||||
|
Aliases:
|
||||||
|
|
||||||
|
Required: False
|
||||||
|
Position: Named
|
||||||
|
Default value: None
|
||||||
|
Accept pipeline input: False
|
||||||
|
Accept wildcard characters: False
|
||||||
|
```
|
||||||
|
|
||||||
|
### -vpgIdentifier
|
||||||
|
ID(s) of the VPG(s) you want to move.
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
Type: Guid[]
|
||||||
|
Parameter Sets: id, commitId
|
||||||
Aliases:
|
Aliases:
|
||||||
|
|
||||||
Required: True
|
Required: True
|
||||||
Position: Named
|
Position: Named
|
||||||
Default value: None
|
Default value: None
|
||||||
Accept pipeline input: False
|
Accept pipeline input: True (ByPropertyName)
|
||||||
Accept wildcard characters: False
|
Accept wildcard characters: False
|
||||||
```
|
```
|
||||||
|
|
||||||
@@ -147,7 +184,7 @@ Name(s) of the VPG(s) you want to move.
|
|||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
Type: String[]
|
Type: String[]
|
||||||
Parameter Sets: (All)
|
Parameter Sets: commitName, name
|
||||||
Aliases:
|
Aliases:
|
||||||
|
|
||||||
Required: True
|
Required: True
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ schema: 2.0.0
|
|||||||
# New-ZertoVpg
|
# New-ZertoVpg
|
||||||
|
|
||||||
## SYNOPSIS
|
## SYNOPSIS
|
||||||
Creates a New VPG with default settings only. Customization of VM settings can be accomplished with other module level functions.
|
Creates a New VPG with default settings only. Customization of VM settings can be accomplished with other module level functions. Returns a VpgSettingsIdentifier to be passed into the `Save-ZertoVpgSetting` function to create the VPG.
|
||||||
|
|
||||||
## SYNTAX
|
## SYNTAX
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -1 +1 @@
|
|||||||
1.5.0
|
1.5.4
|
||||||
|
|||||||
Reference in New Issue
Block a user