v1

latestSwagger 2.02026-08-04232286653.5 KB
VMs

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

post/projects/{project_id}/compute/vms/bulk-instances

Path parameters

project_idstring required

Request body

countinteger 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_agentboolean nullable

Whether to install the Crusoe Watch Agent on the VMs. Defaults to true.

instance_group_idstring

ID of the instance group the VMs will be created in.

instance_template_idstring

ID of the instance template to use for creating the VMs.

name_prefixstring 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_idstring

ID of the NVLink domain to create the VMs in.

Example request

{
  "count": 6,
  "instance_group_id": "cda562c4-6162-4565-95f3-ce06a8220c07",
  "instance_template": {
    "custom_image_name": "ubuntu:20.04",
    "disks": [
      {
        "size": "10GiB",
        "type": "persistent-ssd"
      }
    ],
    "image_name": "ubuntu:20.04",
    "location": "us-northcentral1-a",
    "maintenance_policy": "manual,stop-vm,unspecified",
    "nvlink_domain_id": "550e8400-e29b-41d4-a716-446655440000",
    "placement_policy": "spread",
    "public_ip_address_type": "static",
    "reservation_id": "804bf3a2-81f2-4d78-9a9e-dc6a55ed33d8",
    "shutdown_script": "\"#!/bin/bash\\necho 'goodbye'\"",
    "ssh_public_key": "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCspdG97nTS/h4PEPq2QD2RYVK1jxFXLFZuSDMI8Rtxpucl6LDZLOghEYoj13lxKQnGtcsM3Iu68lh+4YgZe7CbI6cc/TxPbeAX2HJTqDh0J7+GAlLBHK9tsepC0QlhIDiazJptOPDZ3cesCBXdxSnzEbhDaqgYOfl393cp1fCeOKRIDWEP3H9CM25dCbWF66sTDziLsojJ9dMnxhgKm9/JkZc5gYncLT/2Ey+VWfV9Fs65mGUrBbQOn3c8S/nEk6WRcYn4PFOnIp0Mz+Chb50iCJrW677pllLnkTGSU+4c0H9J5z4HDG0I+91RoiQ0QsayFTYO1JtSn+THLuq98V+D",
    "startup_script": "\"#!/bin/bash\\necho 'hello'\"",
    "subnet_id": "09ae8411-0fbb-411c-898c-2b8f19622ae1",
    "template_name": "my-instance-template",
    "transport_partition_id": "09ae8411-0fbb-411c-898c-2b8f19622ae1",
    "type": "a100.2x",
    "virtualization_features": {
      "nested_virtualization": true
    }
  },
  "instance_template_id": "09ae8411-0fbb-411c-898c-2b8f19622ae1",
  "locations": [
    {
      "location": "us-northcentral1-a",
      "subnet_id": "09ae8411-0fbb-411c-898c-2b8f19622ae1",
      "transport_partition_id": "09ae8411-0fbb-411c-898c-2b8f19622ae1"
    }
  ],
  "name_prefix": "my-vm",
  "reservation_specification": {
    "id": "804bf3a2-81f2-4d78-9a9e-dc6a55ed33d8",
    "selection_strategy": "lowest_cost"
  }
}

Response

Example response

{
  "operation": {
    "completed_at": "2021-12-03T19:59:34Z",
    "metadata": "{}",
    "operation_id": "F6EF489C-086E-458D-B812-7962964A28C9",
    "result": "{}",
    "started_at": "2021-12-03T19:58:34Z",
    "state": "IN_PROGRESS"
  }
}