Everyday instance administration
This is the daily command page: create, inspect, enter, change, snapshot, and delete instances.
List and inspect
incus list
incus list --format compact
incus info web-01
incus config show web-01
incus config show web-01 --expanded
Use --expanded when profiles are involved. It shows the final merged configuration.
Create instances
Container:
VM:
Create without starting:
Lifecycle commands
incus start web-01
incus stop web-01
incus restart web-01
incus pause web-01
incus start web-01
incus delete web-01
incus delete web-01 --force
Prefer a clean stop first:
Use --force only when the instance will not stop or you are deleting a disposable lab.
Shell and exec
incus shell web-01
incus exec web-01 -- bash
incus exec web-01 -- systemctl status nginx
incus exec web-01 -- journalctl -u nginx --no-pager -n 100
For VMs launched from cloud images, wait until cloud-init and the agent are ready:
If you see VM agent isn't currently running, wait and retry before assuming the VM failed.
Copy files
Push a file into an instance:
Pull a file out:
Copy directories recursively:
Resource limits
incus config set web-01 limits.cpu 2
incus config set web-01 limits.memory 2GiB
incus config unset web-01 limits.memory
Check effective config:
Environment and metadata
user.* keys are useful for notes and automation metadata.
Snapshots
Create a snapshot before risky work:
List snapshots:
Rollback:
Delete old snapshot:
Rename, copy, and move
Move between remotes:
A good daily workflow
incus list
incus snapshot app-01 before-change
incus shell app-01
incus restart app-01
incus info app-01
incus delete app-01/before-change
Snapshot first, change second, verify third, clean up old snapshots last.