This repo is just a collection of template and project specific Vagrantfiles that I created as a way to learn Vagrant and more quickly stand-up development VMs for working on other projects. I'm not looking to start a huge project, but I thought others might get use from them.
I made some design choices that others might find questionable. For example, I deliberately skipped taking advantage of the File Provisioner in some places in favor of making completely self contained Vagrantfiles. For the project-specific ones, I don't do a fresh clone of the project but rather attach a pre-existing clone to /vagrant (That said, the script used to set-up the project is copied to the VM so you can always clone fresh and re-run the script). And possibly most obviously, I'm doing a ton in shell provisioners which would be better suited for a configuration management tool like Ansible, which I know pretty intimately even. I'm just seeing how far I can push the monolithic Vagrantfile without additional tools required.
So, while I'm definitely open to feedback and PRs (particularly for security issues), you will probably find it best to just fork/copy/mod what suits your fancy.
Happy Virtualizing, H Dub
Install:
- Vagrant
- VirtualBox
- VirtualBox Guest Additions - for shared directories between host and guest
Important
If you are an Ansible user, both of these can be installed in one shot using my install_virtualization_tools.yml playbook over in my ansible-collection-infrastructure repo.
Below is the general usage steps for these files. More specific instructions are included with each Vagrantfile.
-
For project-specific VMs, copy or symlink the desired Vagrantfile to the top level of the project you want to use it with (for example, copy or symlink it where you cloned the podman project for the podman VM).
-
Update customizeable settings, if desired:
a. For templates, like the Kali VM, copy the
defaults.ymlfile tooverrides.yml, and update the desired values.b. For project-specific VMs, you shouldn't need to do anything, but if you really need to, update the desired variables in the block at the top of the Vagrantfile.
-
Run
vagrant upin the directory containing the Vagrantfile.
All Templates are customizeable with an overrides file/dir, or a few variables at the top of their respective Vagrantfiles. Click on the Template name for a more detailed README.
| Template | Version | Why Use | Description |
|---|---|---|---|
| claude | 2.0 | Use to develop with the Claude Code CLI in an isolated VM. This is my go-to development VM. | Using bento/ubuntu-24.04:
|
| kali | 4.0 | General hackery | Using kalilinux/rolling:
|
| python | 1.0 | Copy and use in a Python based project | Using debian/bookworm64:
|
Project specific VMs are meant to correspond to Github projects which don't already have a Vagrantfile.
| Project | Vagrantfile | Version | Template |
|---|
I can't imagine anyone would be interested in this, but I'm in the process of adding some linting pre-commit hooks, and would ask that new changes pass. To have them automatically run, execute:
# from anywhere in the project
git config core.hooksPath "$( git rev-parse --git-dir )"/.githooksImportant
The commitlint hook requires either podman or npx (Node) to be available.
Dealer's choice. If you have docker, you should be able to just
alias podman=docker and it should work. (lmk ha).