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
@@ -663,9 +663,9 @@ function New-AzMigrateLocalServerReplication {
663
663
# Validate DiskToInclude
664
664
[PSCustomObject[]]$uniqueDisks=@()
665
665
foreach ($diskin$DiskToInclude) {
666
-
# VHD is not supported in Gen2 VMs
667
-
if ($customProperties.HyperVGeneration-eq"2"-and$disk.DiskFileFormat-eq"VHD") {
668
-
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."
666
+
# VHD is not supported as OS disk in Gen2 VMs
667
+
if ($customProperties.HyperVGeneration-eq"2"-and$disk.DiskFileFormat-eq"VHD"-and$disk.IsOSDisk) {
668
+
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