Global InfraGlobal Infra Cloud
compute

machine

CLI reference for machine (compute).

gi compute machine

Subcommands

CommandDescription
gi compute machine listList machines.
gi compute machine createCreate 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.

Flags

list flags

FlagAliasDescription
--filter-fFilter assets (e.g. attributes.name=my-asset)

create flags

FlagAliasDescription
--file—Path to a YAML or JSON file describing the asset

update flags

FlagAliasDescription
--file—Path to a YAML or JSON file with updated attributes

Examples

# 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>

Usage Notes

On this page