Function for caching (creating snapshots) virtual machines
Update tests so that they use snapshots