---
title: "Rename a VM"
method: POST
path: "/project/{project_id}/location/{location}/vm/{vm_reference}/rename"
tags: ["Virtual Machine"]
---

# Rename a VM

`POST /project/{project_id}/location/{location}/vm/{vm_reference}/rename`

## Request body

- object
  - `name` string, required — New name for VM

## Response `200`

A VM

- object
  - `boot_image` string, required — Boot image of the VM
  - `id` string, required — ID of the VM
  - `ip4` string, ipv4, nullable, required — IPv4 address
  - `ip4_enabled` boolean, required — Whether IPv4 is enabled
  - `ip6` string, ipv6, nullable, required — IPv6 address
  - `location` string, required — Location of the VM
  - `name` string, required — Name of the VM
  - `size` string, required — Size of the underlying VM
  - `state` string, required — State of the VM
  - `storage_size_gib` integer, required — Storage size in GiB
  - `unix_user` string, required — Unix user of the VM
  - `firewalls` Firewall[], required — List of firewalls
    - `description` string, required — Description of the firewall
    - `firewall_rules` FirewallRule[], required — List of firewall rules
      - `cidr` string, required — CIDR of the firewall rule
      - `id` string, required — ID of the firewall rule
      - `port_range` string, required — Port range of the firewall rule
      - `protocol` 'tcp' | 'udp', required — Protocol of the firewall rule (tcp or udp)
      - `description` string, required — Description of the firewall rule
    - `id` string, required — ID of the firewall
    - `location` string, required — Location of the firewall
    - `name` string, required — Name of the firewall
  - `private_ipv4` string, ipv4, required — Private IPv4 address
  - `private_ipv6` string, ipv6, required — Private IPv6 address
  - `subnet` string, required — Subnet of the VM
  - `gpu` string — GPU configuration

## Other responses

- `default` — An error response

---

[API](https://skmtc.net/ubicloud/apis/clover-api.md) · [All operations](https://skmtc.net/ubicloud/apis/clover-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/ubicloud/clover-api/versions/e8e5db50e9a6/schema)
