Quickstart
This walks through creating a VM, configuring it, provisioning it, and opening a shell inside it.
1. Scaffold a VM
Section titled “1. Scaffold a VM”dvm new app # writes ~/.config/dvm/vms/app/{config.sh,setup.sh} # and scaffolds ~/.config/dvm/config.sh on first run2. Edit the config
Section titled “2. Edit the config”Resource and user settings live in the global ~/.config/dvm/config.sh and apply
to every VM. The per-VM config only holds what this VM needs to differ on:
DVM_MEMORY=4 # more RAM than the global default for this VMDVM_PORTS=(3000:3000 5173:5173) # extra forwards on top of Lima's automatic onesSee the config reference for every variable.
3. Edit the setup script
Section titled “3. Edit the setup script”The setup script runs inside the guest during dvm sync. Install whatever your
project needs here:
#!/usr/bin/env bashset -Eeuo pipefail
sudo dnf5 install -y git ripgrep fd-find tmuxBrowse Examples for copy/paste setup snippets.
4. Build and enter
Section titled “4. Build and enter”DVM_DRY_RUN=1 dvm sync app # preview the Lima argv + setup order, no Lima contactdvm sync app # create/start the VM and run setup scriptsdvm sh app # open a shell as the dev userWhen you’re done, stop or destroy the VM:
dvm stop appdvm rm app --yes # add --config to also delete ~/.config/dvm/vms/app5. Bake a base image (recommended for many VMs)
Section titled “5. Bake a base image (recommended for many VMs)”If every VM installs the same tooling, the per-sync setup gets slow and the setup script gets long. Bake that shared tooling once into a base image and every VM boots from it:
dvm base init # writes ~/.config/dvm/base/Containerfile# edit it: FROM dvm-base, then your packages and binariesdvm base build # builds the image in a throwaway builder VMdvm sync app # now boots from the base image, ready in secondsPer-VM setup.sh still runs for unique, stateful steps (SSH keys, dotfiles,
tunnels). See the base image reference for the full
workflow.
6. Run many projects in one VM (optional)
Section titled “6. Run many projects in one VM (optional)”Instead of a VM per project, group projects by trust tier in one pool VM, each running as a disposable container you can reset in seconds:
dvm new trusted # a pool VM for this trust tierdvm add trusted/api # define a project (container) under the VMdvm sync trusted # bring up the VM and every project containerdvm sh trusted/api # shell into the api containerdvm reset trusted/api --yes # recreate just that container, cleanSee Trust tiers & project containers for the model.
See the Commands reference for the full CLI.
Built and maintained by eshlox.