A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://cloud.google.com/compute/docs/gpus/create-gpu-vm-bulk below:

Create GPU VMs in bulk | Compute Engine Documentation

Create GPU VMs in bulk

Stay organized with collections Save and categorize content based on your preferences.

Linux Windows

You can create a group of virtual machines (VMs) that

have attached graphical processing units (GPUs)

by using the bulk creation process. With the bulk creation process, you get upfront validation where the request fails fast if it is not feasible. Also, if you use the region flag, the bulk creation API automatically chooses the zone that has the capacity to fulfill the request.

To learn more about bulk creation, see About bulk creation of VMs. To learn more about creating VMs with attached GPUs, see Overview of creating an instance with attached GPUs.

Before you begin Required roles

To get the permissions that you need to create VMs, ask your administrator to grant you the Compute Instance Admin (v1) (roles/compute.instanceAdmin.v1) IAM role on the project. For more information about granting roles, see Manage access to projects, folders, and organizations.

This predefined role contains the permissions required to create VMs. To see the exact permissions that are required, expand the Required permissions section:

Required permissions

The following permissions are required to create VMs:

You might also be able to get these permissions with custom roles or other predefined roles.

Overview

When creating VMs with attached GPUs using the bulk creation method, you can choose to create VMs in a region (such as us-central1) or in a specific zone such as (us-central1-a).

If you choose to specify a region, Compute Engine places the VMs in any zone within the region that supports GPUs.

Machine types

The accelerator-optimized machine family contains multiple machine types.

Each accelerator-optimized machine type has a specific model of NVIDIA GPUs attached. If you have graphics-intensive workloads, such as 3D visualization, you can also create virtual workstations that use NVIDIA RTX Virtual Workstations (vWS). NVIDIA RTX Virtual Workstation is available for some GPU models.

Machine type GPU model NVIDIA RTX Virtual Workstation (vWS) model A4X NVIDIA GB200 Grace Blackwell Superchips (nvidia-gb200).

Each Superchip contains four NVIDIA B200 Blackwell GPUs.

A4 NVIDIA B200 Blackwell GPUs (nvidia-b200) A3 Ultra NVIDIA H200 SXM GPUs (nvidia-h200-141gb) A3 Mega NVIDIA H100 SXM GPUs (nvidia-h100-mega-80gb) A3 High, A3 Edge NVIDIA H100 SXM GPUs (nvidia-h100-80gb) A2 Ultra NVIDIA A100 80GB GPUs (nvidia-a100-80gb) A2 Standard NVIDIA A100 40GB GPUs (nvidia-a100-40gb) G4 (Preview) NVIDIA RTX PRO 6000 Blackwell Server Edition (nvidia-rtx-pro-6000) G2 NVIDIA L4 GPUs (nvidia-l4) NVIDIA L4 Virtual Workstation GPUs (nvidia-l4-vws) Create groups of A3, A2, and G2 VMs

This section explains you can create instances in bulk for the A3 High, A3 Mega, A3 Edge, A2, and G2 machine series by using Google Cloud CLI, or REST.

gcloud

To create a group of VMs, use the gcloud compute instances bulk create command. For more information about the parameters and how to use this command, see Create VMs in bulk.

The following optional flags are shown in the example command:

Example

This example creates two VMs that have attached GPUs by using the following specifications:

gcloud compute instances bulk create \
    --name-pattern="my-test-vm-#" \
    --region=REGION \
    --count=2 \
    --machine-type=MACHINE_TYPE \
    --boot-disk-size=200 \
    --image=IMAGE \
    --image-project=IMAGE_PROJECT \
    --on-host-maintenance=TERMINATE \
    [--provisioning-model=SPOT] \
    [--accelerator=type=nvidia-l4-vws,count=VWS_ACCELERATOR_COUNT]

Replace the following:

If successful, the output is similar to the following:

NAME          ZONE
my-test-vm-1  us-central1-b
my-test-vm-2  us-central1-b
Bulk create request finished with status message: [VM instances created: 2, failed: 0.]
REST

