---
title: VM
description: Create and manage virtual machines.
canonical: 'https://lightning.ai/docs/cli/stable/command-details/vm'
---
# VM {#vm}

Create and manage virtual machines.

**Usage:**

```console
lightning vm [OPTIONS] COMMAND [ARGS]...
```

## Commands {#vm-commands}

| Command | Description |
| --- | --- |
| [`create`](#vm-create) | Create a virtual machine. |
| [`delete`](#vm-delete) | Delete a virtual machine. |
| [`inspect`](#vm-inspect) | Inspect a virtual machine as JSON. |
| [`list`](#vm-list) | List virtual machines in a teamspace. |
| [`ssh`](#vm-ssh) | SSH into a virtual machine. |

## lightning vm create {#vm-create}

Create a virtual machine.

**Usage:**

```console
lightning vm create [OPTIONS] NAME
```

### Arguments {#vm-create-arguments}

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `NAME` | `text` | yes | No description provided. |

### Options {#vm-create-options}

| Option | Type | Required | Default | Description |
| --- | --- | --- | --- | --- |
| `--machine` | `[cpu_small|cpu|cpu_x_2|cpu_x_4|cpu_x_8|cpu_x_16|data_prep|data_prep_max|data_prep_ultra|t4_small|t4|t4_x_2|t4_x_4|t4_x_8|l4|l4_x_2|l4_x_4|l4_x_8|l40s|l40s_x_2|l40s_x_4|l40s_x_8|rtxp_6000|rtxp_6000_x_2|rtxp_6000_x_4|rtxp_6000_x_8|a100|a100_x_2|a100_x_4|a100_x_8|h100|h100_x_2|h100_x_4|h100_x_8|h200|h200_x_2|h200_x_4|h200_x_8|b200|b200_x_8]` | yes | `Sentinel.UNSET` | Machine type. |
| `--teamspace` | `TEXT` | no | `Sentinel.UNSET` | Override default teamspace (format: owner/teamspace). |
| `--cloud` | `TEXT` | no | `Sentinel.UNSET` | Cloud account (cluster id) to create the VM in. Defaults to the organization’s machine cluster when there is exactly one. |
| `--volume-size` | `INTEGER RANGE` | no | `Sentinel.UNSET` | Root disk size in GB (400-800). |
| `--spot` | — | no | — | Use an interruptible machine. |
| `--wait` | — | no | — | Block until the VM is running, then print the SSH command. |
| `--timeout` | `FLOAT` | no | `600.0` | Seconds to wait with –wait. |

## lightning vm delete {#vm-delete}

Delete a virtual machine. This discards its disk.

**Usage:**

```console
lightning vm delete [OPTIONS] NAME
```

### Arguments {#vm-delete-arguments}

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `NAME` | `text` | yes | No description provided. |

### Options {#vm-delete-options}

| Option | Type | Required | Default | Description |
| --- | --- | --- | --- | --- |
| `--teamspace` | `TEXT` | no | `Sentinel.UNSET` | Override default teamspace (format: owner/teamspace). |
| `--yes`, `-y` | — | no | — | Delete without prompting for confirmation. |

## lightning vm inspect {#vm-inspect}

Inspect a virtual machine as JSON.

**Usage:**

```console
lightning vm inspect [OPTIONS] NAME
```

### Arguments {#vm-inspect-arguments}

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `NAME` | `text` | yes | No description provided. |

### Options {#vm-inspect-options}

| Option | Type | Required | Default | Description |
| --- | --- | --- | --- | --- |
| `--teamspace` | `TEXT` | no | `Sentinel.UNSET` | Override default teamspace (format: owner/teamspace). |

## lightning vm list {#vm-list}

List virtual machines in a teamspace.

**Usage:**

```console
lightning vm list [OPTIONS]
```

### Options {#vm-list-options}

| Option | Type | Required | Default | Description |
| --- | --- | --- | --- | --- |
| `--teamspace` | `TEXT` | no | `Sentinel.UNSET` | Override default teamspace (format: owner/teamspace). |
| `--all` | — | no | — | List VMs in all teamspaces visible to the selected owner. |

## lightning vm ssh {#vm-ssh}

SSH into a virtual machine. Arguments after – are passed to ssh.

**Usage:**

```console
lightning vm ssh [OPTIONS] NAME [SSH_ARGS]...
```

### Arguments {#vm-ssh-arguments}

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `NAME` | `text` | yes | No description provided. |
| `SSH_ARGS` | `text` | no | No description provided. |

### Options {#vm-ssh-options}

| Option | Type | Required | Default | Description |
| --- | --- | --- | --- | --- |
| `--teamspace` | `TEXT` | no | `Sentinel.UNSET` | Override default teamspace (format: owner/teamspace). |
| `--timeout` | `FLOAT` | no | `600.0` | Seconds to wait for the VM to be running. |

---

**Navigation**

- Parent: [Command details](/docs/cli/2026.11.20/command-details.md)
