Skip to content

Commit

Permalink
Merge pull request #474 from snir911/backport472-1.8
Browse files Browse the repository at this point in the history
backport: azure: use RHEL 9.4 as base image
  • Loading branch information
gkurz authored Nov 7, 2024
2 parents 87783b7 + ac2f4d5 commit 4cac765
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 28 deletions.
8 changes: 4 additions & 4 deletions config/peerpods/podvm/azure-podvm-image-cm.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,10 @@ data:
IMAGE_DEFINITION_VM_GENERATION: "V2"
IMAGE_DEFINITION_ARCHITECTURE: "x64"

# Base image
BASE_IMAGE_SKU: "93_gen2" # this is default for V2 image generation
# base image - should be coordinated with IMAGE_DEFINITION_VM_GENERATION
BASE_IMAGE_PUBLISHER: "redhat"
BASE_IMAGE_OFFER: "RHEL"
BASE_IMAGE_SKU: "94_gen2"

# Image
IMAGE_BASE_NAME: "podvm-image"
Expand All @@ -46,8 +48,6 @@ data:
INSTALL_PACKAGES: "no"
DOWNLOAD_SOURCES: "no"
CONFIDENTIAL_COMPUTE_ENABLED: "no"
# snp/tdx
CONFIDENTIAL_COMPUTE_TYPE: "snp"
DISABLE_CLOUD_CONFIG: "true"
ENABLE_NVIDIA_GPU: "no"
UPDATE_PEERPODS_CM: "yes"
Expand Down
25 changes: 1 addition & 24 deletions config/peerpods/podvm/azure-podvm-image-handler.sh
Original file line number Diff line number Diff line change
Expand Up @@ -249,30 +249,7 @@ function create_image_using_packer() {
set_image_version_and_name
# Set the base image details

if [[ "${PODVM_DISTRO}" == "rhel" ]]; then
export BASE_IMAGE_PUBLISHER="redhat"
export BASE_IMAGE_OFFER="rhel-raw"

# If CONFIDENTIAL_COMPUTE_ENABLED is set to yes, then force IMAGE_DEFINITION_VM_GENERATION to V2
[[ "${CONFIDENTIAL_COMPUTE_ENABLED}" == "yes" ]] &&
export IMAGE_DEFINITION_VM_GENERATION="V2"

# If CONFIDENTIAL_COMPUTE_ENABLED is set to yes, CONFIDENTIAL_COMPUTE_TYPE is snp and BASE_IMAGE_SKU is not set,
# then set BASE_IMAGE_SKU to 9_3_cvm_sev_snp
[[ "${CONFIDENTIAL_COMPUTE_ENABLED}" == "yes" && "${CONFIDENTIAL_COMPUTE_TYPE}" == "snp" && -z "${BASE_IMAGE_SKU}" ]] &&
export BASE_IMAGE_OFFER="rhel-cvm" && export BASE_IMAGE_SKU="9_3_cvm_sev_snp"

# If CONFIDENTIAL_COMPUTE_ENABLED is set to yes, CONFIDENTIAL_COMPUTE_TYPE is tdx and BASE_IMAGE_SKU is not set,
# then set BASE_IMAGE_SKU to rhel93_tdxpreview
[[ "${CONFIDENTIAL_COMPUTE_ENABLED}" == "yes" && "${CONFIDENTIAL_COMPUTE_TYPE}" == "tdx" && -z "${BASE_IMAGE_SKU}" ]] &&
export BASE_IMAGE_OFFER="rhel_test_offers" && export BASE_IMAGE_SKU="rhel93_tdxpreview"

# If VM_GENERATION is V1 and BASE_IMAGE_SKU is not set, then set BASE_IMAGE_SKU to 9_3
[[ "${IMAGE_DEFINITION_VM_GENERATION}" == "V1" && -z "${BASE_IMAGE_SKU}" ]] &&
export BASE_IMAGE_SKU="9_3"
else
# TBD Add support for other distros
# Error out if the distro is not supported
if [[ "${PODVM_DISTRO}" != "rhel" ]]; then
error_exit "Unsupported distro"
fi

Expand Down

0 comments on commit 4cac765

Please sign in to comment.