Spot Instances
Spot instances run on spare AceCloud capacity at a lower hourly price than on-demand instances. In exchange, they can be shut off when the market price rises above a limit you set. The ace spot command provides full lifecycle management: creation, power control, price inspection, and deletion.
Spot instances use the standard cloud instance API with billing_type set to spot.
Introduced in: CLI v1.5.0
Table of Contents
Before You Start
Two things about spot instances differ from on-demand instances and are worth knowing up front:
They can be shut off. If you set a termination price and the market price rises above it, the instance is shut off. Do not run anything on a spot instance that cannot tolerate being interrupted.
GPU spot requests are asynchronous. A successful
ace spot createfor a GPU flavor means the request was accepted, not that the instance is running. Check the outcome withace spot listorace spot get <instance-id>.
View Spot Prices
Spot prices move with demand, so check the current price before you create anything. You also need the current price to choose a sensible termination price.
Output columns: Flavor, Resource Type, vCPU, RAM, Type, Currency, Spot Price (per hour).
The full list is long, so filter it:
--flavor
Show the price for a single flavor name or UUID
--gpu
GPU flavors only
--linux
Linux non-GPU flavors only
--windows
Windows non-GPU flavors only
--os-type
Filter by OS type. Cannot be combined with --linux, --windows or --gpu
--count
Number of instances to price (default 1)
--currency
Currency code
--usd
Show prices in USD
--inr
Show prices in INR
--cpu
Non-GPU flavors only (legacy; cannot be combined with --gpu, --linux or --windows)
Note on currency: prices are returned in your account's billing currency unless you override it. If
ace auth mereports one currency andace spot pricesshows another, pin it explicitly with--usdor--inrso you know what you are comparing against.
List Available Images
Not every image can be used for a spot instance. List the ones that can:
Aliases: image, image-list
Output columns: ID, Name, Status, Size, Visibility.
--os
Filter by OS, e.g. ubuntu, centos
--gpu
GPU images only
--category
Filter by category
Use either the name or the ID from this list with ace spot create --image.
Create a Spot Instance
The instance is created at the current server price for the selected flavor.
Required Flags
--name
Instance name
--flavor
Flavor name or UUID
--network
Network UUID (repeatable)
--security-group
Security group UUID (repeatable)
You must also supply a boot source: either --image or --snapshot.
Optional Flags
--termination-price
Maximum spot price you accept. The instance is shut off when the market price exceeds it
--image
Image name or UUID
--snapshot
Volume snapshot name or UUID
--source-type
image
Boot source type: image or snapshot. Inferred from the boot flag you use
--key
SSH key pair name
--description
Instance description
--count
1
Number of instances to create
--boot-size
20
Boot volume size in GB
--volume-type
NVMe based High IOPS Storage
Boot volume type
--availability-zone
nova
Availability zone
--script
Inline plaintext cloud-init or user-data script
--script-file
Path to a plaintext cloud-init or user-data script
--config-drive
false
Enable config drive
--networkand--security-grouptake a network/VPC UUID and a security group UUID, not names. Get them fromace vpc listandace security-group list.
Boot From a Snapshot
Instead of an image, boot from an existing volume snapshot. Set --boot-size to at least the snapshot's size.
--source-type is inferred from the boot flag, so you do not normally need to set it.
Pass a Cloud-Init Script
Run configuration at first boot, either inline or from a file:
The script must be plaintext — the CLI handles any encoding the API requires.
List Spot Instances
Aliases: ls
When the project has no spot instances, the command prints No spot instances found.
The listing shows each instance's launch price (spot_flavor_launch_price) and its configured maximum price (spot_flavor_termination_price), so you can see what you are paying against what you agreed to.
Get Spot Instance Details
Aliases: show, describe
Use this to confirm the eventual status of an asynchronous GPU spot request, and to read the instance's launch and termination prices.
Update the Termination Price
Change the maximum price you accept on a running spot instance:
Pass 0 to disable price-based shutoff entirely:
Power Management
--hard performs a hard reboot; without it the reboot is soft.
Delete Spot Instances
Accepts one or more instance IDs:
Aliases: rm
Deletion prompts for confirmation. In scripts and CI, where there is no TTY, pass --yes:
Understanding the Termination Price
--termination-price is the maximum hourly spot price you are willing to pay.
When set, the instance is shut off if the market price rises above it.
The value must be greater than the current spot price for the flavor. Check
ace spot pricesfirst.When omitted, no price-based shutoff is configured — the instance is not shut off on price.
Set it to
0withace spot updateto remove an existing limit.
A higher limit means the instance survives larger price swings but can cost more per hour. A limit close to the current price is cheaper to cap but far more likely to trigger a shutoff.
Command Reference
ace spot list
List spot instances
ace spot get <id>
Get spot instance details
ace spot create
Create a spot instance
ace spot update <id>
Update the termination price
ace spot delete <id> [id...]
Delete spot instance(s)
ace spot start <id>
Start a spot instance
ace spot stop <id>
Stop a spot instance
ace spot pause <id>
Pause a spot instance
ace spot reboot <id>
Reboot a spot instance
ace spot prices
List current spot prices
ace spot images
List images usable for spot creation
Example Workflow
Last updated