Restart a VM

A clean shutdown, then a boot from the disk. The running programs stop, and the files stay.

POST /v1/tenants/{tenant}/vms/{name}/restart

curl -X POST "https://api.shako.dev/v1/tenants/acme/vms/web1/restart" \
  -H "Authorization: Bearer $SHAKO_API_KEY"

200 (excerpt)

{
  "name": "web1",
  "tenant": "acme",
  "state": "awake",
  "ssh": "web1.acme.shako.dev",
  "vcpus": 1,
  "mem_mib": 2048,
  "disk_gb": 10
}

Authenticate with Authorization: Bearer <API key> on https://api.shako.dev. Role: contributor or owner.

Path parameters

tenantstringrequired
The tenant's name, from GET /v1/tenants.
namestringrequired
The VM's name.

Response

200 with the VM object.

Behavior

A sleeping VM wakes first, so that it can shut down cleanly.

The errors. All the endpoints of VMs.