Introduction¶ ↑
The VMTH (Virtual Machine Test Harness) provides a mechanism to unit-test your infrastructure automation - puppet policies, chef recipes, release deployment scripts, etc. It uses features of modern VM monitors (like qemu) to snapshot system state, and then reset that state after each test, so that a series of tests can be performed on a VM instance in rapid succession.
It can be integrated with your continuous integration environment and triggered each time a commit is made to your automation code.
What it does¶ ↑
It will go through a series of scenarios (a scenario is usualy a service name). It will run the ‘prep’ steps, freeze the vm, then run one scenario at a time, and unfreeze after each scenario.
Getting started¶ ↑
See QUICKSTART to get started.
Command-line tools¶ ↑
Gochas¶ ↑
Took a while to track down a bug where our VM instance was running out of memory and then crashing. It just appeared that qemu just plain exited without error. traced it to the guest having vm.panic_on_oom to 1 - which causes the kernel to panic and exit if we run out of memory.
Here is the Vmth class documentation.
Config file format¶ ↑
See sample_config.yaml for the vmth config file format.
Support¶ ↑
For support or to report bugs open an issue at the gitub issue tracker: