Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
renaming fields and updating packer
  • Loading branch information
janenotjung-hue committed Mar 3, 2026
commit 27ada8c951ba6441b2310f5f2e1d92fc82d8090a
14 changes: 14 additions & 0 deletions vhdbuilder/packer/produce-packer-settings-functions.sh
Original file line number Diff line number Diff line change
Expand Up @@ -268,6 +268,18 @@ function prepare_windows_vhd() {
WINDOWS_IMAGE_VERSION=$(jq -r ".WindowsBaseVersions.\"${WINDOWS_SKU}\".base_image_version" <$CDIR/windows/windows_settings.json)
WINDOWS_IMAGE_NAME=$(jq -r ".WindowsBaseVersions.\"${WINDOWS_SKU}\".windows_image_name" <$CDIR/windows/windows_settings.json)
OS_DISK_SIZE=$(jq -r ".WindowsBaseVersions.\"${WINDOWS_SKU}\".os_disk_size" <$CDIR/windows/windows_settings.json)

local sku_publisher
sku_publisher=$(jq -r ".WindowsBaseVersions.\"${WINDOWS_SKU}\".base_image_publisher" <$CDIR/windows/windows_settings.json)
if [ "${sku_publisher}" != "null" ]; then
WINDOWS_IMAGE_PUBLISHER="${sku_publisher}"
fi
local sku_offer
sku_offer=$(jq -r ".WindowsBaseVersions.\"${WINDOWS_SKU}\".base_image_offer" <$CDIR/windows/windows_settings.json)
if [ "${sku_offer}" != "null" ]; then
WINDOWS_IMAGE_OFFER="${sku_offer}"
fi

if [ "null" != "${OS_DISK_SIZE}" ]; then
echo "Setting os_disk_size_gb to the value in windows-settings.json for ${WINDOWS_SKU}: ${OS_DISK_SIZE}"
os_disk_size_gb=${OS_DISK_SIZE}
Expand All @@ -278,6 +290,8 @@ function prepare_windows_vhd() {
imported_windows_image_name="${WINDOWS_IMAGE_NAME}-imported-${CREATE_TIME}-${RANDOM}"

echo "Got base image data: "
echo " WINDOWS_IMAGE_PUBLISHER: ${WINDOWS_IMAGE_PUBLISHER}"
echo " WINDOWS_IMAGE_OFFER: ${WINDOWS_IMAGE_OFFER}"
echo " WINDOWS_IMAGE_SKU: ${WINDOWS_IMAGE_SKU}"
echo " WINDOWS_IMAGE_VERSION: ${WINDOWS_IMAGE_VERSION}"
echo " WINDOWS_IMAGE_NAME: ${WINDOWS_IMAGE_NAME}"
Expand Down
4 changes: 2 additions & 2 deletions vhdbuilder/packer/windows/windows_settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@
"WindowsBaseVersions": {
"2022-containerd": {
"os_disk_size": "35",
"publisherID": "MicrosoftWindowsServer",
"offerID": "windowsserver2022",
"base_image_publisher": "MicrosoftWindowsServer",
"base_image_offer": "windowsserver2022",
"base_image_sku": "2022-Datacenter-Core-smalldisk",
"windows_image_name": "windows-2022-containerd",
"base_image_version": "20348.4773.260206",
Expand Down
Loading