Cheat Sheet
Quick command reference for common daily operations.
⚠️ If the
cakedservice is active, do not usecakeddirectly. Usecakectlcommands against the running service.
VM lifecycle (cakectl)
- List VMs:
cakectl list
- Get VM details:
cakectl infos <vm-name>
- Start / stop / restart:
cakectl start <vm-name>cakectl stop <vm-name>cakectl restart <vm-name>
- Launch a new VM:
cakectl launch ...
Authentication for webui (cakectl certificate)
- List registered certificates:
cakectl certificate list
- Add a certificate (from file or stdin):
cakectl certificate add --name <name> <cert.pem>cat cert.pem | cakectl certificate add --name <name>
- Get a certificate (outputs PEM):
cakectl certificate get <fingerprint-or-name>
- Remove a certificate:
cakectl certificate delete <fingerprint-or-name>
Guest access (cakectl)
- Run one command in guest:
cakectl exec <vm-name> -- <command> [args...]
- Open guest shell:
cakectl sh <vm-name>
- Wait for IP:
cakectl waitip <vm-name>
- Open VNC display:
cakectl vnc <vm-name>
Images and registry (cakectl)
- Image list/info/pull:
cakectl image list <remote>cakectl image info <image>cakectl image pull <image>
- Registry auth:
cakectl login <host>cakectl logout <host>
- Push/pull VM images:
cakectl pull <image> <name>cakectl push <local-name> <remote-name>
Networks (cakectl)
- List networks:
cakectl networks list
- Inspect one network:
cakectl networks infos <network>
- Create/start/stop:
cakectl networks create ...cakectl networks start <network>cakectl networks stop <network>
Compose (cakectl compose)
- Initialise a project:
cakectl compose init
- Start all services:
cakectl compose up
- Start specific services:
cakectl compose up app database
- Stop all services:
cakectl compose down
- Show service status:
cakectl compose ps
- Remove and unregister (stop first):
cakectl compose rm --stop
- List all compose projects:
cakectl compose ls
- Use a custom file:
cakectl compose up -f ./infra/staging.yml
.cakerenv environment (cakectl init/up/down)
- Create a
.cakerenvtemplate in the current directory:cakectl init
- Create/start every VM in the file:
cakectl up
- Start only some VMs (their dependencies are not started):
cakectl up app database
- Stop every VM (reverse
depends-onorder):cakectl down
- Use a custom file:
cakectl up -f ./envs/dev.cakerenv
- Format reference:
.cakerenvenvironments
Local daemon/admin (caked)
- Run daemon command directly:
caked <command> ...
- Certificates:
caked certificates getcaked certificates generate
- Service mode:
caked service listen --disable-tls(enable traffic without TLS)caked service listen --tcp(enable listen on tcp)caked service listen --rest(enable LXD REST API)caked service listen --rest --web-ui /path/to/webui/dist(with web UI)caked service statuscaked service stop
- Convert disk images:
caked convert source.qcow2 destination.rawcaked convert --source-format vmdk source.vmdk destination.raw
Useful global options
cakectl --connect <address>cakectl --disable-tlscakectl --systemcaked --log-level <level>caked --json
Docs links
- Detailed command groups: Command Summary
- Troubleshooting: Troubleshooting
Real workflows
1) Create and start a VM
from OCI registry
cakectl build --cpus 4 --memory 8192 --disk-size 40 demo-vm oci://ghcr.io/example/image:latest
from https
cakectl build --cpus 4 --memory 8192 --disk-size 40 demo-vm https://cloud-images.ubuntu.com/releases/noble/release/ubuntu-24.04-server-cloudimg-arm64.img
from simplestream remote
cakectl build --cpus 4 --memory 8192 --disk-size 40 demo-vm ubuntu:noble
choosing the root-disk format (asif is the default on macOS 26+, raw on older hosts — see Disk formats)
cakectl build --cpus 4 --memory 8192 --disk-size 40 --disk-format asif demo-vm ubuntu:noble
⚠️ In the App Store (sandboxed) version, resizing an ASIF disk with
configure --disk-sizeis not available from the command line — use the Caker application or run thediskutil image resizecommand shown in the error message.
2) Start an existing VM, wait for IP, inspect status
cakectl start demo-vm
cakectl waitip demo-vm
cakectl infos demo-vm
3) Open shell and run one command in guest
cakectl shell demo-vm
cakectl exec demo-vm -- uname -a
4) Connect to VM display via VNC
cakectl start demo-vm
cakectl vnc demo-vm
5) Convert a QCOW2 or VMDK image to raw
# QCOW2 (default)
caked convert ubuntu-cloud.qcow2 ubuntu.raw
# VMDK
caked convert --source-format vmdk disk.vmdk disk.raw
6) Push a local VM image to remote registry
cakectl login ghcr.io --username <username> --password <password>
cakectl push demo-vm ghcr.io/<owner>/demo-vm:latest
cakectl logout ghcr.io
7) Create and manage a shared network
cakectl networks create --mode shared --gateway 192.168.105.1 --dhcp-end 192.168.105.254 --netmask 255.255.255.0 shared-dev
cakectl networks start shared-dev
cakectl networks infos shared-dev
cakectl networks stop shared-dev
8) Create a macOS VM from an IPSW (unattended Setup Assistant)
Apple Silicon only. Requires --autoinstall to trigger PackerLite. The macOS version is detected from the IPSW filename; otherwise pass --macos-version — see PackerLite.
cakectl build my-macos-vm --user admin --password admin --autoinstall \
https://updates.cdn-apple.com/.../UniversalMac_26.6_25G72_Restore.ipsw
# non-standard filename: an explicit macOS version is required
cakectl build my-macos-vm --user admin --password admin --autoinstall --macos-version macos26 ./restore.ipsw
9) Create a Linux VM from a non-Ubuntu ISO (unattended provisioning)
Requires --autoinstall. For Fedora, CentOS Stream, RHEL, openSUSE, or Debian, the template is auto-selected from the ISO filename — see PackerLite.
cakectl build my-fedora-vm --user admin --password admin --autoinstall \
./Fedora-Workstation-Live-x86_64-42.iso
For any other distro, --template is required:
cakectl build my-linux-vm --user admin --password admin --autoinstall \
--template ./my-distro.packerlite.yaml ./my-distro.iso