Skip to content
Coritan Docs

Manage your customers' instances

See your customers' Cloud Compute instances, control their power, and take snapshots and backups, rename, repair or rebuild one for them.

View as Markdown

The Cloud Compute page, under Hosting, lists the Cloud Compute instances behind your organization's services, with their power state as it is now. Open an instance to see its addresses and traffic, and to take snapshots and backups, rename it, reset its password, repair it in rescue mode or rebuild it for a customer. Your customers manage their own instances from your storefront, as Let customers run Cloud Compute instances describes.

  • Every member can see the page and open an instance. Power actions, snapshots, backups and the Settings section need the owner or admin role.
  • An instance appears once a customer orders one of your products that is linked to Cloud Compute. Set up products and pricing explains linked products.

Open your organization, then Hosting, then Cloud Compute. The figures at the top count your Instances and how many are running, and add up their vCPU, Memory and Storage. The table shows for each instance:

  • Instance: its hostname, IP address, operating system, location and host.
  • Power: whether it is running or stopped, and how long it has been up. An instance that is suspended, moving to another host or terminated shows that status here. The state updates by itself while the page is open.
  • Size: its vCPU, memory and disk.
  • Created: when it was created.

The table shows 50 instances to a page, newest first. To find an instance, type part of its hostname, address, operating system, location, host or ID in the search box, or choose a state in place of Any power state and, when your instances run in more than one place, a location in place of Every location. Each choice says how many instances it would show. The search, the choices, the page and the column you sort by stay in the page's address. When nothing matches, Reset filters clears them. The column headers sort the table while every instance fits on one page; past that, the pager under the table moves between pages.

Any power state chooses by the state we recorded at the instance's last start, stop, restart, suspension or rebuild, while the Power column shows the state its host reports now. An instance shut down from inside its operating system can therefore be listed under Running while its row says it is stopped, until someone starts or stops it from Coritan.

Select Refresh at the top of the table to load everything again. Select a row to open the instance.

The instance page has up to four sections. Its header shows the power state, its size, location and address. For owners and admins it also has Start while the instance is off, or Reboot… and Shut down… while it runs, with Force stop… in the menu beside them. All instances goes back to the list as you left it.

Overview
The Instance card, with its ID, Operating system, Default user, size, location and a link to the service it belongs to. IP addresses lists its addresses. Live status shows its processor and memory use, read from the host every 20 seconds, and Traffic shows this period's transfer against the plan's allowance.
Snapshots and Backups
The checkpoints and copies of its disk, below.
Settings
Its hostname, user account, SSH keys, cloud-init, rescue mode and rebuild. Only owners and admins see this section.

Tags on the Overview section are labels your team uses to find the instance. Tier 3 support and above can change them: type in Add a tag and press Enter or select Add tag, or select the remove button on a tag. A tag takes lowercase letters, digits, hyphens and underscores, and an instance takes up to 50.

A snapshot is a quick checkpoint stored with the disk. It goes when the disk goes, in a rebuild for example, so it is not a backup. An instance keeps up to 8.

  1. Open the instance, then Snapshots, and select Take snapshot…. A page opens with the heading Take a snapshot, under the instance's header and section tabs.
  2. Enter a Name that starts with a letter, such as before-upgrade, uses letters, digits, hyphens and underscores, and has 37 characters or fewer. Add a Description if you like. The button stays off until the name follows the rule.
  3. While the instance runs, tick Include memory to save its memory too. A rollback then resumes the machine where it was.
  4. Check the This snapshot card, which counts the snapshots the instance holds out of 8, then select Take snapshot.

Cancel and the Snapshots link return you to the section. If the host refuses, an alert titled "Could not take the snapshot" gives the reason and the fields stay as you typed them. A suspended instance, or one that holds 8 snapshots, shows why instead of the form. Owners and admins can open the page; anyone else sees "Taking a snapshot needs an owner or admin".

To go back to a snapshot, choose Roll back… in its menu and type the snapshot's name. We shut the instance down, roll it back and start it again, and everything written since the snapshot is lost. To delete one, choose Delete snapshot… and type its name.

