instances, inst
Subcommands
- list — List instances
- get — Get instance details
- create — Create a new instance
- update — Update an existing instance
- delete — Delete an instance
- start — Start an instance
- stop — Stop an instance
- reboot — Reboot an instance
- snapshot — Create a snapshot from an instance
- ssh — Open an SSH session to an instance
- sshkey — Get an instance’s SSH key
- consoleoutput — Get instance console output
- consolesession — Get a VNC console session URL
list
List compute instances, optionally filtered by organization, project, network, or region.Flags
| Flag | Description |
|---|---|
—org string | Organization ID |
—project string | Project ID |
—network string | Network ID |
—region string | Region ID |
—json | Emit the full JSON payload (mutually exclusive with -q) |
-q, —query stringArray | jq filter for value extraction (see Query output with -q) |
Example
get
Get details for a specific instance.Flags
| Flag | Description |
|---|---|
—id string | Instance ID |
—org string | Organization ID |
—json | Emit the full JSON payload (mutually exclusive with -q) |
-q, —query stringArray | jq filter for value extraction (see Query output with -q) |
create
Create a new compute instance. Accepts input from a JSON file or stdin. Optionally supply a cloud-init configuration or bind an SSH certificate authority.Flags
| Flag | Description |
|---|---|
-f, —file string | Path to a JSON file |
—stdin | Read JSON from standard input |
—cloud-init-path string | Path to a cloud-init YAML file |
—ssh-ca-id string | SSH certificate authority ID to bind (pass empty string to clear) |
—dry-run | Preview the request payload without persisting |
-y, —yes | Automatically confirm creation |
—json | Emit the full JSON payload (mutually exclusive with -q) |
-q, —query stringArray | jq filter for value extraction (see Query output with -q) |
Examples
update
Update an existing instance.Flags
| Flag | Description |
|---|---|
—id string | Instance ID |
—org string | Organization ID |
-f, —file string | Path to a JSON file |
—stdin | Read JSON from standard input |
—ssh-ca-id string | SSH certificate authority ID to bind to the instance (pass an empty string to clear) |
—dry-run | Preview the request payload without persisting |
-y, —yes | Automatically confirm update |
—json | Emit the full JSON payload (mutually exclusive with -q) |
-q, —query stringArray | jq filter for value extraction (see Query output with -q) |
Examples
delete
Delete an existing instance.Flags
| Flag | Description |
|---|---|
--id string | Instance ID |
--org string | Organization ID |
--dry-run | Preview the request payload without persisting |
-y, --yes | Automatically confirm deletion |
start
Start a stopped instance.Flags
| Flag | Description |
|---|---|
--id string | Instance ID |
--org string | Organization ID |
--dry-run | Preview the request payload without persisting |
-y, --yes | Automatically confirm start |
stop
Stop a running instance.Flags
| Flag | Description |
|---|---|
--id string | Instance ID |
--org string | Organization ID |
--dry-run | Preview the request payload without persisting |
-y, --yes | Automatically confirm stop |
reboot
Reboot an instance. Use--hard for a hard reboot.
Flags
| Flag | Description |
|---|---|
--id string | Instance ID |
--org string | Organization ID |
--hard | Use hard reboot |
--dry-run | Preview the request payload without persisting |
-y, --yes | Automatically confirm reboot |
snapshot
Create an image snapshot from an instance. Accepts input from a JSON file or stdin.Flags
| Flag | Description |
|---|---|
—id string | Instance ID |
—org string | Organization ID |
-f, —file string | Path to a JSON file |
—stdin | Read JSON from standard input |
—dry-run | Preview the request payload without persisting |
-y, —yes | Automatically confirm snapshot |
—json | Emit the full JSON payload (mutually exclusive with -q) |
-q, —query stringArray | jq filter for value extraction (see Query output with -q) |
Examples
ssh
Open an interactive SSH session to an instance using the system SSH client.Flags
| Flag | Description |
|---|---|
--id string | Instance ID |
--org string | Organization ID |
-l, --ssh-user string | SSH login user (default: "root") |
Examples
sshkey
Get the SSH key for an instance.Flags
| Flag | Description |
|---|---|
—id string | Instance ID |
—org string | Organization ID |
—json | Emit the full JSON payload (mutually exclusive with -q) |
-q, —query stringArray | jq filter for value extraction (see Query output with -q) |
consoleoutput
Retrieve the serial console output of an instance.Flags
| Flag | Description |
|---|---|
—id string | Instance ID |
—org string | Organization ID |
—length int | Output length in bytes (0 uses API default) |
—json | Emit the full JSON payload (mutually exclusive with -q) |
-q, —query stringArray | jq filter for value extraction (see Query output with -q) |
consolesession
Get a VNC console session URL for an instance.Flags
| Flag | Description |
|---|---|
--id string | Instance ID |
--org string | Organization ID |
Related
Instances (Console)
Create and manage instances via the Console UI.
Custom Images
Upload and use custom OS images for instances.