Skip to content

Commit a9d0b74

Browse files
authored
Update windows base VHD to 2025-1B (#5576)
1 parent 7aef98e commit a9d0b74

File tree

4 files changed

+22
-19
lines changed

4 files changed

+22
-19
lines changed

.pipelines/templates/e2e-template.yaml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,9 @@ jobs:
4545
VHD_BUILD_ID: $(VHD_BUILD_ID)
4646
LOGGING_DIR: $(LOGGING_DIR)
4747
# Without this step next step may fail on successful run
48-
- bash: mkdir -p $(System.DefaultWorkingDirectory)/e2e/$(LOGGING_DIR)
48+
- bash: |
49+
set -ex
50+
mkdir -p "$(System.DefaultWorkingDirectory)/e2e/$(LOGGING_DIR)"
4951
condition: always()
5052
displayName: Create folder for scenario logs
5153
- task: PublishTestResults@2

vhdbuilder/packer/configure-windows-vhd.ps1

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -388,12 +388,22 @@ function Install-ContainerD {
388388

389389
function Install-OpenSSH {
390390
Write-Log "Installing OpenSSH Server"
391+
392+
# Somehow openssh client got added to Windows 2019 base image.
393+
if ($env:WindowsSKU -Like '2019*')
394+
{
395+
Remove-WindowsCapability -Online -Name OpenSSH.Client~~~~0.0.1.0
396+
Add-WindowsCapability -Online -Name OpenSSH.Client~~~~0.0.1.0
397+
}
398+
391399
Add-WindowsCapability -Online -Name OpenSSH.Server~~~~0.0.1.0
392400

393401
# It’s by design that files within the C:\Windows\System32\ folder are not modifiable.
394402
# When the OpenSSH Server starts, it copies C:\windows\system32\openssh\sshd_config_default to C:\programdata\ssh\sshd_config, if the file does not already exist.
395403
$OriginalConfigPath = "C:\windows\system32\OpenSSH\sshd_config_default"
396-
$ConfigPath = "C:\programdata\ssh\sshd_config"
404+
$ConfigDirectory = "C:\programdata\ssh"
405+
New-Item -ItemType Directory -Force -Path $ConfigDirectory
406+
$ConfigPath = $ConfigDirectory + "\sshd_config"
397407
Write-Log "Updating $ConfigPath for CVE-2023-48795"
398408
$ModifiedConfigContents = Get-Content $OriginalConfigPath `
399409
| %{$_ -replace "#RekeyLimit default none", "$&`r`n# Disable cipher to mitigate CVE-2023-48795`r`nCiphers [email protected]`r`nMacs -*[email protected]`r`n"}
@@ -874,7 +884,7 @@ function Log-ReofferUpdate {
874884
Write-Log "ReofferUpdate is $($result.ReofferUpdate)"
875885
}
876886
} catch {
877-
Write-Log "ReofferUpdate does not exist"
887+
Write-Log "ReofferUpdate registry setting does not exist"
878888
}
879889
}
880890

vhdbuilder/packer/generate-windows-vhd-configuration.ps1

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -60,17 +60,8 @@ $global:defenderUpdateInfoUrl = "https://go.microsoft.com/fwlink/?linkid=870379&
6060
6161
switch -Regex ($windowsSku) {
6262
"2019-containerd" {
63-
# TODO: clean up when you bump 2025-1B. These patches do an upgrade from 2024-9B to 2024-12B in a way that doesn't break openssh.
64-
# The right patch for .NET is actually KB5046540. However, the download page us for KB5046269. So we have to verify that patch. I have no idea why.
65-
66-
$global:patchUrls = @(
67-
"https://catalog.s.download.windowsupdate.com/d/msdownload/update/software/secu/2024/12/windows10.0-kb5048661-x64_6bfc43258aab46ec793d2977122226a4a2b8ed6f.msu",
68-
"https://catalog.s.download.windowsupdate.com/d/msdownload/update/software/updt/2024/10/windows10.0-kb5046268-x64_cd2f14649df2343f1b4692c50644f22b863ed408.msu"
69-
)
70-
$global:patchIDs = @(
71-
"KB5048661",
72-
"KB5046268"
73-
)
63+
$global:patchUrls = @()
64+
$global:patchIDs = @()
7465
7566
$global:imagesToPull = @(
7667
"mcr.microsoft.com/windows/servercore:ltsc2019",

vhdbuilder/packer/windows-image.env

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,32 +6,32 @@
66
WINDOWS_2019_BASE_IMAGE_SKU=2019-Datacenter-Core-smalldisk
77
# TODO: update global:patch in generate-windows-vhd-configuration.ps1 and remove this comment when you bump 12B
88
# - but revert and bring back if open ssh fails when you build the VHD. This image is 9B.
9-
WINDOWS_2019_BASE_IMAGE_VERSION=17763.6293.240905
9+
WINDOWS_2019_BASE_IMAGE_VERSION=17763.6775.250109
1010

1111
# CLI example to get the latest image version:
1212
# az vm image show --urn MicrosoftWindowsServer:WindowsServer:2022-Datacenter-Core-smalldisk:latest
1313
WINDOWS_2022_BASE_IMAGE_SKU=2022-Datacenter-Core-smalldisk
14-
WINDOWS_2022_BASE_IMAGE_VERSION=20348.2966.241205
14+
WINDOWS_2022_BASE_IMAGE_VERSION=20348.3091.250112
1515

1616
# CLI example to get all available image version under a SKU (suffix g2 for Gen 2):
1717
# az vm image list --all --publisher MicrosoftWindowsServer --offer WindowsServer --output table -s 2022-datacenter-core-smalldisk-g2
1818
# CLI example to get the latest image version:
1919
# az vm image show --urn MicrosoftWindowsServer:WindowsServer:2022-datacenter-core-smalldisk-g2:latest
2020
WINDOWS_2022_GEN2_BASE_IMAGE_SKU=2022-datacenter-core-smalldisk-g2
21-
WINDOWS_2022_GEN2_BASE_IMAGE_VERSION=20348.2966.241205
21+
WINDOWS_2022_GEN2_BASE_IMAGE_VERSION=20348.3091.250112
2222

2323
# CLI example to get the latest image version:
2424
# az vm image show --urn MicrosoftWindowsServer:WindowsServer:23h2-datacenter-core:latest
2525
WINDOWS_23H2_BASE_IMAGE_SKU=23h2-datacenter-core
26-
WINDOWS_23H2_BASE_IMAGE_VERSION=25398.1308.241205
26+
WINDOWS_23H2_BASE_IMAGE_VERSION=25398.1369.250111
2727

2828
# CLI example to get all available image version under a SKU (suffix g2 for Gen 2):
2929
# az vm image list --all --publisher MicrosoftWindowsServer --offer WindowsServer --output table -s 23h2-datacenter-core-g2
3030
# CLI example to get the latest image version:
3131
# az vm image show --urn MicrosoftWindowsServer:WindowsServer:23h2-datacenter-core-g2:latest
3232
# NOTE: Please update $global:patchUrls and $global:patchIDs in vhdbuilder/packer/generate-windows-vhd-configuration.ps1 on demand
3333
WINDOWS_23H2_GEN2_BASE_IMAGE_SKU=23h2-datacenter-core-g2
34-
WINDOWS_23H2_GEN2_BASE_IMAGE_VERSION=25398.1308.241205
34+
WINDOWS_23H2_GEN2_BASE_IMAGE_VERSION=25398.1369.250111
3535

3636
# Please uncomment the following lines and set a larger os disk size that is at least 30GB when your PR check-in fails
3737
# WINDOWS_2019_CONTAINERD_OS_DISK_SIZE_GB=30

0 commit comments

Comments
 (0)