File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed
src/Migrate/Migrate.Autorest/custom Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -74,9 +74,10 @@ function New-AzMigrateLocalDiskMappingObject {
74
74
process {
75
75
$isDynamicDisk = [System.Convert ]::ToBoolean($IsDynamic )
76
76
$osDisk = [System.Convert ]::ToBoolean($IsOSDisk )
77
+ $hasPhysicalSectorSize = $PSBoundParameters.ContainsKey (' PhysicalSectorSize' )
77
78
78
- if ($Format -eq " VHD" -and $PhysicalSectorSize -ne 512 ) {
79
- throw " PhysicalSectorSize must be 512 for VHD format."
79
+ if ($Format -eq " VHD" -and $hasPhysicalSectorSize -and $ PhysicalSectorSize -ne 512 ) {
80
+ throw " PhysicalSectorSize must be 512 for VHD format but $PhysicalSectorSize is given ."
80
81
}
81
82
82
83
$DiskObject = [Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20240901.AzLocalDiskInput ]::new(
You can’t perform that action at this time.
0 commit comments