GCLOUD_COMPUTE_INSTANCES_SET-MACHINE-TYPE(1)

NAME

gcloud compute instances set-machine-type - set machine type for Google Compute Engine virtual machines

SYNOPSIS

gcloud compute instances set-machine-type INSTANCE_NAME [--custom-cpu=CUSTOM_CPU] [--custom-extensions] [--custom-memory=CUSTOM_MEMORY] [--machine-type=MACHINE_TYPE] [--zone=ZONE] [GCLOUD_WIDE_FLAG ...]

DESCRIPTION
gcloud compute instances set-machine-type allows you to change the machine type of a virtual machine in the TERMINATED state (that is, a virtual machine instance that has been stopped). For example, if example-instance is a g1-small virtual machine currently in the TERMINATED state, running:
    $ gcloud compute instances set-machine-type example-instance \
        --zone us-central1-b --machine-type n1-standard-4
will change the machine type to n1-standard-4, so that when you next start example-instance, it will be provisioned as an n1-standard-4 instead of a g1-small. See https://cloud.google.com/compute/docs/machine-types for more information on machine types.

POSITIONAL ARGUMENTS

    INSTANCE_NAME
        The name of the instance to operate on.

FLAGS

    --custom-cpu=CUSTOM_CPU
        A whole number value indicating how many cores are desired in the custom machine type. Both --custom-cpu and --custom-memory must be specified if a custom machine type is desired, and the --machine-type flag must be omitted.

    --custom-extensions
        If provided, uses extended custom machine type. Both --custom-cpu and --custom-memory must be specified if --custom-extensions is provided.

    --custom-memory=CUSTOM_MEMORY
        A whole number value indicating how much memory is desired in the custom machine type. A size unit should be provided (eg. 3072MB or 9GB) - if no units are specified, GB is assumed. Both --custom-cpu and --custom-memory must be specified if a custom machine type is desired, and the --machine-type flag must be omitted.

    --machine-type=MACHINE_TYPE
        Specifies the machine type used for the instances. To get a list of available machine types, run 'gcloud compute machine-types list'. Either this flag, --custom-cpu, or --custom-memory must be specified.

    --zone=ZONE
        The zone of the instance to operate on. If not specified, you may be prompted to select a zone. gcloud will attempt to identify the zone by searching for resources in your project. If the zone cannot be determined, you will then be prompted with all Google Cloud Platform zones. To avoid prompting when this flag is omitted, you can set the compute/zone property:
        $ gcloud config set compute/zone ZONE
    A list of zones can be fetched by running:
        $ gcloud compute zones list
    To unset the property, run:
        $ gcloud config unset compute/zone
    Alternatively, the zone can be stored in the environment variable CLOUDSDK_COMPUTE_ZONE.

GCLOUD WIDE FLAGS
These flags are available to all commands: --account, --configuration, --flatten, --format, --help, --log-http, --project, --quiet, --trace-token, --user-output-enabled, --verbosity. Run $ gcloud help for details.