diff options
author | Alistair Delva <adelva@google.com> | 2022-08-01 14:16:24 -0700 |
---|---|---|
committer | Alistair Delva <adelva@google.com> | 2022-08-04 12:38:25 -0700 |
commit | 54ba61fb577f2be4b6cf54ad1b011f194bb737bf (patch) | |
tree | 27d91a9ce167eb5ac2df455262e1bd654519d3e6 | |
parent | 6fdd634071c010ec39b70de2938d87a90a0bcf9a (diff) | |
download | cuttlefish_vmm-54ba61fb577f2be4b6cf54ad1b011f194bb737bf.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-x | rebuild.sh | 14 |
1 files changed, 6 insertions, 8 deletions
@@ -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[@]}" |