Skip to content

Commit c22563b

Browse files
committed
Update VMware.CloudFoundation.InstanceRecovery.psm1
Extract Portgroup names from running SDDC Manager Signed-off-by: Brian O'Connell <brianoc4@gmail.com>
1 parent 4e932dd commit c22563b

1 file changed

Lines changed: 20 additions & 0 deletions

File tree

VMware.CloudFoundation.InstanceRecovery.psm1

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1130,6 +1130,26 @@ Function Update-ExtractdDataFromSDDCBackup {
11301130
$vdsName = (Invoke-VcfGetVdses -ClusterId $cluster.id | Where-Object {$_.id -eq $vds.id}).Name
11311131
$vds.dvsName = $vdsName
11321132

1133+
}
1134+
1135+
Foreach ($portGroup in $vds.PortGroups) {
1136+
if ($portGroup.TransportType -eq "VM_MANAGEMENT") {
1137+
$vmManagementPGName = ((Invoke-VcfGetVdses -ClusterId $cluster.id).PortGroups | Where-Object {$_.TransportType -eq "VM_MANAGEMENT"}).Name
1138+
$portGroup | Add-Member -NotePropertyName "Name" -NotePropertyValue $vmManagementPGName -Force
1139+
}
1140+
if ($portGroup.TransportType -eq "MANAGEMENT") {
1141+
$managementPGName = ((Invoke-VcfGetVdses -ClusterId $cluster.id).PortGroups | Where-Object {$_.TransportType -eq "MANAGEMENT"}).Name
1142+
$portGroup | Add-Member -NotePropertyName "Name" -NotePropertyValue $managementPGName -Force
1143+
}
1144+
if ($portGroup.TransportType -eq "VMOTION") {
1145+
$vMotionPGName = ((Invoke-VcfGetVdses -ClusterId $cluster.id).PortGroups | Where-Object {$_.TransportType -eq "VMOTION"}).Name
1146+
$portGroup | Add-Member -NotePropertyName "Name" -NotePropertyValue $vMotionPGName -Force
1147+
}
1148+
if ($portGroup.TransportType -eq "VSAN") {
1149+
$vSanPGName = ((Invoke-VcfGetVdses -ClusterId $cluster.id).PortGroups | Where-Object {$_.TransportType -eq "VSAN"}).Name
1150+
$portGroup | Add-Member -NotePropertyName "Name" -NotePropertyValue $vSanPGName -Force
1151+
}
1152+
11331153
}
11341154
}
11351155
}

0 commit comments

Comments
 (0)