Merge pull request #2827 from flatcar/chewi/hyper-v-gen2

ci-automation: Set the right parameters for Hyper-V Gen 1/2 on Azure
This commit is contained in:
James Le Cuirot 2025-04-15 11:52:34 +01:00 committed by GitHub
commit 3ae29b1564
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -28,18 +28,20 @@ else
rm "${AZURE_IMAGE_NAME}.bz2" rm "${AZURE_IMAGE_NAME}.bz2"
fi fi
if [[ "${CIA_ARCH}" == "arm64" ]]; then
AZURE_USE_GALLERY="--azure-use-gallery"
fi
run_kola_tests() { run_kola_tests() {
local instance_type="${1}"; shift local instance_type="${1}"; shift
local instance_tapfile="${1}"; shift local instance_tapfile="${1}"; shift
local hyperv_gen="V2" local hyperv_gen sku
if [ "${instance_type}" = "V1" ]; then if [ "${instance_type}" = "V1" ]; then
hyperv_gen="V1" hyperv_gen="V1"
instance_type="${azure_instance_type}" sku="alpha"
# v5 is the last to support Gen 1. Only amd64 uses Gen 1.
instance_type="Standard_D2s_v5"
else
hyperv_gen="V2"
sku="alpha-gen2"
set -- --azure-use-gallery "${@}"
fi fi
# Align timeout with ore azure gc --duration parameter # Align timeout with ore azure gc --duration parameter
@ -54,6 +56,7 @@ run_kola_tests() {
--azure-location="${AZURE_LOCATION}" \ --azure-location="${AZURE_LOCATION}" \
--tapfile="${instance_tapfile}" \ --tapfile="${instance_tapfile}" \
--azure-size="${instance_type}" \ --azure-size="${instance_type}" \
--azure-sku="${sku}" \
--azure-hyper-v-generation="${hyperv_gen}" \ --azure-hyper-v-generation="${hyperv_gen}" \
${AZURE_USE_GALLERY} \ ${AZURE_USE_GALLERY} \
${AZURE_KOLA_VNET:+--azure-kola-vnet=${AZURE_KOLA_VNET}} \ ${AZURE_KOLA_VNET:+--azure-kola-vnet=${AZURE_KOLA_VNET}} \