Using [HashiCorp Vagrant](https://github.com/hashicorp/vagrant) to run a portable, redeployable [Salt](https://saltproject.io/) lab environment [on my Chromebook](https://runtimeterror.dev/create-vms-chromebook-hashicorp-vagrant/).
The included Vagrantfile spawns a environment with a single Salt Master (named `salt`) and four Salt Minions (named `minion##`) running different common Linux distributions for learning, testing, and development. It leverages the [`libvirt` provider](https://github.com/vagrant-libvirt/vagrant-libvirt) to interact with native Linux virtualization, and has a few tweaks to work around limitations imposed by running this all within ChromeOS's LXC-based [Linux development environment](https://support.google.com/chromebook/answer/9145439).
- The Salt master blindly auto-accepts all minion keys.
- The minions register the `roles:saltlab` grain to aid in targeting.
- The master uses `gitfs` to pull the starter Salt content from this very Github repo.
- Additionally, the contents of `salt_content/local` get `rsync`ed to `/srv/` when the master starts up to make it easier to write/test Salt content locally. This is a one-way `rsync` from host to VM (and not the other way around), so make sure to write your Salt content on the host and use `vagrant rsync` to push changes into the VM.
## Preparation
See [the blog post](https://runtimeterror.dev/create-vms-chromebook-hashicorp-vagrant/) for full details on how I've configured my environment.
Review the Vagrantfile, and adjust `CPU_COUNT` and `MEMORY_MB` if needed. Note that some of the machines won't function correctly with less than `1024` MB.