gcloud beta notebooks instances create Stay organized with collections Save and categorize content based on your preferences.
- NAME
- gcloud beta notebooks instances create - request for creating an instance
- SYNOPSIS
gcloud beta notebooks instances create(INSTANCE:--location=LOCATION)[--async][--instance-owners=INSTANCE_OWNERS][--labels=[KEY=VALUE,…]][--machine-type=MACHINE_TYPE; default="n1-standard-1"][--metadata=[KEY=VALUE,…]][--post-startup-script=POST_STARTUP_SCRIPT][--service-account=SERVICE_ACCOUNT][--no-shielded-integrity-monitoring][--shielded-secure-boot][--no-shielded-vtpm][--tags=[TAGS,…]][--accelerator-core-count=ACCELERATOR_CORE_COUNT--accelerator-type=ACCELERATOR_TYPE][--boot-disk-size=BOOT_DISK_SIZE--boot-disk-type=BOOT_DISK_TYPE][[--container-repository=CONTAINER_REPOSITORY:--container-tag=CONTAINER_TAG] | [--environment=ENVIRONMENT:--environment-location=ENVIRONMENT_LOCATION] |--vm-image-project=VM_IMAGE_PROJECT; default="deeplearning-platform-release"--vm-image-family=VM_IMAGE_FAMILY; default="common-cpu" |--vm-image-name=VM_IMAGE_NAME][--custom-gpu-driver-path=CUSTOM_GPU_DRIVER_PATH--install-gpu-driver][--data-disk-size=DATA_DISK_SIZE--data-disk-type=DATA_DISK_TYPE--no-remove-data-disk][--disk-encryption=DISK_ENCRYPTION[--kms-key=KMS_KEY:--kms-keyring=KMS_KEYRING--kms-location=KMS_LOCATION--kms-project=KMS_PROJECT]][--network=NETWORK--no-proxy-access--no-public-ip[--subnet=SUBNET:--subnet-region=SUBNET_REGION]][--reservation=RESERVATION--reservation-affinity=RESERVATION_AFFINITY; default="TYPE_UNSPECIFIED"][GCLOUD_WIDE_FLAG …]
- DESCRIPTION
(BETA)(DEPRECATED)This command is deprecated. Pleaseusegcloud notebooksinstead.Request for creating notebook instances.- EXAMPLES
- To create an instance from an environment, run:
gcloudbetanotebooksinstancescreateexample-instance--environment=example-env--environment-location=us-central1-a--machine-type=n1-standard-4--location=us-central1-bTo create an instance from a VmImage family, run:
gcloudbetanotebooksinstancescreateexample-instance--vm-image-project=deeplearning-platform-release--vm-image-family=caffe1-latest-cpu-experimental--machine-type=n1-standard-4--location=us-central1-bTo create an instance from a VmImage name, run:
gcloudbetanotebooksinstancescreateexample-instance--vm-image-project=deeplearning-platform-release--vm-image-name=tf2-2-1-cu101-notebooks-20200110--machine-type=n1-standard-4--location=us-central1-bTo create an instance from a Container Repository, run:
gcloudbetanotebooksinstancescreateexample-instance--container-repository=gcr.io/deeplearning-platform-release/base-cpu--container-tag=test-tag--machine-type=n1-standard-4--location=us-central1-b - POSITIONAL ARGUMENTS
- Instance resource - User-defined unique name of this instance. The instance namemust be 1 to 63 characters long and contain only lowercase letters, numericcharacters, and dashes. The first character must be a lowercase letter and thelast character cannot be a dash. The arguments in this group can be used tospecify the attributes of this resource. (NOTE) Some attributes are not givenarguments in this group but can be set in other ways.
To set the
projectattribute:- provide the argument
instanceon the command line with a fullyspecified name; - provide the argument
--projecton the command line; - set the property
core/project.
This must be specified.
INSTANCE- ID of the instance or fully qualified identifier for the instance.
To set the
instanceattribute:- provide the argument
instanceon the command line.
This positional argument must be specified if any of the other arguments in thisgroup are specified.
- provide the argument
--location=LOCATION- Google Cloud location of this environmenthttps://cloud.google.com/compute/docs/regions-zones/#locations.
To set the
locationattribute:- provide the argument
instanceon the command line with a fullyspecified name; - provide the argument
--locationon the command line; - set the property
notebooks/location.
- provide the argument
- provide the argument
- Instance resource - User-defined unique name of this instance. The instance namemust be 1 to 63 characters long and contain only lowercase letters, numericcharacters, and dashes. The first character must be a lowercase letter and thelast character cannot be a dash. The arguments in this group can be used tospecify the attributes of this resource. (NOTE) Some attributes are not givenarguments in this group but can be set in other ways.
- FLAGS
--async- Return immediately, without waiting for the operation in progress to complete.
--instance-owners=INSTANCE_OWNERS- The owners of this instance after creation.Format:
alias@example.com. Currently supports one owner only.If notspecified, all of the service account users of the VM instance's service accountcan use the instance. --labels=[KEY=VALUE,…]- Labels to apply to this instance. These can be later modified by the setLabelsmethod.
--machine-type=MACHINE_TYPE; default="n1-standard-1"- TheComputeEngine machine type of this instance.
--metadata=[KEY=VALUE,…]- Custom metadata to apply to this instance.
For example, to specify a Cloud Storage bucket for automatic backup, you can usethe
gcs-data-bucketmetadata tag. Format:"--metadata=gcs-data-bucket=BUCKET". --post-startup-script=POST_STARTUP_SCRIPT- Path to a Bash script that automatically runs after a notebook instance fullyboots up. The path must be a URL or Cloud Storage path(gs://
path-to-file/file-name). --service-account=SERVICE_ACCOUNT- The service account on this instance, giving access to other Google Cloudservices. You can use any service account within the same project, but you musthave the service account user permission to use the instance. If not specified,theComputeEngine default service account is used.
--shielded-integrity-monitoring- Enable monitoring of the boot integrity of the instance. Enabled by default, use
--no-shielded-integrity-monitoringto disable. --shielded-secure-boot- Boot instance with secure boot enabled. Disabled by default.
--shielded-vtpm- Boot instance with TPM (Trusted Platform Module) enabled. Enabled by default,use
--no-shielded-vtpmto disable. --tags=[TAGS,…]- Tags to apply to this instance.
- The hardware accelerator used on this instance. If you use accelerators, makesure that your configuration hasenoughvCPUs and memory to support the `machine_type` you have selected.
--accelerator-core-count=ACCELERATOR_CORE_COUNT- Count of cores of this accelerator.
--accelerator-type=ACCELERATOR_TYPE- Type of this accelerator.
ACCELERATOR_TYPEmust be oneof:NVIDIA_TESLA_A100,NVIDIA_TESLA_K80,NVIDIA_TESLA_P100,NVIDIA_TESLA_V100,NVIDIA_TESLA_P4,NVIDIA_TESLA_T4,NVIDIA_TESLA_T4_VWS,NVIDIA_TESLA_P100_VWS,NVIDIA_TESLA_P4_VWS,TPU_V2,TPU_V3,NVIDIA_L4,NVIDIA_H100_80GB,NVIDIA_H100_MEGA_80GB.
- Boot disk configurations.
--boot-disk-size=BOOT_DISK_SIZE- Size of boot disk in GB attached to this instance, up to a maximum of 64000 GB(64 TB). The minimum recommended value is 100 GB. If not specified, thisdefaults to 100.
--boot-disk-type=BOOT_DISK_TYPE- Type of boot disk attached to this instance, defaults to standard persistentdisk (
PD_STANDARD).BOOT_DISK_TYPEmust beone of:PD_STANDARD,PD_SSD,PD_BALANCED,PD_EXTREME.
- At most one of these can be specified:
--container-repository=CONTAINER_REPOSITORY- The path to the container image repository. For example:gcr.io/
{project_id}/{image_name}.This flag argument must be specified if any of the other arguments in this groupare specified.
--container-tag=CONTAINER_TAG- The tag of the container image. If not specified, this defaults to the latesttag.
- Environment resource - User-defined unique name of this environment. Theenvironment name must be 1 to 63 characters long and contain only lowercaseletters, numeric characters, and dashes. The first character must be a lowercaseletter and the last character cannot be a dash. The arguments in this group canbe used to specify the attributes of this resource. (NOTE) Some attributes arenot given arguments in this group but can be set in other ways.
To set the
projectattribute:- provide the argument
--environmenton the command line with a fullyspecified name; - provide the argument
--projecton the command line; - set the property
core/project.
--environment=ENVIRONMENT- ID of the environment or fully qualified identifier for the environment.
To set the
environmentattribute:- provide the argument
--environmenton the command line.
This flag argument must be specified if any of the other arguments in this groupare specified.
- provide the argument
--environment-location=ENVIRONMENT_LOCATION- Google Cloud location of this environmenthttps://cloud.google.com/compute/docs/regions-zones/#locations.
To set the
environment-locationattribute:- provide the argument
--environmenton the command line with a fullyspecified name; - provide the argument
--environment-locationon the command line; - provide the argument
--locationon the command line; - set the property
notebooks/location.
- provide the argument
- provide the argument
--vm-image-project=VM_IMAGE_PROJECT; default="deeplearning-platform-release"- The ID of the Google Cloud project that this VM image belongs to. Format:projects/
{project_id}. - At most one of these can be specified:
--vm-image-family=VM_IMAGE_FAMILY; default="common-cpu"- Use this VM image family to find the image; the newest image in this family willbe used.
--vm-image-name=VM_IMAGE_NAME- Use this VM image name to find the image.
- GPU driver configurations.
--custom-gpu-driver-path=CUSTOM_GPU_DRIVER_PATH- Specify a custom Cloud Storage path where the GPU driver is stored. If notspecified, we'll automatically choose from official GPU drivers.
--install-gpu-driver- Whether the end user authorizes Google Cloud to install a GPU driver on thisinstance. If this field is empty or set to false, the GPU driver won't beinstalled. Only applicable to instances with GPUs.
- Data disk configurations.
--data-disk-size=DATA_DISK_SIZE- Size of data disk in GB attached to this instance, up to a maximum of 64000 GB(64 TB). The minimum recommended value is 100 GB. If not specified, thisdefaults to 100.
--data-disk-type=DATA_DISK_TYPE- Type of data disk attached to this instance, defaults to standard persistentdisk (
PD_STANDARD).DATA_DISK_TYPEmust beone of:PD_STANDARD,PD_SSD,PD_BALANCED,PD_EXTREME. --no-remove-data-disk- If true, the data disk will not be auto deleted when deleting the instance.
- Disk encryption configurations.
--disk-encryption=DISK_ENCRYPTION- Disk encryption method used on the boot disk, defaults to GMEK.
DISK_ENCRYPTIONmust be one of:GMEK,CMEK. - Key resource - The Cloud KMS (Key Management Service) cryptokey that will beused to protect the instance. The 'Compute Engine Service Agent' service accountmust hold permission 'Cloud KMS CryptoKey Encrypter/Decrypter'. The arguments inthis group can be used to specify the attributes of this resource.
--kms-key=KMS_KEY- ID of the key or fully qualified identifier for the key.
To set the
kms-keyattribute:- provide the argument
--kms-keyon the command line.
This flag argument must be specified if any of the other arguments in this groupare specified.
- provide the argument
--kms-keyring=KMS_KEYRING- The KMS keyring of the key.
To set the
kms-keyringattribute:- provide the argument
--kms-keyon the command line with a fullyspecified name; - provide the argument
--kms-keyringon the command line.
- provide the argument
--kms-location=KMS_LOCATION- The Google Cloud location for the key.
To set the
kms-locationattribute:- provide the argument
--kms-keyon the command line with a fullyspecified name; - provide the argument
--kms-locationon the command line.
- provide the argument
--kms-project=KMS_PROJECT- The Google Cloud project for the key.
To set the
kms-projectattribute:- provide the argument
--kms-keyon the command line with a fullyspecified name; - provide the argument
--kms-projecton the command line; - set the property
core/project.
- provide the argument
- Network configs.
- Network resource - The name of the VPC that this instance is in. Format:projects/
{project_id}/global/networks/{network_id}.This represents a Cloud resource. (NOTE) Some attributes are not given argumentsin this group but can be set in other ways.To set the
projectattribute:- provide the argument
--networkon the command line with a fullyspecified name; - provide the argument
--projecton the command line; - set the property
core/project.
--network=NETWORK- ID of the network or fully qualified identifier for the network.
To set the
networkattribute:- provide the argument
--networkon the command line.
- provide the argument
- provide the argument
--no-proxy-access- If true, the notebook instance will not register with the proxy.
--no-public-ip- If specified, no public IP will be assigned to this instance.
- Subnetwork resource - The name of the subnet that this instance is in. Format:projects/
{project_id}/regions/{region}/subnetworks/{subnetwork_id}.The arguments in this group can be used to specify the attributes of thisresource. (NOTE) Some attributes are not given arguments in this group but canbe set in other ways.To set the
projectattribute:- provide the argument
--subneton the command line with a fullyspecified name; - provide the argument
--projecton the command line; - set the property
core/project.
--subnet=SUBNET- ID of the subnetwork or fully qualified identifier for the subnetwork.
To set the
subnetattribute:- provide the argument
--subneton the command line.
This flag argument must be specified if any of the other arguments in this groupare specified.
- provide the argument
--subnet-region=SUBNET_REGION- Google Cloud region of this subnetworkhttps://cloud.google.com/compute/docs/regions-zones/#locations.
To set the
subnet-regionattribute:- provide the argument
--subneton the command line with a fullyspecified name; - provide the argument
--subnet-regionon the command line.
- provide the argument
- provide the argument
- Network resource - The name of the VPC that this instance is in. Format:projects/
- Specifies the reservation for the instance.
--reservation=RESERVATION- The name of the reservation, required when
--reservation-affinity=SPECIFIC_RESERVATION. --reservation-affinity=RESERVATION_AFFINITY; default="TYPE_UNSPECIFIED"- The type of reservation for the instance.
RESERVATION_AFFINITYmust be one of:TYPE_UNSPECIFIED,NO_RESERVATION,ANY_RESERVATION,SPECIFIC_RESERVATION.
- GCLOUD WIDE FLAGS
- These flags are available to all commands:
--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 helpfor details. - NOTES
- This command is currently in beta and might change without notice. Thesevariants are also available:
gcloudnotebooksinstancescreategcloudalphanotebooksinstancescreate
Except as otherwise noted, the content of this page is licensed under theCreative Commons Attribution 4.0 License, and code samples are licensed under theApache 2.0 License. For details, see theGoogle Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2025-05-13 UTC.