Various improvements in "make sure VM is ready to start" logic