> 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](https://docs.i3d.net/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`     | Immediately power off a running VM, like pulling the power cord. The guest OS gets no warning, so unsaved data can be lost (`running` → `stopping` → `stopped`). |
| `shutdown` | Ask the guest OS to shut down cleanly (`running` → `stopping` → `stopped`). If the VM is still running after 60 seconds, it is powered off like `stop`.          |
| `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](https://docs.i3d.net/compute/flexvm/vm-lifecycle-and-states.md).
{% endhint %}

For creating and deleting VMs, see [Creating and Deleting a VM](https://docs.i3d.net/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 by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

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

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
