> For the complete documentation index, see [llms.txt](https://docs.i3d.net/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.i3d.net/compute/flexvm/managing-vms.md).

# Managing VMs

Once a VM exists, you can list and inspect your VMs and control a VM's runtime state by sending it commands.

## Listing VMs

* List VMs in your Cloud:
  * `GET /v3/flexVM/clouds/{cloudUuid}/vms`
  * Optionally filter by status with the `status` query parameter (e.g. `?status=running`).
  * Supports the `RANGED-DATA` header for pagination.
* Get a specific VM:
  * `GET /v3/flexVM/clouds/{cloudUuid}/vms/{vmUuid}`
  * Returns the details of the specified VM, including its current [status](/compute/flexvm/vm-lifecycle-and-states.md).

## Executing commands

Use the `POST /v3/flexVM/clouds/{cloudUuid}/vms/{vmUuid}/commands` endpoint to change a VM's runtime state. The request body takes a single `command` field.

| Command  | Description                                                                                     |
| -------- | ----------------------------------------------------------------------------------------------- |
| `start`  | Power on a stopped VM (`stopped` → `starting` → `running`).                                     |
| `stop`   | Gracefully shut down a running VM (`running` → `stopping` → `stopped`).                         |
| `reboot` | Gracefully restart a running VM.                                                                |
| `reset`  | Forcefully power-cycle the VM. Use this when the VM is unresponsive and `reboot` does not work. |

**Example request:**

```http
POST /v3/flexVM/clouds/{cloudUuid}/vms/{vmUuid}/commands
Host: api.i3d.net
PRIVATE-TOKEN: YOUR_API_KEY
Content-Type: application/json

{
  "command": "reboot"
}
```

{% hint style="info" %}
Response (202 Accepted) indicates the command was accepted. The command is applied asynchronously — poll the VM with `GET /v3/flexVM/clouds/{cloudUuid}/vms/{vmUuid}` to follow its [status](/compute/flexvm/vm-lifecycle-and-states.md).
{% endhint %}

For creating and deleting VMs, see [Creating and Deleting a VM](/compute/flexvm/creating-and-deleting-a-vm.md).


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.i3d.net/compute/flexvm/managing-vms.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
