Gather most of the environment variables into one place
Add a hook so additional scripts can be run after creating VM

See trac #11240