kvbox.sh

Quickstart

Boot a box, get a shell, run a command, take a snapshot, clone it.

With the CLI installed and either logged in or on a machine running kvbox-server:

Boot a box

kvbox new dev

A fresh box named dev boots from the base image: 2 vCPU, 4 GB of RAM, 8 GB of disk by default, with an IP and your SSH key. Leave the name out and you get box1, box2, and so on. kvbox ls shows every box you can see, with status and address.

Get a shell

kvbox connect dev

connect opens a shell over SSH. If the box is stopped it starts it first; if it is paused or hibernated it brings it back. kvbox cn is the short form.

Run one command

kvbox exec dev -- 'cd /app && npm test'

exec runs a command and exits with the command's status, so it drops into scripts and CI as it is. See Connect and exec for env vars, stdin, timeouts and --json.

Snapshot and clone

kvbox snapshots new dev warm
kvbox new --from warm dev2

The snapshot freezes memory, CPU state and disk; dev keeps running. dev2 starts from it already warm, every process where it was. See Snapshots.

Put it away

kvbox stop dev        # power off, files kept
kvbox hibernate dev   # RAM to disk, wake continues where it left off
kvbox rm dev          # delete it (asks y/N; -y in scripts)

On this page