---
title: "Updates a VM in the project and returns the async operation."
method: PATCH
path: "/projects/{project_id}/compute/vms/instances/{vm_id}"
tags: ["VMs"]
---

# Updates a VM in the project and returns the async operation.

`PATCH /projects/{project_id}/compute/vms/instances/{vm_id}`

## Path parameters

- `project_id` string, required
- `vm_id` string, required

## Request body

- InstancesPatchRequestV1
  - `action` 'START' | 'STOP' | 'RESET' | 'RESERVE' | 'UNRESERVE' | 'UPDATE', required — Action to perform on the VM: START, STOP, RESET, RESERVE, UNRESERVE, or UPDATE. RESERVE and UNRESERVE operations are done synchronously, and so will have succeeded with a 200 response.
  - `commitment_period` integer — CommitmentPeriod is deprecated, please use reservationID instead
  - `host_channel_adapters` PartialHostChannelAdapter[] — New set of host channel adapters for the VM.
    - `ib_partition_id` string — Deprecated: Use transport_partition_id instead.
    - `transport_partition_id` string — ID of the transport partition to assign the host channel adapter to.
  - `maintenance_policy` string — New host maintenance policy for the VM: manual, stop-vm, or unspecified.
  - `network_interfaces` NetworkInterface[] — New set of network interfaces for the VM.
    - `external_dns_name` string, required — External DNS name of the network interface.
    - `id` string, required — ID of the network interface.
    - `interface_type` string, required — Type of the network interface.
    - `ips` IPAddresses[], required — IP addresses assigned to the network interface.
      - `private_ipv4` PrivateIPv4Address, required
        - `address` string, required — Private IPv4 address.
      - `public_ipv4` PublicIPv4Address, required
        - `address` string, required — Public IPv4 address.
        - `id` string, required — ID of the public IPv4 address.
        - `type` string, required — Allocation type of the public IPv4 address (for example, dynamic).
    - `mac_address` string, required — MAC address of the network interface.
    - `name` string, required — Name of the network interface.
    - `network` string, required — ID of the VPC network the interface is attached to.
    - `subnet` string, required — ID of the VPC subnet the interface is attached to.
  - `reservation_id` string — ID of the reservation to use for the VM.
  - `type` string — New VM type to change the VM to.

## 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.dev/crusoecloud/apis/crusoe-cloud-api-gateway.md) · [All operations](https://skmtc.dev/crusoecloud/apis/crusoe-cloud-api-gateway/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/crusoecloud/crusoe-cloud-api-gateway/revisions/a3fd2dedc72b/schema)
