-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
TargetVmSize, AvSet, Sql RP and ResourceTagging changes for V2A and H2A #21
Changes from 18 commits
7a0ee9c
21a948e
f39ee62
5451de4
b3d874e
c03880a
5f80211
767e166
b3da526
a157e37
1c3f963
9e7af56
bf9627a
a776238
55f907e
838a284
8a9138d
2d1a123
3d45cad
d7920f9
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -801,9 +801,9 @@ function Test-UpdateRPIWithDiskEncryptionSetMap | |
|
||
<# | ||
.SYNOPSIS | ||
Site Recovery Create RPI with ProximityPlacementGroup | ||
Site Recovery Create RPI with ProximityPlacementGroup, AvailabilitySet, TargetVmSize, SqlServerLicenseType, UseManagedDisk, ResourceTagging | ||
#> | ||
function Test-CreateRPIWithProximityPlacementGroup | ||
function Test-CreateRPIWithAdditionalProperties | ||
{ | ||
param([string] $vaultSettingsFilePath) | ||
|
||
|
@@ -814,30 +814,51 @@ function Test-CreateRPIWithProximityPlacementGroup | |
$pcm = Get-ASRProtectionContainerMapping -ProtectionContainer $pc | ||
$policy = Get-AzRecoveryServicesAsrPolicy -Name $PolicyName | ||
$VM= Get-AsrProtectableItem -ProtectionContainer $pc -FriendlyName $VMName | ||
$ppg = "/subscriptions/b364ed8d-4279-4bf8-8fd1-56f8fa0ae05c/resourceGroups/Arpita-air/providers/Microsoft.Compute/proximityPlacementGroups/h2atestppgenable" | ||
$EnableDRjob = New-AsrReplicationProtectedItem -ProtectableItem $VM -Name $VM.Name -ProtectionContainerMapping $pcm -RecoveryAzureStorageAccountId $StorageAccountID -OSDiskName $VMName -OS Windows -RecoveryResourceGroupId $RecoveryResourceGroupId -RecoveryProximityPlacementGroupId $ppg -UseManagedDisk true | ||
$ppg = "/subscriptions/b364ed8d-4279-4bf8-8fd1-56f8fa0ae05c/resourceGroups/prakccyrg/providers/Microsoft.Compute/proximityPlacementGroups/h2appgenable" | ||
$avset="/subscriptions/b364ed8d-4279-4bf8-8fd1-56f8fa0ae05c/resourceGroups/prakccyrg/providers/Microsoft.Compute/availabilitySets/h2aavsetenable" | ||
$size = "Standard_B1s" | ||
$sqlLicenseType = "AHUB" | ||
$vmTag = New-Object "System.Collections.Generic.Dictionary``2[System.String,System.String]" | ||
$vmTag.Add("VmTag1","powershellVm") | ||
$diskTag = New-Object "System.Collections.Generic.Dictionary``2[System.String,System.String]" | ||
$diskTag.Add("DiskTag1","powershellDisk") | ||
$nicTag = New-Object "System.Collections.Generic.Dictionary``2[System.String,System.String]" | ||
$nicTag.Add("NicTag1","powershellNic") | ||
$EnableDRjob = New-AsrReplicationProtectedItem -ProtectableItem $VM -Name $VM.Name -ProtectionContainerMapping $pcm -RecoveryAzureStorageAccountId $StorageAccountID -OSDiskName $VMName -OS Windows -RecoveryResourceGroupId $RecoveryResourceGroupId -RecoveryProximityPlacementGroupId $ppg -UseManagedDisk true -RecoveryAvailabilitySetId $avset -Size $size -SqlServerLicenseType $sqlLicenseType -RecoveryVmTag $vmTag -RecoveryNicTag $nicTag -DiskTag $diskTag -RecoveryAzureNetworkId $AzureVmNetworkId | ||
} | ||
|
||
<# | ||
.SYNOPSIS | ||
Site Recovery Update RPI with ProximityPlacementGroup | ||
Site Recovery Update RPI with ProximityPlacementGroup, AvailabilitySet, SqlServerLicenseType, ResourceTagging | ||
#> | ||
function Test-UpdateRPIWithProximityPlacementGroup | ||
function Test-UpdateRPIWithAdditionalProperties | ||
{ | ||
param([string] $vaultSettingsFilePath) | ||
|
||
# Import Azure RecoveryServices Vault Settings File | ||
Import-AzRecoveryServicesAsrVaultSettingsFile -Path $vaultSettingsFilePath | ||
$fabric = Get-AsrFabric -FriendlyName $PrimaryFabricName | ||
$pc = Get-ASRProtectionContainer -Fabric $fabric | ||
$pcm = Get-ASRProtectionContainerMapping -ProtectionContainer $pc | ||
$policy = Get-AzRecoveryServicesAsrPolicy -Name $PolicyName | ||
$rpi = Get-AsrReplicationProtectedItem -ProtectionContainer $pc -FriendlyName $VMName | ||
|
||
$ppgSet="/subscriptions/b364ed8d-4279-4bf8-8fd1-56f8fa0ae05c/resourceGroups/Arpita-air/providers/Microsoft.Compute/proximityPlacementGroups/h2atestppgupdate" | ||
$currentJob = Set-AsrReplicationProtectedItem -InputObject $rpi -RecoveryProximityPlacementGroupId $ppgSet -UpdateNic $rpi.NicDetailsList[0].NicId -RecoveryNetworkId $AzureNetworkID -RecoveryNicSubnetName $subnet | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Please set network else in future error will come There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I have set the network during enable protection. So no need to do from here. In reply to: 601631470 [](ancestors = 601631470) |
||
$ppg = "/subscriptions/b364ed8d-4279-4bf8-8fd1-56f8fa0ae05c/resourceGroups/prakccyrg/providers/Microsoft.Compute/proximityPlacementGroups/h2appgupdate" | ||
$avset="/subscriptions/b364ed8d-4279-4bf8-8fd1-56f8fa0ae05c/resourceGroups/prakccyrg/providers/Microsoft.Compute/availabilitySets/h2aavsetupdate" | ||
$sqlLicenseType = "PAYG" | ||
$vmTag = New-Object "System.Collections.Generic.Dictionary``2[System.String,System.String]" | ||
$vmTag.Add("VmTag2","powershellVm") | ||
$diskTag = New-Object "System.Collections.Generic.Dictionary``2[System.String,System.String]" | ||
$diskTag.Add("DiskTag2","powershellDisk") | ||
$nicTag = New-Object "System.Collections.Generic.Dictionary``2[System.String,System.String]" | ||
$nicTag.Add("NicTag2","powershellNic") | ||
|
||
$currentJob = Set-AsrReplicationProtectedItem -InputObject $rpi -RecoveryProximityPlacementGroupId $ppg -UseManagedDisk true -RecoveryAvailabilitySet $avset -SqlServerLicenseType $sqlLicenseType -RecoveryVmTag $vmTag -RecoveryNicTag $nicTag -DiskTag $diskTag | ||
WaitForJobCompletion -JobId $currentJob.Name | ||
|
||
$rpi = Get-AsrReplicationProtectedItem -ProtectionContainer $pc -FriendlyName $VMName | ||
Assert-NotNull($rpi.ProviderSpecificDetails.RecoveryProximityPlacementGroupId) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. why did we remove, we should add check for value as well. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Will add this check. Will take care of it when I do add tests for V2A. In reply to: 601631955 [](ancestors = 601631955) |
||
Assert-NotNull($rpi.ProviderSpecificDetails.RecoveryVmTag) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
All assert, we should add check for value as well. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
Assert-NotNull($rpi.ProviderSpecificDetails.DiskTag) | ||
Assert-NotNull($rpi.ProviderSpecificDetails.RecoveryNicTag) | ||
} | ||
|
||
<# | ||
|
@@ -876,19 +897,4 @@ function Test-UpdateRPIWithAvailabilityZone | |
|
||
$rpi = Get-AsrReplicationProtectedItem -ProtectionContainer $pc -FriendlyName $VMName | ||
Assert-NotNull($rpi.ProviderSpecificDetails.RecoveryAvailabilityZone) | ||
} | ||
|
||
function Test-CreateRPIWithManagedDisk | ||
{ | ||
param([string] $vaultSettingsFilePath) | ||
|
||
# Import Azure RecoveryServices Vault Settings File | ||
Import-AzRecoveryServicesAsrVaultSettingsFile -Path $vaultSettingsFilePath | ||
$fabric = Get-AsrFabric -FriendlyName $PrimaryFabricName | ||
$pc = Get-ASRProtectionContainer -Fabric $fabric | ||
$pcm = Get-ASRProtectionContainerMapping -ProtectionContainer $pc | ||
$policy = Get-AzRecoveryServicesAsrPolicy -Name $PolicyName | ||
$VM= Get-AsrProtectableItem -ProtectionContainer $pc -FriendlyName $VMName | ||
|
||
$EnableDRjob = New-AsrReplicationProtectedItem -ProtectableItem $VM -Name $VM.Name -ProtectionContainerMapping $pcm -RecoveryAzureStorageAccountId $StorageAccountID -OSDiskName $VMName -OS Windows -RecoveryResourceGroupId $RecoveryResourceGroupId -UseManagedDisk true | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1 @@ | ||
<ASRVaultCreds xmlns="http://schemas.datacontract.org/2004/07/Microsoft.Azure.Portal.RecoveryServices.Models.Common" | ||
xmlns:i="http://www.w3.org/2001/XMLSchema-instance"> | ||
<SubscriptionId>7c943c1b-5122-4097-90c8-861411bdd574</SubscriptionId> | ||
<ResourceType>HyperVRecoveryManagerVault</ResourceType> | ||
<ResourceName>IbizaV2ATest</ResourceName> | ||
<ManagementCert></ManagementCert> | ||
<AcsNamespace> | ||
<HostName>accesscontrol.windows.net</HostName> | ||
<Namespace>canpod01rrp1users01</Namespace> | ||
<ResourceProviderRealm>http://windowscloudbackup/m3</ResourceProviderRealm> | ||
</AcsNamespace> | ||
<ARMResourceType>vaults</ARMResourceType> | ||
<ChannelIntegrityKey>RpLm/prjKcumC6EFkzyZxQ==</ChannelIntegrityKey> | ||
<Location>southeastasia</Location> | ||
<ResourceGroupName>canaryexproute</ResourceGroupName> | ||
<ResourceNamespace>Microsoft.RecoveryServices</ResourceNamespace> | ||
<SiteId /> | ||
<SiteName /> | ||
<Version>1.0</Version> | ||
</ASRVaultCreds> | ||
<?xml version="1.0" encoding="utf-8"?><RSVaultAsrCreds xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Microsoft.Azure.Portal.RecoveryServices.Models.Common"><VaultDetails><SubscriptionId>b8aef8e1-37df-4f17-a537-f10e183c8eca</SubscriptionId><ResourceGroup>PwsTestRG</ResourceGroup><ResourceName>PwsTestVault</ResourceName><ResourceId>6066914184940997397</ResourceId><Location>centraluseuap</Location><ResourceType>Vaults</ResourceType><ProviderNamespace>Microsoft.RecoveryServices</ProviderNamespace></VaultDetails><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6Uof99CaQ09RKXFM6lHobK54OsPTzMnAV6qj+mR5DEypWtktlcxnmvUY6jWEn6Uakgg5w+hLpA7u39c5RnQm8IqujIQ2pN7djplUw3aBbfw1h0GU5jGTJTVx3ENE2cNmUBvBEz5II5Gf9I9mvuOGYtga4/Arv5dNL/2UIAYuaLmtiojWIZKG8ecOQeESzJuacLPBFClYKuWSkmT7qH2azVWcmDQ8guLUA0l2TQ24C0F+F3VHcMDswHzAHBgUrDgMCGgQUQDeLZqjT/dc9AJFj8RWXdBxL7DAEFAbdORFsQCcnVuCOAelqTBMYoa4hAgIH0A==</ManagementCert><Version>2.0</Version><AadDetails><AadAuthority>https://login.windows.net</AadAuthority><AadTenantId>31f0bb8c-c1fe-4044-96d2-8a5a1994ee83</AadTenantId><ServicePrincipalClientId>ad418398-de07-4007-8329-05d3a9d85700</ServicePrincipalClientId><AadVaultAudience>https://RecoveryServiceVault/centraluseuap/PwsTestVault/6066914184940997397</AadVaultAudience><ArmManagementEndpoint>https://pod01-id1.ccy.backup.windowsazure.com/restapi/</ArmManagementEndpoint></AadDetails><ChannelIntegrityKey></ChannelIntegrityKey><SiteId></SiteId><SiteName></SiteName><PrivateEndpointStateForSiteRecovery>None</PrivateEndpointStateForSiteRecovery></RSVaultAsrCreds> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In future we should wait for enable and IR to finish and check all these are coming fine, for now u can check in armclient #Resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For now checked from portal. Will do it next release.
In reply to: 601630510 [](ancestors = 601630510)