A backup is a full copy of the disk in an archive of its own. A rebuild leaves it in place, and cancelling the service deletes it.

  1. Open the instance, then Backups, and select Create backup…. A page opens with the heading Create a backup, under the instance's header and section tabs.
  2. Add a Note if you like, such as Before the database migration.
  3. Choose the Mode: Snapshot (no downtime) copies the live disk, Suspend pauses the instance for the copy, and Stop shuts it down for the most consistent copy. On a stopped instance every mode gives a consistent copy, so the three are greyed out.
  4. Choose the Compression and select Create backup. The This backup card counts the backups the instance holds out of 16.

The backup shows as it runs. One backup or restore runs at a time, so Create backup… stays off until it ends, and the page says so if you open its address meanwhile. It also says so for a suspended instance, one that is moving, and one that holds 16 backups. A refused request shows an alert titled "Could not start the backup" and keeps the note and choices as they were. To put a backup back, choose Restore backup… in its menu and type restore: we stop the instance, replace its disk with the copy and start it again. To delete a backup, choose Delete backup… and type delete. A failed backup stored nothing, so select Remove… on its row and confirm to take it off the list.

Open the instance, then Settings.

Hostname
Enter the new Hostname: one name of letters, digits and hyphens, up to 63 characters, with no dots and no hyphen at either end. Tick Reboot now so the guest picks it up to restart a running instance at once, then select Save hostname. Otherwise the guest takes the name at its next boot.
User account
Reset password… sets a new random password for the default user and shows it once. The instance must be running, because its guest agent sets the password.
SSH keys
Public keys shows the keys the instance receives, one per line. Add or delete lines, then select the save button, which counts the keys and stays off until you change the list. Saving replaces the keys with what the field holds. If we cannot read the current keys, the field starts empty and says so, and saving then replaces every key. To remove every key, empty the field and select Remove all keys…. The keys apply at the next boot. Keys already in the guest's authorized_keys keep working until someone deletes them inside the instance.
Cloud-init
Regenerate cloud-init… writes the user account, password, SSH keys and primary address again for the guest to read at its next boot. Use it when the guest missed a change, then reboot.
Rescue mode
Choose a Rescue image and select Enter rescue mode… to boot a live system with the instance's disk attached, so you can repair it or copy files off it. The instance reboots at once, and the customer's services stay down until you select Leave rescue mode….
Rebuild operating system
Choose a Template and select Rebuild instance…, then type the hostname to confirm. You cannot choose a template the instance cannot take: the list says why beside it, such as "needs 60 GB disk" or "not ready on this host". We erase the disk, delete the instance's snapshots and install the template. The plan, the backups, the addresses, the hostname and the SSH keys stay. The rebuild sets a new password, so reset it under User account afterwards to see it. Rebuild instance… stays off while the service is suspended.

Start, reboot or stop an instance

Section titled Start, reboot or stop an instance
  1. In the dashboard, open the organization, then Hosting, then Cloud Compute.
  2. When the instance is stopped, select Start in its row.
  3. When it is running, open Power in its row and choose an action, then confirm it:
    • Reboot… asks the operating system to restart. Anything unsaved inside it is lost.
    • Shut down… asks the operating system to power off cleanly.
    • Force stop… cuts the power at once, like pulling the plug. Use it only when the instance does not respond to a shutdown.

The same actions are in the header of the instance's own page. The row shows the new state a moment later. Power controls are off while the service is suspended or the instance is moving to another host.

"Instance is suspended"
The service is suspended. Unsuspend it first.
"Instance is migrating"
Coritan is moving the instance to another host. Try again when it has finished.
"Cloud Compute instance not found"
The instance does not belong to one of your organization's services, or it has been terminated.
No instances yet
No customer has ordered a product linked to Cloud Compute.
"Snapshot limit reached"
The instance holds 8 snapshots. Delete one before you take another.
A rebuild answers that the template needs more disk or memory, or is not ready for this instance yet
The instance's plan is smaller than the template needs, or the template is not ready on the host the instance runs on. Choose another template. A template that is not ready may be ready later.
The instance still runs its old system after a rebuild started
We read the instance's SSH keys before we erase anything. When we cannot read them, we stop, and nothing on the instance changes. Start the rebuild again.
"We could not read the current keys, so saving replaces every key on the instance."
The host did not answer when the page opened. Reload the page to try again. To save now, paste every key the instance should keep.
"We could not record this console session, so we did not open it. Try again in a moment."
The API opens a console session only once the audit log holds a record of it, and we could not write the record. Try again.
Reset password… or Regenerate cloud-init… is greyed out
The instance is stopped. Start it first, because the guest agent inside it does the work.

