aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlistair Delva <adelva@google.com>2022-08-01 14:16:24 -0700
committerAlistair Delva <adelva@google.com>2022-08-02 12:45:41 -0700
commit16c1ae8d46644e4f7b77f01f20335eb236d6febc (patch)
tree7f8cef84c9af0c188821d7520987ed94659ffd5a
parent77941573636d1bc4ba80425430289e1f83a4276b (diff)
downloadcuttlefish_vmm-16c1ae8d46644e4f7b77f01f20335eb236d6febc.tar.gz
Prepare for arm64
- Remove enable-vmx nanny flag, as we do not need it for builders. - Remove Intel Skylake requirement, as it is not required for builders. - Remove --gce_source_image_family and --gce_source_image_project flags as the internal scripts are tuned to the host distro and it doesn't make sense for these to be command-line tunable. - Switch from virtio-net to GVNIC to align x86/arm64. - Downgrade to n1-standard-4 by default, as t2a won't give you larger instances in most zones. This can still be overridden back with the new --gce_vcpus option. Bug: 216827224 Change-Id: Iac88ccc95ab5a296f209bffb9e1e94e851ef0aa7
-rwxr-xr-xrebuild.sh14
1 files changed, 6 insertions, 8 deletions
diff --git a/rebuild.sh b/rebuild.sh
index f4522c7..a91f160 100755
--- a/rebuild.sh
+++ b/rebuild.sh
@@ -35,10 +35,9 @@ DEFINE_string docker_uid "${UID}" "Docker-container user ID"
DEFINE_boolean gce false "Build on a GCE instance"
DEFINE_string gce_project "$(gcloud config get-value project)" "Project to use" "p"
-DEFINE_string gce_source_image_family debian-11 "Image familty to use as the base" "s"
-DEFINE_string gce_source_image_project debian-cloud "Project holding the base image" "m"
DEFINE_string gce_instance "${USER}-build" "Instance name to create for the build" "i"
DEFINE_string gce_user cuttlefish_crosvm_builder "User name to use on GCE when doing the build"
+DEFINE_integer gce_vcpus 4 "Instance size (vcpus) to create"
DEFINE_string gce_zone "$(gcloud config get-value compute/zone)" "Zone to use" "z"
# Common options
@@ -193,20 +192,19 @@ function build_on_gce() {
gcloud compute disks create \
"${delete_instances[@]/%/-disk}" \
"${project_zone_flags[@]}" \
- --image-project="${FLAGS_gce_source_image_project}" \
- --image-family="${FLAGS_gce_source_image_family}"
+ --image-project="debian-cloud" \
+ --image-family="debian-11"
gcloud compute images create \
"${delete_instances[@]/%/-image}" \
--source-disk "${delete_instances[@]/%/-disk}" \
- --project "${FLAGS_gce_project}" --source-disk-zone "${FLAGS_gce_zone}" \
- --licenses "https://www.googleapis.com/compute/v1/projects/vm-options/global/licenses/enable-vmx"
+ --project "${FLAGS_gce_project}" --source-disk-zone "${FLAGS_gce_zone}"
gcloud compute instances create \
"${delete_instances[@]}" \
"${project_zone_flags[@]}" \
--image "${delete_instances[@]/%/-image}" \
--boot-disk-size=200GB \
- --machine-type=n1-standard-8 \
- --min-cpu-platform "Intel Skylake"
+ --machine-type=n1-standard-"${FLAGS_gce_vcpus}" \
+ --network-interface=nic-type=GVNIC
wait_for_instance "${FLAGS_gce_instance}" "${project_zone_flags[@]}"