Skip to main content
Aliases: 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
  • 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.
nscale instances list [flags]

Flags

FlagDescription
--org stringOrganization ID
--project stringProject ID
--network stringNetwork ID
--region stringRegion ID
--jsonOutput in JSON format

Example

nscale instances list --org <org-id> --region <region-id>

get

Get details for a specific instance in JSON format.
nscale instances get --id <instance-id> --org <org-id>

Flags

FlagDescription
--id stringInstance ID
--org stringOrganization ID

create

Create a new compute instance. Accepts input from a JSON file or stdin. Optionally supply a cloud-init configuration.
nscale instances create [flags]

Flags

FlagDescription
-f, --file stringPath to a JSON file
--stdinRead JSON from standard input
--cloud-init-path stringPath to a cloud-init YAML file
--dry-runPreview the request payload without persisting
-y, --yesAutomatically confirm creation

Examples

nscale instances create --file instance.json
nscale instances create --stdin < instance.json
cat instance.json | nscale instances create --stdin

update

Update an existing instance.
nscale instances update --id <instance-id> [flags]

Flags

FlagDescription
--id stringInstance ID
--org stringOrganization ID
-f, --file stringPath to a JSON file
--stdinRead JSON from standard input
--dry-runPreview the request payload without persisting
-y, --yesAutomatically confirm update

Examples

nscale instances update --id <instance-id> --file instance.json
nscale instances update --id <instance-id> --stdin < instance.json

delete

Delete an existing instance.
nscale instances delete --id <instance-id> --org <org-id> [flags]

Flags

FlagDescription
--id stringInstance ID
--org stringOrganization ID
--dry-runPreview the request payload without persisting
-y, --yesAutomatically confirm deletion

start

Start a stopped instance.
nscale instances start --id <instance-id> --org <org-id> [flags]

Flags

FlagDescription
--id stringInstance ID
--org stringOrganization ID
--dry-runPreview the request payload without persisting
-y, --yesAutomatically confirm start

stop

Stop a running instance.
nscale instances stop --id <instance-id> --org <org-id> [flags]

Flags

FlagDescription
--id stringInstance ID
--org stringOrganization ID
--dry-runPreview the request payload without persisting
-y, --yesAutomatically confirm stop

reboot

Reboot an instance. Use --hard for a hard reboot.
nscale instances reboot --id <instance-id> --org <org-id> [flags]

Flags

FlagDescription
--id stringInstance ID
--org stringOrganization ID
--hardUse hard reboot
--dry-runPreview the request payload without persisting
-y, --yesAutomatically confirm reboot

snapshot

Create an image snapshot from an instance. Accepts input from a JSON file or stdin.
nscale instances snapshot --id <instance-id> [flags]

Flags

FlagDescription
--id stringInstance ID
--org stringOrganization ID
-f, --file stringPath to a JSON file
--stdinRead JSON from standard input
--dry-runPreview the request payload without persisting
-y, --yesAutomatically confirm snapshot

Examples

nscale instances snapshot --id <instance-id> --file snapshot.json
nscale instances snapshot --id <instance-id> --stdin < snapshot.json

sshkey

Get the SSH key for an instance in JSON format.
nscale instances sshkey --id <instance-id> --org <org-id>

Flags

FlagDescription
--id stringInstance ID
--org stringOrganization ID

consoleoutput

Retrieve the serial console output of an instance.
nscale instances consoleoutput --id <instance-id> --org <org-id> [flags]

Flags

FlagDescription
--id stringInstance ID
--org stringOrganization ID
--length intOutput length in bytes (0 uses API default)
--jsonOutput in JSON format

consolesession

Get a VNC console session URL for an instance.
nscale instances consolesession --id <instance-id> --org <org-id>

Flags

FlagDescription
--id stringInstance ID
--org stringOrganization ID