Skip to content

Commit

Permalink
make propolis-cli spec-driven
Browse files Browse the repository at this point in the history
  • Loading branch information
gjcolombo committed Nov 15, 2024
1 parent ddf8f9f commit 5165d8e
Show file tree
Hide file tree
Showing 4 changed files with 275 additions and 79 deletions.
2 changes: 2 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions bin/propolis-cli/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,12 @@ edition = "2021"
[dependencies]
anyhow.workspace = true
clap = { workspace = true, features = ["derive"] }
crucible-client-types.workspace = true
futures.workspace = true
libc.workspace = true
newtype-uuid.workspace = true
propolis-client.workspace = true
propolis-config-toml.workspace = true
slog.workspace = true
slog-async.workspace = true
slog-term.workspace = true
Expand Down
41 changes: 41 additions & 0 deletions bin/propolis-cli/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
# Propolis CLI

The `propolis-cli` utility provides a user-friendly frontend to the
[`propolis-server`](../propolis-server) REST API.

## Getting started

The easiest way to launch a VM via the CLI is to write a TOML file describing
the VM's configuration. An example of such a file might be the following:

```toml
[block_dev.alpine_iso]
type = "file"
path = "/path/to/alpine-extended-3.12.0-x86_64.iso"

[dev.block0]
driver = "pci-virtio-block"
block_dev = "alpine_iso"
pci-path = "0.4.0"

[dev.net0]
driver = "pci-virtio-viona"
vnic = "vnic_name"
pci-path = "0.5.0"
```

To create and run a Propolis VM using this configuration:

```
# propolis-cli -s <server ip> -p <port> new --config-toml <path> <VM name>
# propolis-cli -s <server ip> -p <port> state run
```

To connect to the VM's serial console:

```
# propolis-cli -s <server ip> -p <port> serial
```

Run `propolis-cli --help` to see the full list of supported commands and their
arguments.
Loading

0 comments on commit 5165d8e

Please sign in to comment.