Merge pull request #9 from wcarroll/CreateVpg
Update New-ZertoVpg work flow to include default journal settings
This commit is contained in:
@@ -126,10 +126,26 @@ function New-ZertoVpg {
|
||||
HelpMessage = "Name of the network to use during a Failover Test operation",
|
||||
Mandatory = $true
|
||||
)]
|
||||
[string]$testNetwork
|
||||
[string]$testNetwork,
|
||||
[Parameter(
|
||||
HelpMessage = "Name of the datastore to utilize to store Journal data. If not specified, the default datastore will be used.",
|
||||
Mandatory = $false
|
||||
)]
|
||||
[string]$journalDatastore,
|
||||
[Parameter(
|
||||
HelpMessage = "Default journal hard limit in megabytes. Default set to 153600 MB (150 GB). Set to 0 to set the journal to unlimited",
|
||||
Mandatory = $false
|
||||
)]
|
||||
[int]$journalHardLimitInMb = 153600,
|
||||
[Parameter(
|
||||
HelpMessage = "Default journal warning threshold in megabytes. If unset or greater than the hard limit, will be set to 75% of the journal hard limit.",
|
||||
Mandatory = $false
|
||||
)]
|
||||
[int]$journalWarningThresholdInMb = 0
|
||||
)
|
||||
|
||||
begin {
|
||||
# Create an identifiers table, and start converting names to identifiers.
|
||||
$identifiersTable = @{}
|
||||
$identifiersTable['recoverySiteIdentifier'] = $(Get-ZertoPeerSite -peerName $recoverySite).siteIdentifier
|
||||
$peerSiteNetworks = $(Get-ZertoVirtualizationSite -siteIdentifier $identifiersTable['recoverySiteIdentifier'] -networks)
|
||||
@@ -142,6 +158,10 @@ function New-ZertoVpg {
|
||||
if ($PSBoundParameters.ContainsKey("serviceProfile")) {
|
||||
$identifiersTable['serviceProfileIdentifier'] = $(Get-ZertoServiceProfile -siteIdentifier $identifiersTable['recoverySiteIdentifier'] | Where-Object {$_.ServiceProfileName -like $serviceProfile}).serviceProfileIdentifier
|
||||
}
|
||||
if ($PSBoundParameters.ContainsKey('journalDatastore')) {
|
||||
$identifiersTable['journalDatastore'] = $(Get-ZertoVirtualizationSite -siteIdentifier $identifiersTable['recoverySiteIdentifier'] -datastores | Where-Object {$_.DatastoreName -like $journalDatastore}).DatastoreIdentifier
|
||||
}
|
||||
# Get identifiers based on parameter set name
|
||||
switch ($PSCmdlet.ParameterSetName) {
|
||||
"recoveryClusterDatastoreCluster" {
|
||||
$identifiersTable['clusterIdentifier'] = $(Get-ZertoVirtualizationSite -siteIdentifier $identifiersTable['recoverySiteIdentifier'] -hostclusters | Where-Object {$_.VirtualizationClusterName -like $recoveryCluster}).ClusterIdentifier
|
||||
@@ -175,11 +195,16 @@ function New-ZertoVpg {
|
||||
}
|
||||
$unprotectedVms = Get-ZertoUnprotectedVm
|
||||
$protectedVms = Get-ZertoProtectedVm
|
||||
# Create array of VM identifiers
|
||||
$vmIdentifiers = @()
|
||||
$vmIdentifiers = foreach ($vm in $protectedVm) {
|
||||
# If the VM is unprotected, get the identifier
|
||||
$vmIdentifier = $unprotectedVms | Where-Object {$_.vmName -like $vm} | Select-Object -ExpandProperty vmIdentifier
|
||||
# If the VM is not unprotected, check the protected VMs
|
||||
if ( -not $vmIdentifier) {
|
||||
# Get all identifiers to test if the VM is eligible to be a member of an additional VPG
|
||||
$results = $protectedVms | Where-Object {$_.VmName -like $vm} | Select-Object -ExpandProperty vmIdentifier
|
||||
# If VM is currently a member of 3 VPGs, skip it. If it cannot be found, skip it. Otherwise, set the identifier
|
||||
if ($results.count -eq 3) {
|
||||
Write-Warning "$vm is already a part of 3 VPGs and cannot be part of an additional VPG. Skipping $vm"
|
||||
continue
|
||||
@@ -190,16 +215,23 @@ function New-ZertoVpg {
|
||||
$vmIdentifier = $results | Select-Object -First 1
|
||||
}
|
||||
}
|
||||
# Create a custom object to store the information to easily convert to JSON. Return to vmIdentifiers array.
|
||||
$returnObject = New-Object PSObject
|
||||
$returnObject | Add-Member -MemberType NoteProperty -Name "VmIdentifier" -Value $vmIdentifier
|
||||
$returnObject
|
||||
}
|
||||
if (($journalWarningThresholdInMb -eq 0) -or ($journalWarningThresholdInMb -gt $journalHardLimitInMb)) {
|
||||
$journalWarningThresholdInMb = $journalHardLimitInMb * .75
|
||||
}
|
||||
}
|
||||
|
||||
process {
|
||||
$baseUri = "vpgsettings"
|
||||
# Create a VPG Settings Identifier
|
||||
$vpgSettingsIdentifier = Invoke-ZertoRestRequest -uri $baseUri -body "{}" -method "POST"
|
||||
# Put base settings into an object easy to manipulate
|
||||
$baseSettings = Get-ZertoVpgSetting -vpgSettingsIdentifier $vpgSettingsIdentifier
|
||||
# Set settings equal to passed and default parameters
|
||||
$baseSettings.basic.name = $vpgName
|
||||
$baseSettings.basic.journalHistoryInHours = $journalHistoryInHours
|
||||
$baseSettings.basic.Priority = $vpgPriority
|
||||
@@ -247,17 +279,24 @@ function New-ZertoVpg {
|
||||
$baseSettings.Recovery.DefaultDatastoreIdentifier = $identifiersTable['datastoreIdentifier']
|
||||
}
|
||||
}
|
||||
# If only 1 VM is selected, force VMs settings to be an array.
|
||||
If ($vmIdentifiers.count -eq 1) {
|
||||
$basesettings.Vms = @()
|
||||
$baseSettings.Vms += $vmIdentifiers
|
||||
} else {
|
||||
$baseSettings.Vms = $vmIdentifiers
|
||||
}
|
||||
if ($identifiersTable.ContainsKey('journalDatastore')) {
|
||||
$baseSettings.Journal.DatastoreIdentifier = $identifiersTable['journalDatastore']
|
||||
}
|
||||
$baseSettings.Journal.Limitation.HardLimitInMB = $journalHardLimitInMb
|
||||
$baseSettings.Journal.Limitation.WarningThresholdInMB = $journalWarningThresholdInMb
|
||||
$settingsURI = "{0}/{1}" -f $baseUri, $vpgSettingsIdentifier
|
||||
Invoke-ZertoRestRequest -uri $settingsURI -body $($baseSettings | ConvertTo-Json -Depth 10) -method "PUT" | Out-Null
|
||||
}
|
||||
|
||||
end {
|
||||
# Return vpgSettings Identifier as a string to pass into Save function.
|
||||
return $vpgSettingsIdentifier.toString()
|
||||
}
|
||||
}
|
||||
@@ -7894,6 +7894,30 @@
|
||||
</dev:type>
|
||||
<dev:defaultValue>None</dev:defaultValue>
|
||||
</command:parameter>
|
||||
<command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="named" aliases="none">
|
||||
<maml:name>journalDatastore</maml:name>
|
||||
<maml:Description>
|
||||
<maml:para>Name of the datastore to utilize to store Journal data. If not specified, the default datastore will be used.</maml:para>
|
||||
</maml:Description>
|
||||
<command:parameterValue required="true" variableLength="false">String</command:parameterValue>
|
||||
<dev:type>
|
||||
<maml:name>String</maml:name>
|
||||
<maml:uri />
|
||||
</dev:type>
|
||||
<dev:defaultValue>None</dev:defaultValue>
|
||||
</command:parameter>
|
||||
<command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="named" aliases="none">
|
||||
<maml:name>journalHardLimitInMb</maml:name>
|
||||
<maml:Description>
|
||||
<maml:para>Default journal hard limit in megabytes. Default set to 153600 MB (150 GB). Set to 0 to set the journal to unlimited</maml:para>
|
||||
</maml:Description>
|
||||
<command:parameterValue required="true" variableLength="false">Int32</command:parameterValue>
|
||||
<dev:type>
|
||||
<maml:name>Int32</maml:name>
|
||||
<maml:uri />
|
||||
</dev:type>
|
||||
<dev:defaultValue>153600</dev:defaultValue>
|
||||
</command:parameter>
|
||||
<command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="named" aliases="none">
|
||||
<maml:name>journalHistoryInHours</maml:name>
|
||||
<maml:Description>
|
||||
@@ -7906,6 +7930,18 @@
|
||||
</dev:type>
|
||||
<dev:defaultValue>24</dev:defaultValue>
|
||||
</command:parameter>
|
||||
<command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="named" aliases="none">
|
||||
<maml:name>journalWarningThresholdInMb</maml:name>
|
||||
<maml:Description>
|
||||
<maml:para>Default journal warning threshold in megabytes. If unset or greater than the hard limit, will be set to 75% of the journal hard limit. If the journalHardLimitInMB is set to 0 (unlimited), this will be set to unlimited as well.</maml:para>
|
||||
</maml:Description>
|
||||
<command:parameterValue required="true" variableLength="false">Int32</command:parameterValue>
|
||||
<dev:type>
|
||||
<maml:name>Int32</maml:name>
|
||||
<maml:uri />
|
||||
</dev:type>
|
||||
<dev:defaultValue>None</dev:defaultValue>
|
||||
</command:parameter>
|
||||
<command:parameter required="true" variableLength="true" globbing="false" pipelineInput="False" position="named" aliases="none">
|
||||
<maml:name>protectedVm</maml:name>
|
||||
<maml:Description>
|
||||
@@ -8090,6 +8126,30 @@
|
||||
</dev:type>
|
||||
<dev:defaultValue>None</dev:defaultValue>
|
||||
</command:parameter>
|
||||
<command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="named" aliases="none">
|
||||
<maml:name>journalDatastore</maml:name>
|
||||
<maml:Description>
|
||||
<maml:para>Name of the datastore to utilize to store Journal data. If not specified, the default datastore will be used.</maml:para>
|
||||
</maml:Description>
|
||||
<command:parameterValue required="true" variableLength="false">String</command:parameterValue>
|
||||
<dev:type>
|
||||
<maml:name>String</maml:name>
|
||||
<maml:uri />
|
||||
</dev:type>
|
||||
<dev:defaultValue>None</dev:defaultValue>
|
||||
</command:parameter>
|
||||
<command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="named" aliases="none">
|
||||
<maml:name>journalHardLimitInMb</maml:name>
|
||||
<maml:Description>
|
||||
<maml:para>Default journal hard limit in megabytes. Default set to 153600 MB (150 GB). Set to 0 to set the journal to unlimited</maml:para>
|
||||
</maml:Description>
|
||||
<command:parameterValue required="true" variableLength="false">Int32</command:parameterValue>
|
||||
<dev:type>
|
||||
<maml:name>Int32</maml:name>
|
||||
<maml:uri />
|
||||
</dev:type>
|
||||
<dev:defaultValue>153600</dev:defaultValue>
|
||||
</command:parameter>
|
||||
<command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="named" aliases="none">
|
||||
<maml:name>journalHistoryInHours</maml:name>
|
||||
<maml:Description>
|
||||
@@ -8102,6 +8162,18 @@
|
||||
</dev:type>
|
||||
<dev:defaultValue>24</dev:defaultValue>
|
||||
</command:parameter>
|
||||
<command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="named" aliases="none">
|
||||
<maml:name>journalWarningThresholdInMb</maml:name>
|
||||
<maml:Description>
|
||||
<maml:para>Default journal warning threshold in megabytes. If unset or greater than the hard limit, will be set to 75% of the journal hard limit. If the journalHardLimitInMB is set to 0 (unlimited), this will be set to unlimited as well.</maml:para>
|
||||
</maml:Description>
|
||||
<command:parameterValue required="true" variableLength="false">Int32</command:parameterValue>
|
||||
<dev:type>
|
||||
<maml:name>Int32</maml:name>
|
||||
<maml:uri />
|
||||
</dev:type>
|
||||
<dev:defaultValue>None</dev:defaultValue>
|
||||
</command:parameter>
|
||||
<command:parameter required="true" variableLength="true" globbing="false" pipelineInput="False" position="named" aliases="none">
|
||||
<maml:name>protectedVm</maml:name>
|
||||
<maml:Description>
|
||||
@@ -8286,6 +8358,30 @@
|
||||
</dev:type>
|
||||
<dev:defaultValue>None</dev:defaultValue>
|
||||
</command:parameter>
|
||||
<command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="named" aliases="none">
|
||||
<maml:name>journalDatastore</maml:name>
|
||||
<maml:Description>
|
||||
<maml:para>Name of the datastore to utilize to store Journal data. If not specified, the default datastore will be used.</maml:para>
|
||||
</maml:Description>
|
||||
<command:parameterValue required="true" variableLength="false">String</command:parameterValue>
|
||||
<dev:type>
|
||||
<maml:name>String</maml:name>
|
||||
<maml:uri />
|
||||
</dev:type>
|
||||
<dev:defaultValue>None</dev:defaultValue>
|
||||
</command:parameter>
|
||||
<command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="named" aliases="none">
|
||||
<maml:name>journalHardLimitInMb</maml:name>
|
||||
<maml:Description>
|
||||
<maml:para>Default journal hard limit in megabytes. Default set to 153600 MB (150 GB). Set to 0 to set the journal to unlimited</maml:para>
|
||||
</maml:Description>
|
||||
<command:parameterValue required="true" variableLength="false">Int32</command:parameterValue>
|
||||
<dev:type>
|
||||
<maml:name>Int32</maml:name>
|
||||
<maml:uri />
|
||||
</dev:type>
|
||||
<dev:defaultValue>153600</dev:defaultValue>
|
||||
</command:parameter>
|
||||
<command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="named" aliases="none">
|
||||
<maml:name>journalHistoryInHours</maml:name>
|
||||
<maml:Description>
|
||||
@@ -8298,6 +8394,18 @@
|
||||
</dev:type>
|
||||
<dev:defaultValue>24</dev:defaultValue>
|
||||
</command:parameter>
|
||||
<command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="named" aliases="none">
|
||||
<maml:name>journalWarningThresholdInMb</maml:name>
|
||||
<maml:Description>
|
||||
<maml:para>Default journal warning threshold in megabytes. If unset or greater than the hard limit, will be set to 75% of the journal hard limit. If the journalHardLimitInMB is set to 0 (unlimited), this will be set to unlimited as well.</maml:para>
|
||||
</maml:Description>
|
||||
<command:parameterValue required="true" variableLength="false">Int32</command:parameterValue>
|
||||
<dev:type>
|
||||
<maml:name>Int32</maml:name>
|
||||
<maml:uri />
|
||||
</dev:type>
|
||||
<dev:defaultValue>None</dev:defaultValue>
|
||||
</command:parameter>
|
||||
<command:parameter required="true" variableLength="true" globbing="false" pipelineInput="False" position="named" aliases="none">
|
||||
<maml:name>protectedVm</maml:name>
|
||||
<maml:Description>
|
||||
@@ -8482,6 +8590,30 @@
|
||||
</dev:type>
|
||||
<dev:defaultValue>None</dev:defaultValue>
|
||||
</command:parameter>
|
||||
<command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="named" aliases="none">
|
||||
<maml:name>journalDatastore</maml:name>
|
||||
<maml:Description>
|
||||
<maml:para>Name of the datastore to utilize to store Journal data. If not specified, the default datastore will be used.</maml:para>
|
||||
</maml:Description>
|
||||
<command:parameterValue required="true" variableLength="false">String</command:parameterValue>
|
||||
<dev:type>
|
||||
<maml:name>String</maml:name>
|
||||
<maml:uri />
|
||||
</dev:type>
|
||||
<dev:defaultValue>None</dev:defaultValue>
|
||||
</command:parameter>
|
||||
<command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="named" aliases="none">
|
||||
<maml:name>journalHardLimitInMb</maml:name>
|
||||
<maml:Description>
|
||||
<maml:para>Default journal hard limit in megabytes. Default set to 153600 MB (150 GB). Set to 0 to set the journal to unlimited</maml:para>
|
||||
</maml:Description>
|
||||
<command:parameterValue required="true" variableLength="false">Int32</command:parameterValue>
|
||||
<dev:type>
|
||||
<maml:name>Int32</maml:name>
|
||||
<maml:uri />
|
||||
</dev:type>
|
||||
<dev:defaultValue>153600</dev:defaultValue>
|
||||
</command:parameter>
|
||||
<command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="named" aliases="none">
|
||||
<maml:name>journalHistoryInHours</maml:name>
|
||||
<maml:Description>
|
||||
@@ -8494,6 +8626,18 @@
|
||||
</dev:type>
|
||||
<dev:defaultValue>24</dev:defaultValue>
|
||||
</command:parameter>
|
||||
<command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="named" aliases="none">
|
||||
<maml:name>journalWarningThresholdInMb</maml:name>
|
||||
<maml:Description>
|
||||
<maml:para>Default journal warning threshold in megabytes. If unset or greater than the hard limit, will be set to 75% of the journal hard limit. If the journalHardLimitInMB is set to 0 (unlimited), this will be set to unlimited as well.</maml:para>
|
||||
</maml:Description>
|
||||
<command:parameterValue required="true" variableLength="false">Int32</command:parameterValue>
|
||||
<dev:type>
|
||||
<maml:name>Int32</maml:name>
|
||||
<maml:uri />
|
||||
</dev:type>
|
||||
<dev:defaultValue>None</dev:defaultValue>
|
||||
</command:parameter>
|
||||
<command:parameter required="true" variableLength="true" globbing="false" pipelineInput="False" position="named" aliases="none">
|
||||
<maml:name>protectedVm</maml:name>
|
||||
<maml:Description>
|
||||
@@ -8678,6 +8822,30 @@
|
||||
</dev:type>
|
||||
<dev:defaultValue>None</dev:defaultValue>
|
||||
</command:parameter>
|
||||
<command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="named" aliases="none">
|
||||
<maml:name>journalDatastore</maml:name>
|
||||
<maml:Description>
|
||||
<maml:para>Name of the datastore to utilize to store Journal data. If not specified, the default datastore will be used.</maml:para>
|
||||
</maml:Description>
|
||||
<command:parameterValue required="true" variableLength="false">String</command:parameterValue>
|
||||
<dev:type>
|
||||
<maml:name>String</maml:name>
|
||||
<maml:uri />
|
||||
</dev:type>
|
||||
<dev:defaultValue>None</dev:defaultValue>
|
||||
</command:parameter>
|
||||
<command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="named" aliases="none">
|
||||
<maml:name>journalHardLimitInMb</maml:name>
|
||||
<maml:Description>
|
||||
<maml:para>Default journal hard limit in megabytes. Default set to 153600 MB (150 GB). Set to 0 to set the journal to unlimited</maml:para>
|
||||
</maml:Description>
|
||||
<command:parameterValue required="true" variableLength="false">Int32</command:parameterValue>
|
||||
<dev:type>
|
||||
<maml:name>Int32</maml:name>
|
||||
<maml:uri />
|
||||
</dev:type>
|
||||
<dev:defaultValue>153600</dev:defaultValue>
|
||||
</command:parameter>
|
||||
<command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="named" aliases="none">
|
||||
<maml:name>journalHistoryInHours</maml:name>
|
||||
<maml:Description>
|
||||
@@ -8690,6 +8858,18 @@
|
||||
</dev:type>
|
||||
<dev:defaultValue>24</dev:defaultValue>
|
||||
</command:parameter>
|
||||
<command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="named" aliases="none">
|
||||
<maml:name>journalWarningThresholdInMb</maml:name>
|
||||
<maml:Description>
|
||||
<maml:para>Default journal warning threshold in megabytes. If unset or greater than the hard limit, will be set to 75% of the journal hard limit. If the journalHardLimitInMB is set to 0 (unlimited), this will be set to unlimited as well.</maml:para>
|
||||
</maml:Description>
|
||||
<command:parameterValue required="true" variableLength="false">Int32</command:parameterValue>
|
||||
<dev:type>
|
||||
<maml:name>Int32</maml:name>
|
||||
<maml:uri />
|
||||
</dev:type>
|
||||
<dev:defaultValue>None</dev:defaultValue>
|
||||
</command:parameter>
|
||||
<command:parameter required="true" variableLength="true" globbing="false" pipelineInput="False" position="named" aliases="none">
|
||||
<maml:name>protectedVm</maml:name>
|
||||
<maml:Description>
|
||||
@@ -8874,6 +9054,30 @@
|
||||
</dev:type>
|
||||
<dev:defaultValue>None</dev:defaultValue>
|
||||
</command:parameter>
|
||||
<command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="named" aliases="none">
|
||||
<maml:name>journalDatastore</maml:name>
|
||||
<maml:Description>
|
||||
<maml:para>Name of the datastore to utilize to store Journal data. If not specified, the default datastore will be used.</maml:para>
|
||||
</maml:Description>
|
||||
<command:parameterValue required="true" variableLength="false">String</command:parameterValue>
|
||||
<dev:type>
|
||||
<maml:name>String</maml:name>
|
||||
<maml:uri />
|
||||
</dev:type>
|
||||
<dev:defaultValue>None</dev:defaultValue>
|
||||
</command:parameter>
|
||||
<command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="named" aliases="none">
|
||||
<maml:name>journalHardLimitInMb</maml:name>
|
||||
<maml:Description>
|
||||
<maml:para>Default journal hard limit in megabytes. Default set to 153600 MB (150 GB). Set to 0 to set the journal to unlimited</maml:para>
|
||||
</maml:Description>
|
||||
<command:parameterValue required="true" variableLength="false">Int32</command:parameterValue>
|
||||
<dev:type>
|
||||
<maml:name>Int32</maml:name>
|
||||
<maml:uri />
|
||||
</dev:type>
|
||||
<dev:defaultValue>153600</dev:defaultValue>
|
||||
</command:parameter>
|
||||
<command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="named" aliases="none">
|
||||
<maml:name>journalHistoryInHours</maml:name>
|
||||
<maml:Description>
|
||||
@@ -8886,6 +9090,18 @@
|
||||
</dev:type>
|
||||
<dev:defaultValue>24</dev:defaultValue>
|
||||
</command:parameter>
|
||||
<command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="named" aliases="none">
|
||||
<maml:name>journalWarningThresholdInMb</maml:name>
|
||||
<maml:Description>
|
||||
<maml:para>Default journal warning threshold in megabytes. If unset or greater than the hard limit, will be set to 75% of the journal hard limit. If the journalHardLimitInMB is set to 0 (unlimited), this will be set to unlimited as well.</maml:para>
|
||||
</maml:Description>
|
||||
<command:parameterValue required="true" variableLength="false">Int32</command:parameterValue>
|
||||
<dev:type>
|
||||
<maml:name>Int32</maml:name>
|
||||
<maml:uri />
|
||||
</dev:type>
|
||||
<dev:defaultValue>None</dev:defaultValue>
|
||||
</command:parameter>
|
||||
<command:parameter required="true" variableLength="true" globbing="false" pipelineInput="False" position="named" aliases="none">
|
||||
<maml:name>protectedVm</maml:name>
|
||||
<maml:Description>
|
||||
@@ -9082,6 +9298,30 @@
|
||||
</dev:type>
|
||||
<dev:defaultValue>None</dev:defaultValue>
|
||||
</command:parameter>
|
||||
<command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="named" aliases="none">
|
||||
<maml:name>journalDatastore</maml:name>
|
||||
<maml:Description>
|
||||
<maml:para>Name of the datastore to utilize to store Journal data. If not specified, the default datastore will be used.</maml:para>
|
||||
</maml:Description>
|
||||
<command:parameterValue required="true" variableLength="false">String</command:parameterValue>
|
||||
<dev:type>
|
||||
<maml:name>String</maml:name>
|
||||
<maml:uri />
|
||||
</dev:type>
|
||||
<dev:defaultValue>None</dev:defaultValue>
|
||||
</command:parameter>
|
||||
<command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="named" aliases="none">
|
||||
<maml:name>journalHardLimitInMb</maml:name>
|
||||
<maml:Description>
|
||||
<maml:para>Default journal hard limit in megabytes. Default set to 153600 MB (150 GB). Set to 0 to set the journal to unlimited</maml:para>
|
||||
</maml:Description>
|
||||
<command:parameterValue required="true" variableLength="false">Int32</command:parameterValue>
|
||||
<dev:type>
|
||||
<maml:name>Int32</maml:name>
|
||||
<maml:uri />
|
||||
</dev:type>
|
||||
<dev:defaultValue>153600</dev:defaultValue>
|
||||
</command:parameter>
|
||||
<command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="named" aliases="none">
|
||||
<maml:name>journalHistoryInHours</maml:name>
|
||||
<maml:Description>
|
||||
@@ -9094,6 +9334,18 @@
|
||||
</dev:type>
|
||||
<dev:defaultValue>24</dev:defaultValue>
|
||||
</command:parameter>
|
||||
<command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="named" aliases="none">
|
||||
<maml:name>journalWarningThresholdInMb</maml:name>
|
||||
<maml:Description>
|
||||
<maml:para>Default journal warning threshold in megabytes. If unset or greater than the hard limit, will be set to 75% of the journal hard limit. If the journalHardLimitInMB is set to 0 (unlimited), this will be set to unlimited as well.</maml:para>
|
||||
</maml:Description>
|
||||
<command:parameterValue required="true" variableLength="false">Int32</command:parameterValue>
|
||||
<dev:type>
|
||||
<maml:name>Int32</maml:name>
|
||||
<maml:uri />
|
||||
</dev:type>
|
||||
<dev:defaultValue>None</dev:defaultValue>
|
||||
</command:parameter>
|
||||
<command:parameter required="true" variableLength="true" globbing="false" pipelineInput="False" position="named" aliases="none">
|
||||
<maml:name>protectedVm</maml:name>
|
||||
<maml:Description>
|
||||
@@ -9372,7 +9624,7 @@
|
||||
</dev:remarks>
|
||||
</command:example>
|
||||
<command:example>
|
||||
<maml:title>-------------------------- Example 5 --------------------------</maml:title>
|
||||
<maml:title>-------------------------- Example 6 --------------------------</maml:title>
|
||||
<dev:code>PS C:> New-ZertoVpg -vpgName "MyVpg" -protectedVm "WebServer01", "AppServer01", "DatabaseServer01" -recoverySite "Recovery Site" -recoveryFolder "Recovered VMs" -recoveryResourcePool "Recovery Resource Pool Name" -recoveryDatastoreCluster "Datastore Cluster Name" -testNetwork "Test Bubble Network" -recoveryNetwork "VM Network"</dev:code>
|
||||
<dev:remarks>
|
||||
<maml:para>Creates a VPG Settings Object for a VPG called "MyVpg" and protecting Virtual Machines "WebServer01", "AppServer01", and "DatabaseServer01" targeting site "Recovery Site." The Virtual machines will be placed on the resource pool "Recovery Resource Pool Name" on the datastore cluster named "Datastore Cluster Name." When the virtual machines are created at the recovery site, they will be created in the folder "Recovered VMs." Finally, the network to be used during a live event will be "VM Network" and during a test operation will be "VM Network." Other values set will be the defaults, such as:</maml:para>
|
||||
|
||||
+54
-1
@@ -18,6 +18,7 @@ New-ZertoVpg -vpgName <String> [-vpgPriority <String>] [-journalHistoryInHours <
|
||||
-recoverySite <String> -recoveryCluster <String> -datastoreCluster <String> -recoveryFolder <String>
|
||||
[-rpoInSeconds <Int32>] [-testIntervalInMinutes <Int32>] [-serviceProfile <String>]
|
||||
[-useWanCompression <Boolean>] [-zorg <String>] -recoveryNetwork <String> -testNetwork <String>
|
||||
[-journalDatastore <String>] [-journalHardLimitInMb <Int32>] [-journalWarningThresholdInMb <Int32>]
|
||||
[<CommonParameters>]
|
||||
```
|
||||
|
||||
@@ -27,6 +28,7 @@ New-ZertoVpg -vpgName <String> [-vpgPriority <String>] [-journalHistoryInHours <
|
||||
-recoverySite <String> -recoveryCluster <String> -datastore <String> -recoveryFolder <String>
|
||||
[-rpoInSeconds <Int32>] [-testIntervalInMinutes <Int32>] [-serviceProfile <String>]
|
||||
[-useWanCompression <Boolean>] [-zorg <String>] -recoveryNetwork <String> -testNetwork <String>
|
||||
[-journalDatastore <String>] [-journalHardLimitInMb <Int32>] [-journalWarningThresholdInMb <Int32>]
|
||||
[<CommonParameters>]
|
||||
```
|
||||
|
||||
@@ -36,6 +38,7 @@ New-ZertoVpg -vpgName <String> [-vpgPriority <String>] [-journalHistoryInHours <
|
||||
-recoverySite <String> -recoveryHost <String> -datastoreCluster <String> -recoveryFolder <String>
|
||||
[-rpoInSeconds <Int32>] [-testIntervalInMinutes <Int32>] [-serviceProfile <String>]
|
||||
[-useWanCompression <Boolean>] [-zorg <String>] -recoveryNetwork <String> -testNetwork <String>
|
||||
[-journalDatastore <String>] [-journalHardLimitInMb <Int32>] [-journalWarningThresholdInMb <Int32>]
|
||||
[<CommonParameters>]
|
||||
```
|
||||
|
||||
@@ -45,6 +48,7 @@ New-ZertoVpg -vpgName <String> [-vpgPriority <String>] [-journalHistoryInHours <
|
||||
-recoverySite <String> -recoveryHost <String> -datastore <String> -recoveryFolder <String>
|
||||
[-rpoInSeconds <Int32>] [-testIntervalInMinutes <Int32>] [-serviceProfile <String>]
|
||||
[-useWanCompression <Boolean>] [-zorg <String>] -recoveryNetwork <String> -testNetwork <String>
|
||||
[-journalDatastore <String>] [-journalHardLimitInMb <Int32>] [-journalWarningThresholdInMb <Int32>]
|
||||
[<CommonParameters>]
|
||||
```
|
||||
|
||||
@@ -54,6 +58,7 @@ New-ZertoVpg -vpgName <String> [-vpgPriority <String>] [-journalHistoryInHours <
|
||||
-recoverySite <String> -recoveryResourcePool <String> -datastoreCluster <String> -recoveryFolder <String>
|
||||
[-rpoInSeconds <Int32>] [-testIntervalInMinutes <Int32>] [-serviceProfile <String>]
|
||||
[-useWanCompression <Boolean>] [-zorg <String>] -recoveryNetwork <String> -testNetwork <String>
|
||||
[-journalDatastore <String>] [-journalHardLimitInMb <Int32>] [-journalWarningThresholdInMb <Int32>]
|
||||
[<CommonParameters>]
|
||||
```
|
||||
|
||||
@@ -63,6 +68,7 @@ New-ZertoVpg -vpgName <String> [-vpgPriority <String>] [-journalHistoryInHours <
|
||||
-recoverySite <String> -recoveryResourcePool <String> -datastore <String> -recoveryFolder <String>
|
||||
[-rpoInSeconds <Int32>] [-testIntervalInMinutes <Int32>] [-serviceProfile <String>]
|
||||
[-useWanCompression <Boolean>] [-zorg <String>] -recoveryNetwork <String> -testNetwork <String>
|
||||
[-journalDatastore <String>] [-journalHardLimitInMb <Int32>] [-journalWarningThresholdInMb <Int32>]
|
||||
[<CommonParameters>]
|
||||
```
|
||||
|
||||
@@ -148,7 +154,7 @@ Creates a VPG Settings Object for a VPG called "MyVpg" and protecting Virtual Ma
|
||||
- ServiceProfile: Null
|
||||
- Zorg: Null
|
||||
|
||||
### Example 5
|
||||
### Example 6
|
||||
```powershell
|
||||
PS C:> New-ZertoVpg -vpgName "MyVpg" -protectedVm "WebServer01", "AppServer01", "DatabaseServer01" -recoverySite "Recovery Site" -recoveryFolder "Recovered VMs" -recoveryResourcePool "Recovery Resource Pool Name" -recoveryDatastoreCluster "Datastore Cluster Name" -testNetwork "Test Bubble Network" -recoveryNetwork "VM Network"
|
||||
```
|
||||
@@ -195,6 +201,36 @@ Accept pipeline input: False
|
||||
Accept wildcard characters: False
|
||||
```
|
||||
|
||||
### -journalDatastore
|
||||
Name of the datastore to utilize to store Journal data. If not specified, the default datastore will be used.
|
||||
|
||||
```yaml
|
||||
Type: String
|
||||
Parameter Sets: (All)
|
||||
Aliases:
|
||||
|
||||
Required: False
|
||||
Position: Named
|
||||
Default value: None
|
||||
Accept pipeline input: False
|
||||
Accept wildcard characters: False
|
||||
```
|
||||
|
||||
### -journalHardLimitInMb
|
||||
Default journal hard limit in megabytes. Default set to 153600 MB (150 GB). Set to 0 to set the journal to unlimited
|
||||
|
||||
```yaml
|
||||
Type: Int32
|
||||
Parameter Sets: (All)
|
||||
Aliases:
|
||||
|
||||
Required: False
|
||||
Position: Named
|
||||
Default value: 153600
|
||||
Accept pipeline input: False
|
||||
Accept wildcard characters: False
|
||||
```
|
||||
|
||||
### -journalHistoryInHours
|
||||
Journal History in Hours.
|
||||
Min 1 hour, Max 720 Hours (30 days)
|
||||
@@ -211,6 +247,21 @@ Accept pipeline input: False
|
||||
Accept wildcard characters: False
|
||||
```
|
||||
|
||||
### -journalWarningThresholdInMb
|
||||
Default journal warning threshold in megabytes. If unset or greater than the hard limit, will be set to 75% of the journal hard limit. If the journalHardLimitInMB is set to 0 (unlimited), this will be set to unlimited as well.
|
||||
|
||||
```yaml
|
||||
Type: Int32
|
||||
Parameter Sets: (All)
|
||||
Aliases:
|
||||
|
||||
Required: False
|
||||
Position: Named
|
||||
Default value: None
|
||||
Accept pipeline input: False
|
||||
Accept wildcard characters: False
|
||||
```
|
||||
|
||||
### -protectedVm
|
||||
Name(s) of the VM(s) to be protected.
|
||||
|
||||
@@ -451,7 +502,9 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
|
||||
|
||||
### System.String
|
||||
Vpg Settings Identifier
|
||||
|
||||
## NOTES
|
||||
|
||||
## RELATED LINKS
|
||||
|
||||
[Zerto REST API VPG Settings End Point Documentation](http://s3.amazonaws.com/zertodownload_docs/Latest/Zerto%20Virtual%20Replication%20Zerto%20Virtual%20Manager%20%28ZVM%29%20-%20vSphere%20Online%20Help/RestfulAPIs/StatusAPIs.5.108.html#)
|
||||
Reference in New Issue
Block a user