compute
machine
CLI reference for machine (compute).
gi compute machine
| Command | Description |
|---|
gi compute machine list | List machines. |
gi compute machine create | Create a new machine. |
gi compute machine update <id> | Update a machine. |
gi compute machine delete <id> | Delete a machine. |
gi compute machine reboot <id> | Reboots the machine, gracefully restarting the guest operating system, and returns the refreshed machine. |
gi compute machine restart <id> | Power-cycles the machine: it is stopped and then started again. |
gi compute machine screenshot <id> | Captures a screenshot of the machine’s console and returns the image as a base64-encoded byte array. |
gi compute machine shutdown <id> | Gracefully shuts down the guest operating system and powers the machine off. |
gi compute machine start <id> | Powers the machine on. |
gi compute machine stop <id> | Powers the machine off immediately, without waiting for the guest operating system to shut down gracefully. |
| Flag | Alias | Description |
|---|
--filter | -f | Filter assets (e.g. attributes.name=my-asset) |
| Flag | Alias | Description |
|---|
--file | — | Path to a YAML or JSON file describing the asset |
| Flag | Alias | Description |
|---|
--file | — | Path to a YAML or JSON file with updated attributes |
# List all
gi compute machine list
# Filter by attribute
gi compute machine list -f attributes.component=mycomponent
# Create from file
gi compute machine create --file asset.yaml
# Update
gi compute machine update <id> --file asset.yaml
# Delete
gi compute machine delete <id>
# Reboot
gi compute machine reboot <id>
# Restart
gi compute machine restart <id>
# Screenshot
gi compute machine screenshot <id>
# Shutdown
gi compute machine shutdown <id>
# Start
gi compute machine start <id>
# Stop
gi compute machine stop <id>