The VM object

A VM. Create, get, update, the actions and copy answer with it; list answers with a list of it.

{
  "name": "web1",
  "tenant": "acme",
  "id": 12,
  "vm_id": "vm_3f9a1c0b7d2e4f6a",
  "state": "awake",
  "vcpus": 1,
  "mem_mib": 2048,
  "disk_gb": 10,
  "image": "2026.10.27.1",
  "sleep_policy": "auto",
  "idle_minutes": 15,
  "ip": "10.200.0.50",
  "ssh": "web1.acme.shako.dev",
  "created_at": 1793491200,
  "last_active": 1793494800,
  "last_active_reason": "SSH",
  "snapshot": null,
  "snap_at": null,
  "awake_hours": 12.5,
  "gb_hours": 25,
  "disk_gb_hours": 1240,
  "last_error": null,
  "agents": [
    "claude"
  ],
  "desktop": false,
  "next_wake": null,
  "wake_on_cron": true,
  "wake_on_chat": true,
  "backup": true,
  "after_delete": "keep-7d",
  "resources": [
    {
      "id": "ram",
      "used": 805306368,
      "total": 2147483648,
      "pct": 37,
      "limit_pct": 90,
      "over": false
    },
    {
      "id": "disk",
      "used": 3221225472,
      "total": 10737418240,
      "pct": 30,
      "limit_pct": 90,
      "over": false
    }
  ],
  "role": "contributor"
}

Fields

namestring
The VM's name, unique in its tenant.
tenantstring
The VM's tenant.
idnumber
The number of the VM on its host. Use the name to call the API.
vm_idstring | null
The VM's id in Shako. It stays the same after a rename.
stateVmState
The state of the VM: see the table of the states.
vcpusnumber
The vCPUs.
mem_mibnumber
The memory, in MiB.
disk_gbnumber
The disk, in GB.
imagestring
The image release that the VM booted.
sleep_policySleepPolicy
auto: the VM sleeps when it is quiet. never: it stays on.
idle_minutesnumber
The quiet minutes before the VM sleeps, with the sleep policy auto.
ipstring
The VM's address in its host's private network. A program outside Shako does not need it.
sshstring
The VM's SSH name: ssh web1.acme.shako.dev.
created_atnumber
When the VM was created, as a Unix time in seconds.
last_activenumber
The time of the VM's last activity.
last_active_reasonstring
What the last activity was, for example SSH, HTTPS, CPU or scheduled wake.
snapshotstring | null
The kind of the memory that a sleeping VM saved on its disk, or null when it has none.
snap_atnumber | null
When the VM saved its memory, or null.
awake_hoursnumber
The hours that the VM was awake.
gb_hoursnumber
The memory in GiB times the hours awake.
disk_gb_hoursnumber
The disk in GB times the hours, awake and asleep.
last_errorstring | null
The last error of the VM, or null.
agentsAgentId[]
The agents in the VM.
desktopboolean
true: the VM has a screen and a shared browser.
next_wakeNextWake | null
When Shako wakes the sleeping VM before its next cron job, or null.
wake_on_cronboolean
true: after each sleep, the VM wakes 2 minutes before its next cron job.
wake_on_chatboolean
true: a chat message wakes the VM.
backupboolean
true: each night, Shako backs up the VM if its disk changed. false: no new backups, and the old backups go 7 days after they were taken.
after_deleteAfterDelete
What happens to the VM's backups when the VM is deleted. keep-7d: they stay 7 days, then Shako erases them. erase: Shako erases them within a few minutes.
resourcesResourceUse[]
The use of the memory and the disk inside the VM. [] when the VM is not awake.
roleVmRoleoptional
The VM's role in its tenant: contributor or none.

States

StateMeaning
creatingShako makes the VM's disk.
bootingThe VM boots.
awakeThe VM runs. Its memory and its disk use credit.
sleepingThe VM saves its memory on its disk.
asleepThe VM's memory is on its disk. Only the disk uses credit. An SSH login, a request to a public port, a cron job (wake_on_cron) or a chat message (wake_on_chat) wakes it.
wakingThe VM loads its memory again.
stoppedThe VM is off, with no memory on its disk. A wake boots it from its disk.
deletingShako deletes the VM.
failedA create or a boot failed. last_error says why.