Automated development virtual machine setup for students using Ansible. Created to reduce the time spent in classrooms downloading and configuring virtual machines.
- ✅ Lightweight - Runs smoothly on modest hardware (tested with 2 GiB RAM)
- ✅ Compact - Initial VirtualBox disk size: ~4 GiB (~1 GiB when compressed)
- ✅ Preconfigured tools - comes with development software and setup scripts
- 🟡 Telemetry (opt-out, planned)
- PHP and Composer
- Python
- Sqlite3
- VSCode and Git
- Node.js and npm
- MariaDB
- Github cli
- Create a Virtualbox VM
- At least 2 GiB RAM is recommended for using an IDE and a browser at the same time
- A 20 GB VDI disk should be enough, adjust for your requirements
- Install Debian 13
- Select
en_US.UTF-8 locale
- Set the hostname e.g. devvm
- Create users (or update
hosts
)- Set root password to
pass
- Create
user
with passwordpass
- Set root password to
- Partition disks
- Select "Guided - use entire disk" and "All files in one partiton" for a simple setup
- Manually create a single bootable ext4 partition for a swapless setup
- Software selection - select only
SSH server
- Select
- Prepare the VM for ansible (after booting it for the first time)
- Update VM network settings in VirtualBox
Settings > Network > Attached to > Bridged Adapter
- Log in as root
su -
- Restart network service
systemctl restart networking
- Get the ip address with
ip a
and updatehosts
in this repository - Install sudo and python for Ansible
apt install sudo python3
- Add user to sudoers
adduser user sudo
- Copy key by SSH-ing into the VM
ssh [email protected]
- Update VM network settings in VirtualBox
- Setup the VM
ansible-playbook playbooks/setup.yml
- Edit
group_vars
to customize your setup
- Edit
- Add telemetry
ansible-playbook playbooks/telemetry.yml
- Remove all unnecessary files
ansible-playbook playbooks/cleanup.yml
- On VM, run
clear-tmp
andclear-disk
, then shut it down - On host, run
vboxmanage modifymedium /mnt/storage/VBOX/phpdev/phpdev.vdi --compact
- Edit this path to match your .vdi file
It is recommended to run new versions of these playbooks on a fresh Debian install. However, in most cases, re-running them should work without issues.
For details on changes, check the Releases page on GitHub.
Before submitting a pull request, please discuss your proposed changes in an issue first. Major changes are generally not accepted, as this project is customized for my requirements. For such changes it is recommended to create your own fork of this project. However, feel free to open an issue if you encounter a problem or have any questions.
Note
Versions below v4
are licensed under the terms of the Unlicense.
This project is licensed under the terms of the MIT license. See the LICENSE file for more information.