Reads take any member's access token, except the console session and the SSH keys, which take the owner or admin role like every change. {uuid} is the instance's uuid from the list. An instance that is not behind one of your organization's services answers 404.

Shell
curl "https://api.coritan.com/api/v1/orgs/acme/vps?with_total=true&limit=50&power=running" \
  -H "Authorization: Bearer $CORITAN_TOKEN"

The list is newest first and leaves out terminated instances. q searches the hostname, address, operating system, location, host and uuid; location and power (running, stopped, paused or unknown) filter; limit (at most 200) and offset page. Each row's power_state is the one we recorded at the instance's last start, stop, restart, suspension or rebuild, so the list asks no host anything; GET /{uuid}/status asks the host. With with_total=true the page comes as items with its total, counts per power state, locations (each place with its count) and totals for the whole fleet (instances, running, cpu_cores, memory_mb and disk_gb). Without it, and without limit, you get every instance as a bare list.

Start, reboot or stop an instance. action is start, reboot, shutdown or stop (force stop):

Shell
curl -X POST "https://api.coritan.com/api/v1/orgs/acme/vps/{uuid}/power" \
  -H "Authorization: Bearer $CORITAN_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"action": "reboot"}'

Read an instance (the paths are under /api/v1/orgs/acme/vps):

Operation What it returns
GET /templates The operating system templates you can rebuild onto, with their id, name, os_family, os_version, default_username and minimum size. Add ?uuid={uuid} and each one also carries fits, true when a rebuild of that instance takes it, and unfit_reason, the sentence the rebuild would answer, or null.
GET /{uuid} The instance, with its template name and default username, org_service_id (the service it belongs to, as in the list), and any move in progress as migration.
GET /{uuid}/status Its power state now, with its uptime and usage.
GET /{uuid}/config Its configuration, without secrets.
GET /{uuid}/guest What the operating system reports about itself.
GET /{uuid}/graphs Usage over timeframe: hour (the default), day, week, month or year.
GET /{uuid}/bandwidth Its traffic use.
GET /{uuid}/ips Its IP addresses.
GET /{uuid}/console A session for its browser console, with keyboard control. Owner or admin. We add an entry to the audit log for each session, with who opened it, before we hand it out. The console connection accepts the owner's or an admin's access token, and we record each open.
GET /{uuid}/ssh-keys The SSH public keys it receives, as ssh_keys with one per line, and their count. Owner or admin. When the host does not answer, it answers 502.
GET /{uuid}/snapshots Its snapshots.
GET /{uuid}/backups Its backups.
GET /{uuid}/rescue/media The rescue images you can boot it from, each with a volid.

Change an instance (owner or admin):

Operation Body What it does
POST /{uuid}/rebuild template_id Reinstalls the instance from a template. This erases its disk and its snapshots and sets a new password; get one with a password reset. The SSH keys stay. A template the instance cannot take answers 409 with a sentence that says why.
POST /{uuid}/reset-password none Sets a new password and returns it as password.
PATCH /{uuid}/hostname hostname, reboot Renames it. With reboot set to true, a running instance restarts to use the name. A name that breaks the rules above answers 422 with a sentence that says what to change.
PUT /{uuid}/ssh-keys ssh_keys Replaces its SSH public keys, one per line, so start from what GET /{uuid}/ssh-keys returns. An empty string removes them all.
POST /{uuid}/cloud-init/regenerate none Applies its user, password, hostname and network settings again at boot.
POST /{uuid}/snapshots name, description, vmstate Takes a snapshot. name starts with a letter and has up to 40 letters, digits, hyphens or underscores. vmstate set to true saves the memory too. An instance holds up to 8 snapshots.
POST /{uuid}/snapshots/{snapshot_id}/rollback none Returns the instance to a snapshot.
DELETE /{uuid}/snapshots/{snapshot_id} none Deletes a snapshot.
POST /{uuid}/backups note, mode Starts a backup. mode is snapshot (the default), suspend or stop.
POST /{uuid}/backups/{backup_id}/restore none Restores a backup over the instance.
DELETE /{uuid}/backups/{backup_id} none Deletes a backup.
POST /{uuid}/rescue/enter iso_volid Boots the instance from a rescue image.
POST /{uuid}/rescue/exit none Takes the rescue image out and restarts the instance from its own disk.

