Hi,

I have written a script in the past for my servers.

Kind regards,
Matthias

Something like this:

#!/bin/bash

# Custom variables

LOG=/home/user/virtualbox.log

# end of custom variables

case "$1" in
   start)
         su -c "/usr/bin/vboxwebsrv -b" virtualbox
         su -c "VBoxManage startvm vm1 --type headless" virtualbox
         sleep 30
         su -c "VBoxManage startvm vm2 --type headless" virtualbox
         sleep 30
         su -c "VBoxManage startvm vm3 --type headless" virtualbox
         sleep 30
     ;;
   stop)
         su -c "VBoxManage controlvm vm1 acpipowerbutton" virtualbox
         sleep 30
         su -c "VBoxManage controlvm vm2 acpipowerbutton" virtualbox
         sleep 30
         su -c "VBoxManage controlvm vm3 acpipowerbutton" virtualbox
     ;;
   restart)
         su -c "VBoxManage controlvm vm1 acpipowerbutton" virtualbox
         sleep 30
         su -c "VBoxManage controlvm vm2 acpipowerbutton" virtualbox
         sleep 30
         su -c "VBoxManage controlvm vm3 acpipowerbutton" virtualbox
         sleep 30
         su -c "VBoxManage startvm vm1 --type headless" virtualbox
         sleep 30
         su -c "VBoxManage startvm vm2 --type headless" virtualbox
         sleep 30
         su -c "VBoxManage startvm vm3 --type headless" virtualbox
     ;;
   status)
     ;;
   *)
     echo "Bad argument"
     echo "Usage: $0 start|stop"
     ;;
esac

Op 1/04/13 15:15, Kees Nuyt schreef:
> On Mon, 1 Apr 2013 14:45:39 +0200, you wrote:
>
>> Hello,
>>
>> since I found the autostart at init I wonder how
>> to start off VMs from console just like they
>> were started at init. Is there some method to
>> tell vbox "please autostart now all VMs"?
> AFAIK not in one command. You will have to write a script around the
> VBoxManage command line utility, listing all VM's, and startvm those
> that have a correct status.
>
>


------------------------------------------------------------------------------
Own the Future-Intel® Level Up Game Demo Contest 2013
Rise to greatness in Intel's independent game demo contest.
Compete for recognition, cash, and the chance to get your game 
on Steam. $5K grand prize plus 10 genre and skill prizes. 
Submit your demo by 6/6/13. http://p.sf.net/sfu/intel_levelupd2d
_______________________________________________
VBox-users-community mailing list
VBox-users-community@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/vbox-users-community
_______________________________________________
Unsubscribe:  
mailto:vbox-users-community-requ...@lists.sourceforge.net?subject=unsubscribe

Reply via email to