Skip to content

Commit

Permalink
chore: update Windows base images to 2023-8B with registry key (#3517)
Browse files Browse the repository at this point in the history
Co-authored-by: strawberryfg <[email protected]>
  • Loading branch information
wanqingfu and strawberryfg authored Aug 9, 2023
1 parent 9bb2bca commit 0cccf5e
Show file tree
Hide file tree
Showing 4 changed files with 43 additions and 4 deletions.
21 changes: 21 additions & 0 deletions vhdbuilder/packer/configure-windows-vhd.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -548,6 +548,27 @@ function Update-Registry {
Write-Log "The current value of VfpIpv6DipsPrintingIsEnabled is $currentValue"
}
Set-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Services\VfpExt\Parameters" -Name VfpIpv6DipsPrintingIsEnabled -Value 1 -Type DWORD

Write-Log "Enable 3 fixes in 2023-08B"

$currentValue=(Get-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Services\hns\State" -Name HNSUpdatePolicyForEndpointChange -ErrorAction Ignore)
if (![string]::IsNullOrEmpty($currentValue)) {
Write-Log "The current value of HNSUpdatePolicyForEndpointChange is $currentValue"
}
Set-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Services\hns\State" -Name HNSUpdatePolicyForEndpointChange -Value 1 -Type DWORD

$currentValue=(Get-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Services\hns\State" -Name HNSFixExtensionUponRehydration -ErrorAction Ignore)
if (![string]::IsNullOrEmpty($currentValue)) {
Write-Log "The current value of HNSFixExtensionUponRehydration is $currentValue"
}
Set-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Services\hns\State" -Name HNSFixExtensionUponRehydration -Value 1 -Type DWORD

$currentValue=(Get-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Policies\Microsoft\FeatureManagement\Overrides" -Name 87798413 -ErrorAction Ignore)
if (![string]::IsNullOrEmpty($currentValue)) {
Write-Log "The current value of 87798413 is $currentValue"
}
Set-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Policies\Microsoft\FeatureManagement\Overrides" -Name 87798413 -Value 1 -Type DWORD

}
}

Expand Down
15 changes: 15 additions & 0 deletions vhdbuilder/packer/test/windows-vhd-content-test.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -331,6 +331,21 @@ function Test-RegistryAdded {
Write-ErrorWithTimestamp "The registry for VfpIpv6DipsPrintingIsEnabled is not added"
exit 1
}
$result=(Get-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Services\hns\State" -Name HNSUpdatePolicyForEndpointChange)
if ($result.HNSUpdatePolicyForEndpointChange -ne 1) {
Write-ErrorWithTimestamp "The registry for HNSUpdatePolicyForEndpointChange is not added"
exit 1
}
$result=(Get-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Services\hns\State" -Name HNSFixExtensionUponRehydration)
if ($result.HNSFixExtensionUponRehydration -ne 1) {
Write-ErrorWithTimestamp "The registry for HNSFixExtensionUponRehydration is not added"
exit 1
}
$result=(Get-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Policies\Microsoft\FeatureManagement\Overrides" -Name 87798413)
if ($result.87798413 -ne 1) {
Write-ErrorWithTimestamp "The registry for 87798413 is not added"
exit 1
}
}
}

Expand Down
6 changes: 3 additions & 3 deletions vhdbuilder/packer/windows-image.env
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,18 @@
# CLI example to get the latest image version:
# az vm image show --urn MicrosoftWindowsServer:WindowsServer:2019-Datacenter-Core-smalldisk:latest
WINDOWS_2019_BASE_IMAGE_SKU=2019-Datacenter-Core-smalldisk
WINDOWS_2019_BASE_IMAGE_VERSION=17763.4645.230707
WINDOWS_2019_BASE_IMAGE_VERSION=17763.4737.230802
# CLI example to get the latest image version:
# az vm image show --urn MicrosoftWindowsServer:WindowsServer:2022-Datacenter-Core-smalldisk:latest
WINDOWS_2022_BASE_IMAGE_SKU=2022-Datacenter-Core-smalldisk
WINDOWS_2022_BASE_IMAGE_VERSION=20348.1850.230707
WINDOWS_2022_BASE_IMAGE_VERSION=20348.1906.230803

# CLI example to get all available image version under a SKU (suffix g2 for Gen 2):
# az vm image list --all --publisher MicrosoftWindowsServer --offer WindowsServer --output table -s 2022-datacenter-core-smalldisk-g2
# CLI example to get the latest image version:
# az vm image show --urn MicrosoftWindowsServer:WindowsServer:2022-datacenter-core-smalldisk-g2:latest
WINDOWS_2022_GEN2_BASE_IMAGE_SKU=2022-datacenter-core-smalldisk-g2
WINDOWS_2022_GEN2_BASE_IMAGE_VERSION=20348.1850.230707
WINDOWS_2022_GEN2_BASE_IMAGE_VERSION=20348.1906.230803

# Please uncomment the following lines and set a larger os disk size that is at least 30GB when your PR check-in fails
# WINDOWS_2019_CONTAINERD_OS_DISK_SIZE_GB=30
Expand Down
5 changes: 4 additions & 1 deletion vhdbuilder/packer/write-release-notes-windows.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -90,10 +90,12 @@ $wuRegistryNames = @(
"HnsPolicyUpdateChange",
"HnsNatAllowRuleUpdateChange",
"HnsAclUpdateChange",
"HNSFixExtensionUponRehydration",
"HnsNpmRefresh",
"HnsNodeToClusterIpv6",
"HNSNpmIpsetLimitChange",
"HNSLbNatDupRuleChange",
"HNSUpdatePolicyForEndpointChange",
"WcifsSOPCountDisabled",
"3105872524",
"2629306509",
Expand All @@ -103,7 +105,8 @@ $wuRegistryNames = @(
"VfpEvenPodDistributionIsEnabled",
"VfpIpv6DipsPrintingIsEnabled",
"3230913164",
"3398685324"
"3398685324",
"87798413"
)

foreach ($key in $wuRegistryKeys) {
Expand Down

0 comments on commit 0cccf5e

Please sign in to comment.