> For the complete documentation index, see [llms.txt](https://docs.layeronecloud.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.layeronecloud.com/pve-microvm/usage.md).

# Quick Start

Source project: `pve-microvm` (migrated from `docs/usage.md`). Run commands from the code checkout and directory specified below, not from this documentation repository.

## Create from the web UI <a href="#create-from-the-web-ui" id="create-from-the-web-ui"></a>

1. Click **Create µVM** (⚡ button in the header toolbar)
2. Pick an OCI image from the dropdown (or type any image reference)
3. Choose profile, storage, memory, disk size
4. Click Create — a terminal opens to build the template

## Create from CLI <a href="#create-from-cli" id="create-from-cli"></a>

```bash
# Create a template (one-time)
pve-microvm-template --image debian:trixie-slim --vmid 9000

# Clone and boot
qm clone 9000 901 --name my-sandbox --full
qm set 901 --sshkeys ~/.ssh/authorized_keys
qm start 901
qm terminal 901
```

## Template options <a href="#template-options" id="template-options"></a>

| Flag          | Default              | Purpose                                        |
| ------------- | -------------------- | ---------------------------------------------- |
| `--image`     | `debian:trixie-slim` | OCI image or specialist OS name                |
| `--vmid`      | `9000`               | Template VM ID                                 |
| `--name`      | `microvm-trixie`     | Template name                                  |
| `--storage`   | `local-lvm`          | PVE storage backend                            |
| `--disk-size` | `2G`                 | Root disk size                                 |
| `--memory`    | `512`                | Memory in MB                                   |
| `--cores`     | `1`                  | CPU cores                                      |
| `--bridge`    | `vmbr0`              | PVE network bridge used by every template path |
| `--profile`   | `standard`           | `minimal`, `standard`, or `full`               |
| `--no-docker` | —                    | Skip Docker install                            |
| `--no-ssh`    | —                    | Skip SSH server                                |
| `--no-agent`  | —                    | Skip guest agent                               |

## Manual creation <a href="#manual-creation" id="manual-creation"></a>

```bash
qm create 900 --machine microvm --memory 256 --cores 1 \
  --name my-microvm --net0 virtio,bridge=vmbr0 \
  --serial0 socket --vga serial0 --agent 1 \
  --args '-kernel /usr/share/pve-microvm/vmlinuz \
    -initrd /usr/share/pve-microvm/initrd \
    -append "console=ttyS0 root=/dev/vda rw quiet"'

pve-oci-import --image alpine:3.21 --vmid 900 --configure
qm start 900
qm terminal 900
```

## Console <a href="#console" id="console"></a>

```bash
# CLI
qm terminal <vmid>     # Disconnect: Ctrl-O

# Web UI: Console tab auto-selects xterm.js for microvm
```

## Shutdown & cleanup <a href="#shutdown--cleanup" id="shutdown--cleanup"></a>

```bash
qm shutdown 900    # Graceful (guest agent)
qm stop 900        # Force stop
qm destroy 900     # Remove VM + disks
```

## Ephemeral VMs <a href="#ephemeral-vms" id="ephemeral-vms"></a>

```bash
pve-microvm-run -- uname -a           # Run and destroy
pve-microvm-run -it --image alpine:3.21   # Interactive
pve-microvm-run --no-net -- echo "isolated"
```

## Network configuration <a href="#network-configuration" id="network-configuration"></a>

Templates use **systemd-networkd** directly — no cloud-init required.

**DHCP (default)**: works automatically on all ethernet interfaces.

**Static IP**: write `/etc/microvm-static-net` before (or after) first boot:

```bash
# Via guest agent on a running VM:
qm guest exec <vmid> -- bash -c \
  'echo "ADDRESS=10.0.0.5/24 GATEWAY=10.0.0.1 DNS=1.1.1.1" > /etc/microvm-static-net'
qm reboot <vmid>

# Or set the root password and SSH key at creation:
qm clone 9000 901 --name my-vm --full
qm guest exec 901 -- bash -c 'echo "ADDRESS=..." > /etc/microvm-static-net'
qm start 901
```

The `microvm-static-net.service` runs before networkd and generates the appropriate `.network` file. No MAC address dependency — survives cloning.

## Next steps <a href="#next-steps" id="next-steps"></a>

* [Supported Guest OS](/pve-microvm/guests.md) — all 21 distros and specialist OS
* [Networking & Storage](/pve-microvm/networking.md) — virtiofs, 9p, vsock, SSH agent
* [Web UI](/pve-microvm/webui.md) — Create µVM dialog, icons, console
* [High Availability](/pve-microvm/ha.md) — migration and HA relocate
* [Configuration](/pve-microvm/configuration.md) — all supported options


---

# 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.layeronecloud.com/pve-microvm/usage.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.
