This may be already old, but still this is way too complicate to do by scripts.
It shouldn´t be too difficult to add setting to virtual machines where autostart could be set.
It is easy to autostart VM by adding virtualbox to autostart when system is rebooted from settings in Linux, Windows and other OSs. But to get autostart to virtual machines is almost impossible.