VirtualBox VBoxManage for autostart

I have a script tact:/etc/vbox/register-autostart.sh which will register a VirtualBox VM for auto-start. It required other config in /etc/vbox the details of which I don’t remember, but I think it’s done now anyway… there’s more information in Starting virtual machines during system boot.

  online "$machine" && {

    report "halting machine '$machine'...";

    ssh "$machine" sudo poweroff;

    report "waiting a moment...";

    sleep 8;

  };

  run VBoxManage modifyvm "$machine" --autostart-enabled on;

  run sudo service vboxautostart-service restart;