Revamp vm scripts for building images.