However, sometimes we probably want to use --custom-cpu and/or --custom-memory. Using either of those conflicts with using --machine-type. Currently, --machine-type is always invoked:
and if $MACHINE_TYPE is empty, then, prior to the block above, machine type is set to the default MACHINE_TYPE=${MACHINE_TYPE:-"e2-standard-2"} making it impossible to avoid.
Which leads to the following error message (gcloud.compute.instances.create) Invalid value for [--machine-type]: Cannot set both [--machine-type] and [--custom-cpu]/[--custom-memory] for the same instance.
Even though the command used, bash start.sh $GCS_INSTANCE_NAME --server-account $GCS_SERVICE_ACCOUNT --project $GCS_PROJECT --boot-disk-size=200GB --custom-memory 64G --custom-cpu 6, did not use the flag --machine-type
For the most part, this is not critical, but could be nice to be add the ability to customize those parameters.
The vanilla approach to launch a VM is as follows:
bash start.sh $GCS_INSTANCE_NAME --server-account $GCS_SERVICE_ACCOUNT --project $GCS_PROJECT --boot-disk-size=50GB --boot-disk-type=pd-standard --machine-type=e2-standard-2
However, sometimes we probably want to use
--custom-cpu
and/or--custom-memory
. Using either of those conflicts with using--machine-type
. Currently,--machine-type
is always invoked:and if
$MACHINE_TYPE
is empty, then, prior to the block above, machine type is set to the defaultMACHINE_TYPE=${MACHINE_TYPE:-"e2-standard-2"}
making it impossible to avoid.Which leads to the following error message
(gcloud.compute.instances.create) Invalid value for [--machine-type]: Cannot set both [--machine-type] and [--custom-cpu]/[--custom-memory] for the same instance.
Even though the command used,
bash start.sh $GCS_INSTANCE_NAME --server-account $GCS_SERVICE_ACCOUNT --project $GCS_PROJECT --boot-disk-size=200GB --custom-memory 64G --custom-cpu 6
, did not use the flag--machine-type
For the most part, this is not critical, but could be nice to be add the ability to customize those parameters.