compute
virtual-machine
CLI reference for virtual-machine (compute).
gi compute virtual-machine
| Command | Description |
|---|
gi compute virtual-machine list | List virtual-machines. |
gi compute virtual-machine create | Create a new virtual-machine. |
gi compute virtual-machine delete <id> | Delete a virtual-machine. |
gi compute virtual-machine reboot <id> | This action reboots the virtual machine. |
gi compute virtual-machine restart <id> | This action restarts the virtual machine. |
gi compute virtual-machine screenshot <id> | This action captures a screenshot and returns the image as a base64-encoded byte array. |
gi compute virtual-machine shutdown <id> | This action shuts down the virtual machine. |
gi compute virtual-machine start <id> | This action starts the virtual machine. |
gi compute virtual-machine stop <id> | This action stops the virtual machine. |
| 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 |
# List all
gi compute virtual-machine list
# Filter by attribute
gi compute virtual-machine list -f attributes.bios_serial_number=my-value
# Create from file
gi compute virtual-machine create --file asset.yaml
# Delete
gi compute virtual-machine delete <id>
# Reboot
gi compute virtual-machine reboot <id>
# Restart
gi compute virtual-machine restart <id>
# Screenshot
gi compute virtual-machine screenshot <id>
# Shutdown
gi compute virtual-machine shutdown <id>
# Start
gi compute virtual-machine start <id>
# Stop
gi compute virtual-machine stop <id>