...
- Cloud-config - An automation-tool which lets you define what to install and configure in your VM at first boot.
- Post-installation scripts - Shell-scripts (ie: bash for Linux or cmd/powershell for windows).
Automatic creation of a set of customized virtual machines
The tools mentioned above, like cloud-config, can be used in simple-ish scripts to automate the creation of sets of virtual machines to classes etc. A couple of example-scripts for this is placed in one of our github repositories.