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
Copy file name to clipboardExpand all lines: src/Migrate/Migrate.Autorest/custom/New-AzMigrateLocalServerReplication.ps1
+3-3Lines changed: 3 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -593,9 +593,9 @@ function New-AzMigrateLocalServerReplication {
593
593
# Validate DiskToInclude
594
594
[PSCustomObject[]]$uniqueDisks=@()
595
595
foreach ($diskin$DiskToInclude) {
596
-
# VHD is not supported in Gen2 VMs
597
-
if ($customProperties.HyperVGeneration-eq"2"-and$disk.DiskFileFormat-eq"VHD") {
598
-
throw"VHD disks are not supported in Hyper-V Generation 2 VMs. Please replace disk with id '$($disk.DiskId)' in -DiskToInclude by re-running New-AzMigrateLocalDiskMappingObject with 'VHDX' as Format."
596
+
# VHD is not supported as OS disk in Gen2 VMs
597
+
if ($customProperties.HyperVGeneration-eq"2"-and$disk.DiskFileFormat-eq"VHD"-and$disk.IsOSDisk) {
598
+
throw"VHD disks cannot be used as the OS disk of Hyper-V Generation 2 VMs. Please replace disk with id '$($disk.DiskId)' in -DiskToInclude by re-running New-AzMigrateLocalDiskMappingObject with 'VHDX' as Format."
0 commit comments