A suspended instance answers 403 with "Instance is suspended" to most changes, a rebuild included, and an instance on the move answers 409 with "Instance is migrating". One backup or restore runs at a time; another answers 409.

The browser console, the usage graphs, the configuration and what the guest reports are only in the API.

API operations on this page

MethodPathWhat it does
GET/api/v1/orgs/{org_slug}/vpsThe organization's instances, newest first; terminated ones are left out
GET/api/v1/orgs/{org_slug}/vps/templatesTemplates offered and ready on at least one active host
GET/api/v1/orgs/{org_slug}/vps/{uuid}Org get instance
GET/api/v1/orgs/{org_slug}/vps/{uuid}/backupsOrg list backups
POST/api/v1/orgs/{org_slug}/vps/{uuid}/backupsOrg create backup
DELETE/api/v1/orgs/{org_slug}/vps/{uuid}/backups/{backup_id}Org delete backup
POST/api/v1/orgs/{org_slug}/vps/{uuid}/backups/{backup_id}/restoreOrg restore backup
GET/api/v1/orgs/{org_slug}/vps/{uuid}/bandwidthOrg bandwidth
POST/api/v1/orgs/{org_slug}/vps/{uuid}/cloud-init/regenerateOrg regenerate cloud init
GET/api/v1/orgs/{org_slug}/vps/{uuid}/configOrg config
GET/api/v1/orgs/{org_slug}/vps/{uuid}/consoleA display console session with keyboard control, for the owner and org admins
GET/api/v1/orgs/{org_slug}/vps/{uuid}/graphsOrg graphs
GET/api/v1/orgs/{org_slug}/vps/{uuid}/guestOrg guest
PATCH/api/v1/orgs/{org_slug}/vps/{uuid}/hostnameOrg hostname
GET/api/v1/orgs/{org_slug}/vps/{uuid}/ipsOrg IPs
POST/api/v1/orgs/{org_slug}/vps/{uuid}/powerOrg power
POST/api/v1/orgs/{org_slug}/vps/{uuid}/rebuildOrg rebuild
POST/api/v1/orgs/{org_slug}/vps/{uuid}/rescue/enterOrg rescue enter
POST/api/v1/orgs/{org_slug}/vps/{uuid}/rescue/exitOrg rescue exit
GET/api/v1/orgs/{org_slug}/vps/{uuid}/rescue/mediaOrg rescue media
POST/api/v1/orgs/{org_slug}/vps/{uuid}/reset-passwordOrg reset password
GET/api/v1/orgs/{org_slug}/vps/{uuid}/snapshotsOrg list snapshots
POST/api/v1/orgs/{org_slug}/vps/{uuid}/snapshotsOrg create snapshot
DELETE/api/v1/orgs/{org_slug}/vps/{uuid}/snapshots/{snapshot_id}Org delete snapshot
POST/api/v1/orgs/{org_slug}/vps/{uuid}/snapshots/{snapshot_id}/rollbackOrg rollback snapshot
GET/api/v1/orgs/{org_slug}/vps/{uuid}/ssh-keysThe public keys on the instance, so a PUT can start from them: the PUT replaces them all
PUT/api/v1/orgs/{org_slug}/vps/{uuid}/ssh-keysOrg SSH keys
GET/api/v1/orgs/{org_slug}/vps/{uuid}/statusOrg status