Commands
dvm sync <vm> | --all create/start VM and run setup scriptsdvm sh <vm> interactive shell as DVM_USERdvm ssh <vm> -- cmd... run one command as DVM_USERdvm cp <src> <dst> copy a file; one side is vm:pathdvm ls [--only-config] [<vm>] list dvm-* Lima instancesdvm stop <vm> | --all [--only-config] stop instancesdvm rm <vm> --yes [--config] stop and delete the instancedvm new <vm> write starter config and setup scriptdvm versiondvm with no args runs dvm ls.
Loads config, creates or starts dvm-<vm>, ensures DVM_USER and
DVM_CODE_DIR exist, provisions subordinate uid/gid ranges, then runs the setup
scripts (global, then per-VM). See config.md.
DVM_DRY_RUN=1 dvm sync app # print Lima argv + setup order, no Lima contactdvm sync appdvm sync --all # sync every VM with a configsh / ssh
Section titled “sh / ssh”dvm sh opens DVM_USER’s login shell, starting in the project directory when
it exists. dvm ssh runs one command as DVM_USER.
dvm sh appdvm ssh app -- sudo journalctl -fOne side must be vm:path. Relative VM paths resolve under
/home/<DVM_USER>/code/<vm> and copy as DVM_USER; absolute VM paths are used
as given. When the VM destination ends in / or names an existing directory,
the file is copied into it under its own name; a bare vm: copies into the
project root. Directory copies are not supported. Use ./tmp:notes.txt for a
local path containing a colon.
dvm cp ./file app:/tmp/file # to an exact pathdvm cp ./file app:notes.txt # to code/app/notes.txtdvm cp ./file app: # into the project root, keeping the namedvm cp app:notes.txt ./fileLifecycle
Section titled “Lifecycle”dvm ls and dvm stop --all operate on dvm-* Lima instances. Add
--only-config to limit them to instances that have
~/.config/dvm/vms/*/config.sh.
dvm rm <vm> --yes deletes the Lima instance. Add --config to also remove
~/.config/dvm/vms/<vm>.
Built and maintained by eshlox.