Use the instances.bulkInsert method with the required parameters to create multiple VMs in a zone. For more information about the parameters and how to use this command, see Create VMs in bulk.

Example

This example creates two VMs that have attached GPUs by using the following specifications:

Replace the following:

Additional settings:

Create groups of N1-general purpose VMs

You create a group of VMs with attached GPUs by using either the Google Cloud CLI, or REST.

This section describes how to create multiple VMs using the following GPU types:

NVIDIA GPUs:

NVIDIA RTX Virtual Workstation (vWS) (formerly known as NVIDIA GRID):

gcloud

To create a group of VMs, use the gcloud compute instances bulk create command. For more information about the parameters and how to use this command, see Create VMs in bulk.

Example

The following example creates two VMs with attached GPUs using the following specifications:

gcloud compute instances bulk create \
    --name-pattern="my-test-vm-#" \
    --count=2 \
    --region=us-central1 \
    --machine-type=n1-standard-2 \
    --accelerator type=nvidia-tesla-t4,count=2 \
    --boot-disk-size=200 \
    --metadata="install-nvidia-driver=True" \
    --scopes="https://www.googleapis.com/auth/cloud-platform" \
    --image=pytorch-latest-gpu-v20211028-debian-10 \
    --image-project=deeplearning-platform-release \
    --on-host-maintenance=TERMINATE --restart-on-failure

If successful, the output is similar to the following:

NAME          ZONE
my-test-vm-1  us-central1-b
my-test-vm-2  us-central1-b
Bulk create request finished with status message: [VM instances created: 2, failed: 0.]
REST

Use the instances.bulkInsert method with the required parameters to create multiple VMs in a zone. For more information about the parameters and how to use this command, see Create VMs in bulk.

Example

The following example creates two VMs with attached GPUs using the following specifications:

Replace PROJECT_ID with your project ID.

POST https://compute.googleapis.com/compute/v1/projects/PROJECT_ID/regions/us-central1/instances/bulkInsert

{
    "namePattern":"my-test-vm-#",
    "count":"2",
    "instanceProperties": {
      "machineType":"n1-standard-2",
      "disks":[
        {
          "type":"PERSISTENT",
          "initializeParams":{
            "diskSizeGb":"200",
            "sourceImage":"projects/deeplearning-platform-release/global/images/pytorch-latest-gpu-v20211028-debian-10"
          },
          "boot":true
        }
      ],
      "name": "default",
      "networkInterfaces":
      [
        {
          "network": "projects/PROJECT_ID/global/networks/default"
        }
      ],
      "guestAccelerators":
      [
        {
          "acceleratorCount": 2,
          "acceleratorType": "nvidia-tesla-t4"
        }
      ],
      "scheduling":{
        "onHostMaintenance":"TERMINATE",
        "automaticRestart":true
      },
      "metadata":{
        "items":[
          {
            "key":"install-nvidia-driver",
            "value":"True"
          }
        ]
      }
  }
 }
What's next?

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 2025-08-11 UTC.

[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-11 UTC."],[[["You can efficiently create groups of virtual machines (VMs) with attached graphical processing units (GPUs) using a bulk creation process, which provides upfront validation and automatically selects zones with sufficient capacity."],["The bulk creation process is available through either the Google Cloud CLI or REST API, and offers support for various accelerator-optimized machine types including A3, A2, and G2, as well as N1-general purpose VMs."],["Using the bulk creation process allows for the flexibility of specifying the region, machine type, operating system image, and optionally setting VMs as Spot VMs to reduce costs, but the chosen region must be compatible with the selected GPU model."],["Certain GPU-equipped machine types, specifically the A3, A2, and G2 series, have specific limitations regarding discounts, regions/zones, CPU platforms, disk types, and the ability to change machine types or run Windows operating systems, so you should verify their features and capabilities before implementation."],["To create the VMs, certain roles and permissions are required, such as the Compute Instance Admin (v1) role, which includes the necessary permissions like `compute.instances.create`, and additional permissions to utilize custom images, snapshots, templates, networks, or specific disk operations."]]],[]]


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4