You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Dec 6, 2023. It is now read-only.
* update feature includes staticIP, test_network_id and testsubnetname
* more changes
* code changes
* TMSS Feature Implemented
* Resolved Comments, TestMigration Working
* Input.csv changed
* Added new Inputs for TFO and Added extra case in if
* Relaced TestNetworkId with TestVnetName
* logs removed
* removed return from optional property vnetname, and removed print statements
* comments resolved
* sample inputs added
Copy file name to clipboardExpand all lines: azure-migrate/migrate-at-scale-vmware-agentles/Agentless VMware automation/AzMigrate_StartTestMigration.ps1
+84-2Lines changed: 84 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -88,7 +88,89 @@ Function ProcessItemImpl($processor, $csvItem, $reportItem) {
88
88
$reportItem.AdditionalInformation="VNET could not be retrieved for: '$($targetVnetName)'"
89
89
return
90
90
}
91
+
92
+
#region NICMapping
93
+
# NIC parameters to pass to New-AzMigrateServerReplication
94
+
$NicMapping=@()
95
+
$paramsNIC1=@{}
96
+
$UpdatedNIC1ID=$csvItem.TFO_NIC1_ID
97
+
if ([string]::IsNullOrEmpty($UpdatedNIC1ID)) {
98
+
$processor.Logger.LogTrace("UPDATED_NIC1_ID is not mentioned for: '$($sourceMachineName)'")
99
+
if ([string]::IsNullOrEmpty($ReplicatingServermachine.ProviderSpecificDetail.VMNic[0].NicId))
100
+
{
101
+
$processor.Logger.LogTrace("We didn't find NicId at the first VMNic in replicating server for: '$($sourceMachineName)'")
102
+
}
103
+
else {
104
+
$processor.Logger.LogTrace("We found NicId at the first VMNic in replicating server, so we are going to use this for: '$($sourceMachineName)'")
Copy file name to clipboardExpand all lines: azure-migrate/migrate-at-scale-vmware-agentles/Agentless VMware automation/AzMigrate_UpdateMachineProperties.ps1
+44-1Lines changed: 44 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -73,6 +73,22 @@ Function ProcessItemImpl($processor, $csvItem, $reportItem) {
if ([string]::IsNullOrEmpty($NIC1_Subnet)) {$processor.Logger.LogTrace("UPDATED_TARGET_NIC1_SUBNET_NAME is not mentioned for: '$($sourceMachineName)'")}
403
427
else {
@@ -408,6 +432,11 @@ Function ProcessItemImpl($processor, $csvItem, $reportItem) {
if ([string]::IsNullOrEmpty($NIC1_TEST_IP)) {$processor.Logger.LogTrace("UPDATED_TARGET_NIC1_TEST_STATIC_IP is not mentioned for: '$($sourceMachineName)'")}
437
+
else {
438
+
$paramsNIC1.Add("TestNicIP",$NIC1_TEST_IP)
439
+
}
411
440
412
441
# NIC parameters to pass to New-AzMigrateServerReplication
413
442
$paramsNIC2=@{}
@@ -451,6 +480,15 @@ Function ProcessItemImpl($processor, $csvItem, $reportItem) {
if ([string]::IsNullOrEmpty($NIC2_Subnet)) {$processor.Logger.LogTrace("UPDATED_TARGET_NIC2_SUBNET_NAME is not mentioned for: '$($sourceMachineName)'")}
456
494
else {
@@ -461,6 +499,11 @@ Function ProcessItemImpl($processor, $csvItem, $reportItem) {
if ([string]::IsNullOrEmpty($NIC2_TEST_STATIC_IP)) {$processor.Logger.LogTrace("UPDATED_TARGET_NIC2_TEST_STATIC_IP is not mentioned for: '$($sourceMachineName)'")}
504
+
else {
505
+
$paramsNIC1.Add("TestNicIP",$NIC2_TEST_NIC_IP)
506
+
}
464
507
465
508
#Assumption is that if $UpdatedNIC1ID is not provided then probably it doesnt need to be added
466
509
# we can also add the below code when we check this for the first time but it will be in a nested fashion so doing it here for simplicity
xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx,srcrg-ecy,ECYPROJ,ecyapp,testvm-cvm3,Microsoft Windows Server 2022 (64-bit),,srcrg-ecy,PAYG,,,"vm-tag-1,vm-tag-2","vm-tag-val-1,vm-tag-val-2","d1,d2","d1-val,d2-val",n1,n1-val,,xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx,sv-target-ecy-rg,vnet-name,default,testvm-1,,NoLicenseType,,,,,,,Y,vnet-ecy,,,,"up-vm-1,up-vm-2","up-vm-value-1,up-vm-value-2",Replace,disk-1,disk-1-tag,Merge,,,,,,testvm-sv-1,,,,,,,,,nic-name-updated,,,,,AzureBastionSubnet,,,,,,,,Y,Y,Y,Y,Y,Y,Y
xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxx,srcrg-ecy,ECYPROJ,sv-app-2,rthapliyal-cs-01,Microsoft Windows Server 2019 (64-bit),,srcrg-ecy,PAYG,"t-1,t-2","tv-1,tv-2","vm-tag-1,vm-tag-2","vm-tag-val-1,vm-tag-val-2","d1,d2","d1-val,d2-val",n1,n1-val,vnet,testing,xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxx,srcrg-ecy,vnet-ecy,default,testvm-xx,,NoLicenseType,xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxx,xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxx,xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxx,,,,Y,sv-vnet,vnet,ut-1,utv-1,Merge,"up-vm-1,up-vm-2","up-vm-value-1,up-vm-value-2",Replace,disk-1,disk-1-tag,Merge,,,,,,testvm-sv-x1,t-disk-name,os-disk-name,data-disk1-name,,,,,xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxx,xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxx,nic-name-updated,,,x.x.x.x,x.x.x.x,testMigrationSubnet,testSubnet,,,,,,,,,,Y,Y,Y,Y,Y,Y,Y
0 commit comments