@@ -23,6 +23,7 @@ service_account_key=
2323runner_ver=
2424machine_zone=
2525machine_type=
26+ boot_disk_type=
2627disk_size=
2728runner_service_account=
2829image_project=
@@ -44,6 +45,7 @@ while getopts_long :h opt \
4445 runner_ver required_argument \
4546 machine_zone required_argument \
4647 machine_type required_argument \
48+ boot_disk_type optional_argument \
4749 disk_size optional_argument \
4850 runner_service_account optional_argument \
4951 image_project optional_argument \
7981 machine_type)
8082 machine_type=$OPTLARG
8183 ;;
84+ boot_disk_type)
85+ boot_disk_type=${OPTLARG-$boot_disk_type }
86+ ;;
8287 disk_size)
8388 disk_size=${OPTLARG-$disk_size }
8489 ;;
@@ -151,13 +156,15 @@ function start_vm {
151156 image_flag=$( [[ -z " ${image} " ]] || echo " --image=${image} " )
152157 image_family_flag=$( [[ -z " ${image_family} " ]] || echo " --image-family=${image_family} " )
153158 disk_size_flag=$( [[ -z " ${disk_size} " ]] || echo " --boot-disk-size=${disk_size} " )
159+ boot_disk_type_flag=$( [[ -z " ${boot_disk_type} " ]] || echo " --boot-disk-type=${boot_disk_type} " )
154160 preemptible_flag=$( [[ " ${preemptible} " == " true" ]] && echo " --preemptible" || echo " " )
155161 ephemeral_flag=$( [[ " ${ephemeral} " == " true" ]] && echo " --ephemeral" || echo " " )
156162 no_external_address_flag=$( [[ " ${no_external_address} " == " true" ]] && echo " --no-address" || echo " " )
157163
158164 echo " The new GCE VM will be ${VM_ID} "
159165
160166 startup_script="
167+ apt update && apt install -y at && \\
161168 gcloud compute instances add-labels ${VM_ID} --zone=${machine_zone} --labels=gh_ready=0 && \\
162169 RUNNER_ALLOW_RUNASROOT=1 ./config.sh --url https://github.com/${GITHUB_REPOSITORY} --token ${RUNNER_TOKEN} --labels ${VM_ID} --unattended ${ephemeral_flag} --disableupdate && \\
163170 ./svc.sh install && \\
@@ -186,6 +193,7 @@ function start_vm {
186193 gcloud compute instances create ${VM_ID} \
187194 --zone=${machine_zone} \
188195 ${disk_size_flag} \
196+ ${boot_disk_type_flag} \
189197 --machine-type=${machine_type} \
190198 --scopes=${scopes} \
191199 ${service_account_flag} \
0 commit comments