Preparing virtual machines first and then everything else to help placement

fixes #586