gcloud compute tpus tpu-vm create (TPU : --zone=ZONE) --version=VERSION [--async] [--boot-disk=[KEY=VALUE,…]] [--data-disk=[mode=MODE],[source=SOURCE]] [--description=DESCRIPTION] [--internal-ips] [--labels=[KEY=VALUE,…]] [--metadata=[KEY=VALUE,…]] [--metadata-from-file=[KEY=VALUE,…]] [--network=NETWORK; default="default"] [--preemptible] [--queue-count=QUEUE_COUNT] [--range=RANGE] [--reserved] [--scopes=[SCOPES,…]] [--service-account=SERVICE_ACCOUNT] [--shielded-secure-boot] [--spot] [--subnetwork=SUBNETWORK] [--tags=[TAGS,…]] [--accelerator-type=ACCELERATOR_TYPE; default="v2-8" | --topology=TOPOLOGY --type=TYPE] [GCLOUD_WIDE_FLAG …]
my-tpu in the default user project,
network and compute/zone (with other defaults supplied by API), run:
gcloud compute tpus tpu-vm create my-tpugcloud compute tpus tpu-vm create my-tpu --zone=us-central1-a --network=my-tf-network --description='My TPU VM' --version='v2-alpha'To create a small TPU VM v2 pod, run:
gcloud compute tpus tpu-vm create my-tpu --zone=us-central1-a --accelerator-type='v2-32' --description='My TPU VM' --version='v2-alpha'
To set the project attribute:
tpu on the command line with a fully specified
name;
--project on the command line;
core/project.
TPU
To set the tpu attribute:
tpu on the command line.
--zone=ZONEdefault compute/zone.
To set the zone attribute:
tpu on the command line with a fully specified
name;
--zone on the command line;
compute/zone.
--version=VERSION2.3.
For a list of available versions run:
gcloud
compute tpus tpu-vm versions list
--async--boot-disk=[KEY=VALUE,…]gcloud compute tpus tpu-vm create --boot-disk kms-key=<full_kms_key_name_here>kms-key--data-disk=[mode=MODE],[source=SOURCE]This flag must be repeated to provide multiple data disks. For example:
gcloud compute tpus tpu-vm create --data-disk source=projects/my-project/zones/us-central1-c/disks/my-disk,mode=read-onlysourcemode--description=DESCRIPTION--internal-ips--labels=[KEY=VALUE,…]--metadata=[KEY=VALUE,…]--metadata='key1=value1,key2=value2'
--metadata-from-file=[KEY=VALUE,…]--metadata except the value for the entry will be read from
a local file. Example: --metadata-from-file='key1=value1.txt'
--network=NETWORK; default="default"--preemptible--queue-count=QUEUE_COUNT--range=RANGE/29 range, for example 192.168.0.0/29.
Errors will occur if the CIDR range has already been used for a currently
existing TPU, the CIDR range conflicts with any networks in the user's provided
network, or the provided network is peered with another network that is using
that CIDR range.
--reserved--scopes=[SCOPES,…]--service-account=SERVICE_ACCOUNT--shielded-secure-boot--spot--subnetwork=SUBNETWORK--tags=[TAGS,…]--accelerator-type=ACCELERATOR_TYPE; default="v2-8"v2-8.
For a list of available accelerator types run:
gcloud
compute tpus tpu-vm accelerator-types list
Chip based TPU configuration
--topology=TOPOLOGY--type=TYPETYPE must be one of: v2,
v3, v4.
This flag argument must be specified if any of the other arguments in this group
are specified.
--access-token-file,
--account, --billing-project,
--configuration,
--flags-file,
--flatten, --format, --help, --impersonate-service-account,
--log-http,
--project, --quiet, --trace-token, --user-output-enabled,
--verbosity.
Run $ gcloud help for details.
tpu/v2 API. The full documentation for this
API can be found at: https://cloud.google.com/tpu/
gcloud alpha compute tpus tpu-vm create
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2026-05-27 UTC.