- Just 100%
| .env_sample | ||
| CHANGELOG.md | ||
| justfile | ||
| LICENSE.md | ||
| README.md | ||
just-libvirt
Use Just to manage virtual machines on Linux through libvirt, similar to vagrant but with an open-source license.
Installation and Usage
You'll need to have just installed (see its manual) as well as curl, guestfs-tools, libguestfs, libvirt, qemu-utils, virt-manager, which should all be available via your package manager. Most of these will probably already be installed on your system.
You'll need a .env file that sets various environment variables describing the virtual machines you want to create. See the env_sample file provided. For the operating system names, see virt-install --osinfo list. (However, only recent versions of Debian and Ubuntu are available in this tool at this time.)
Put your .env and the justfile1 from this repository into a directory for managing your virtual machines. If you have different sets of virtual machines you want to manage, you'll need a directory for each set.
Finally, from that directory, run just to see all the commands available:
default # List recipes.
update # Update to latest justfile.
create # Create (and start) the staging environment.
status # Show status of staging environment.
start # Start the staging environment.
stop # Stop the staging environment.
destroy # Destroy the staging environment.
As this is built on top of libvirt, you can always fall back to using virsh if you need to - for instance, if you want to stop or start an individual virtual machine.
-
You can either use
curl -O https://codeberg.org/kdwarn/just-libvirt/raw/branch/main/justfileor the providedjust updatecommand to get the latest version of the justfile. To get the sample .env file, usecurl -O https://codeberg.org/kdwarn/just-libvirt/raw/branch/main/.env_sampleand then rename it to .env. ↩︎