---
title: "Creates multiple VMs in the project and returns the async operation."
method: POST
path: "/projects/{project_id}/compute/vms/bulk-instances"
tags: ["VMs"]
---

# Creates multiple VMs in the project and returns the async operation.

`POST /projects/{project_id}/compute/vms/bulk-instances`

## Path parameters

- `project_id` string, required

## Request body

- BulkInstancePostRequestV1
  - `count` integer, required — Number of VMs to create. If multiple locations are specified, this is the number of VMs created in each location.
  - `crusoe_watch_agent_install_mode` 'docker' | 'native' — Installation mode for the Crusoe Watch Agent: docker or native. Defaults to docker.
  - `install_crusoe_watch_agent` boolean, nullable — Whether to install the Crusoe Watch Agent on the VMs. Defaults to true.
  - `instance_group_id` string — ID of the instance group the VMs will be created in.
  - `instance_template` InstanceTemplatePostRequestV1
    - `custom_image_name` string — Custom image to use for all VMs created from this instance template. Only one of Image or CustomImage should be supplied at once.
    - `disks` DiskTemplate[] — Disks to attach to all VMs created from this instance template.
      - `size` string, required — Size of the disk, including a unit suffix.
      - `type` 'persistent-ssd' | 'shared-volume', required — Type of disk to create: persistent-ssd or shared-volume.
    - `ib_partition_id` string — Deprecated: Use transport_partition_id instead.
    - `image_name` string — OS Image to use for all VMs created from this instance template.
    - `location` string — Location to use for all VMs created from this instance template. If provided, all location-specific resources must also be provided.
    - `maintenance_policy` string — Host maintenance policy controlling how VMs created from this instance template behave during host maintenance.
    - `nvlink_domain_id` string — NVLink domain to assign to all VMs created from this instance template.
    - `placement_policy` string — Placement policy controlling how VMs created from this instance template are distributed across hosts: spread or unspecified.
    - `public_ip_address_type` string — Public IP address type to use for all VMs created from this instance template. Must either be "static" or "dynamic".
    - `reservation_id` string — Reservation to use for all VMs created from this instance template.
    - `shutdown_script` string — Shutdown script to use for all VMs created from this instance template.
    - `ssh_public_key` string, required — SSH public key to use for all VMs created from this instance template.
    - `startup_script` string — Startup script to use for all VMs created from this instance template.
    - `subnet_id` string — Subnet to use for all VMs created from this instance template. This is location-specific and must be provided if location is provided.
    - `template_name` string, required — Name of the instance template. (This is not the name of the VMs created from this instance template.)
    - `transport_partition_id` string — IB or RoCE partition to use for all VMs created from this instance template. Should only be provided for transport-enabled VM types. This is location-specific and must be provided if location is provided.
    - `type` string, required — Product name of the VM type we want to create from this instance template.
    - `virtualization_features` VirtualizationFeatures
      - `nested_virtualization` boolean — Whether nested virtualization is enabled, allowing a VM to run inside this VM.
  - `instance_template_id` string — ID of the instance template to use for creating the VMs.
  - `locations` BulkCreateLocationInfo[] — Locations to create the VMs in. This overrides any location specified in the instance template.
    - `ib_partition_id` string — Deprecated: Use transport_partition_id instead.
    - `location` string, required — Location to create the VMs in.
    - `subnet_id` string — ID of the subnet to create the VMs in. Must be in the same location as the VMs. If not provided, the default subnet for the location will be used, if there is one.
    - `transport_partition_id` string — ID of the Infiniband or RoCE partition to create the VMs in, if a transport type was specified. Must be in the same location as the VMs.
  - `name_prefix` string, required — Name prefix for the VMs to be created, used to derive each VM's name (e.g. "my-vm" produces "my-vm-1", "my-vm-2", and so on).
  - `nvlink_domain_id` string — ID of the NVLink domain to create the VMs in.
  - `reservation_specification` ReservationSpecification
    - `id` string — ID of the reservation to use for the VM. Incompatible with selection_strategy.
    - `selection_strategy` 'lowest_cost' | 'on_demand' — Strategy for automatically selecting a reservation: lowest_cost or on_demand. Use on_demand to opt out of reservation usage. Incompatible with id.

## Response `200`

- AsyncOperationResponse
  - `operation` Operation, required — Individual resources that use Operations should populate the `metadata` field with resource-specific information.
    - `completed_at` string, required
    - `metadata` string, required
    - `operation_id` string, required
    - `result` string
    - `started_at` string, required
    - `state` 'IN_PROGRESS' | 'SUCCEEDED' | 'FAILED', required

## Other responses

- `400` — Error Bad Request
- `401` — Error Authentication Failed
- `403` — Error Permissions
- `500` — Error Internal Server

---

[API](https://skmtc.net/crusoecloud/apis/crusoe-cloud-api-gateway.md) · [All operations](https://skmtc.net/crusoecloud/apis/crusoe-cloud-api-gateway/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/crusoecloud/crusoe-cloud-api-gateway/versions/a3fd2dedc72b/schema)
