Skip to content

Commit fbfb771

Browse files
authored
Adding support for Ultra and ZRS disk (#28290)
1 parent 5549234 commit fbfb771

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

src/Migrate/Migrate.Autorest/custom/New-AzMigrateDiskMapping.ps1

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,8 @@ function New-AzMigrateDiskMapping {
4040
${IsOSDisk},
4141

4242
[Parameter(Mandatory)]
43-
[ValidateSet("Standard_LRS", "Premium_LRS", "StandardSSD_LRS", "PremiumV2_LRS")]
44-
[ArgumentCompleter( { "Standard_LRS", "Premium_LRS", "StandardSSD_LRS", "PremiumV2_LRS"})]
43+
[ValidateSet("Standard_LRS", "Premium_LRS", "StandardSSD_LRS", "PremiumV2_LRS", "UltraSSD_LRS", "StandardSSD_ZRS", "Premium_ZRS")]
44+
[ArgumentCompleter( { "Standard_LRS", "Premium_LRS", "StandardSSD_LRS", "PremiumV2_LRS", "UltraSSD_LRS", "StandardSSD_ZRS", "Premium_ZRS"})]
4545
[Microsoft.Azure.PowerShell.Cmdlets.Migrate.Category('Path')]
4646
[System.String]
4747
# Specifies the type of disks to be used for the Azure VM.
@@ -63,6 +63,9 @@ function New-AzMigrateDiskMapping {
6363
Premium_LRS = "Premium_LRS";
6464
StandardSSD_LRS = "StandardSSD_LRS";
6565
PremiumV2_LRS = "PremiumV2_LRS";
66+
UltraSSD_LRS = "UltraSSD_LRS";
67+
StandardSSD_ZRS = "StandardSSD_ZRS";
68+
Premium_ZRS = "Premium_ZRS"
6669
}
6770
$DiskObject.DiskType = $validDiskTypeSpellings[$DiskType]
6871

@@ -75,8 +78,8 @@ function New-AzMigrateDiskMapping {
7578
$DiskObject.DiskEncryptionSetId = $DiskEncryptionSetID
7679
}
7780

78-
if ($DiskObject.IsOSDisk -eq "true" -and $DiskObject.DiskType -eq $validDiskTypeSpellings["PremiumV2_LRS"]) {
79-
throw "Premium SSD V2 disk is not supported as an OS Disk in Azure."
81+
if ($DiskObject.IsOSDisk -eq "true" -and ($DiskObject.DiskType -eq $validDiskTypeSpellings["PremiumV2_LRS"] -or $DiskObject.DiskType -eq $validDiskTypeSpellings["UltraSSD_LRS"])) {
82+
throw "$($DiskObject.DiskType) is not supported as an OS disk in Azure."
8083
}
8184

8285
return $DiskObject

0 commit comments

Comments
 (0)