@@ -74,19 +74,22 @@ function cleanup() {
7474trap cleanup EXIT
7575capture_benchmark " ${SCRIPT_NAME} _set_variables_and_create_scan_resource_group"
7676
77- VM_OPTIONS=" --size Standard_D8ds_v5"
77+ VM_SIZE=" Standard_D8ds_v5"
78+ VM_OPTIONS=" --size $VM_SIZE "
7879# shellcheck disable=SC3010
7980if [[ " ${ARCHITECTURE,,} " == " arm64" ]]; then
80- VM_OPTIONS=" --size Standard_D8pds_v5"
81+ VM_SIZE=" Standard_D8pds_v5"
82+ VM_OPTIONS=" --size $VM_SIZE "
8183fi
8284
8385if [ " ${OS_TYPE} " = " Linux" ] && [ " ${ENABLE_TRUSTED_LAUNCH} " = " True" ]; then
8486 VM_OPTIONS+=" --security-type TrustedLaunch --enable-secure-boot true --enable-vtpm true"
8587fi
8688
8789if [ " ${OS_TYPE} " = " Linux" ] && grep -q " cvm" <<< " $FEATURE_FLAGS" ; then
90+ VM_SIZE=" Standard_DC8ads_v5"
8891 # We completely re-assign the VM_OPTIONS string here to ensure that no artifacts from earlier conditionals are included
89- VM_OPTIONS=" --size Standard_DC8ads_v5 --security-type ConfidentialVM --enable-secure-boot true --enable-vtpm true --os-disk-security-encryption-type VMGuestStateOnly --specialized true"
92+ VM_OPTIONS=" --size $VM_SIZE --security-type ConfidentialVM --enable-secure-boot true --enable-vtpm true --os-disk-security-encryption-type VMGuestStateOnly --specialized true"
9093fi
9194
9295# GB200 specific VM options for scanning (uses standard ARM64 VM for now)
@@ -110,7 +113,7 @@ if [ "${OS_SKU}" = "Ubuntu" ] && [ "${OS_VERSION}" = "22.04" ] && [ "$(printf %s
110113
111114 # Register FIPS feature and create VM using REST API
112115 ensure_fips_feature_registered
113- create_fips_vm
116+ create_fips_vm " $VM_SIZE "
114117else
115118 echo " Creating VM using standard az vm create command..."
116119
0 commit comments