Changes between Version 10 and Version 11 of IniciarMVDuranteArranque
- Timestamp:
- 29/04/15 10:16:38 (10 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
IniciarMVDuranteArranque
v10 v11 1 1 Articulos de referencia 2 2 [https://www.virtualbox.org/manual/ch09.html#autostart] 3 [http://www.ecualug.org/?q=2011/08/31/forums/script_para_inicio_autom%C3%A1tico_vms_virtualbox]4 3 5 1. Crear un usuario miembro del grupo vboxusers 6 {{{ 7 # gpasswd -a vbox vboxusers 8 }}} 9 2. Añadir y configurar correctamente una o más máquinas virtuales, evitar poner en su nombre espacios en blanco, o símbolos especiales. Si hemos creado la MV con el usuario root, es el momento para importar la maquina utilizando el usuario ''vbox'' 4 [http://www.vionblog.com/virtualbox-4-3-autostart-debian-wheezy/] 10 5 11 3. Crear el directorio /etc/virtualbox 12 {{{ 13 # mkdir /etc/virtualbox 14 }}} 15 4. Crear el archivo mv_habilitadas dentro de /etc/virtualbox. 16 {{{ 17 # touch /etc/virtualbox/machines_enabled 18 }}} 19 5. Listar las máquinas virtuales que existen. 20 {{{ 21 # VBoxManage list vms 22 }}} 23 6. Colocar los nombres de las máquinas que se desea controlar dentro del archivo /etc/virtualbox/mv_habilitadas 6 Before this autostart script the virtual machines ware started usually from rc.local, now you can do it with VirtualBox autostart config. Do the following to enable the autostart service: 24 7 25 1. Modificar o Crear el archivo 8 As root: 26 9 27 {{{ 28 nano /etc/default/virtualbox 29 }}} 10 vi /etc/default/virtualbox 30 11 12 add this lines: 31 13 32 {{{33 14 VBOXAUTOSTART_DB=/etc/vbox 34 VBOXAUTOSTART_CONFIG=/etc/vbox/autostart.cfg 35 }}} 15 VBOXAUTOSTART_CONFIG=/etc/vbox/autostart.conf 16 17 Now change the permissions to the folder for vboxusers 18 19 chgrp vboxusers /etc/vbox 20 chmod 1775 /etc/vbox 21 22 Create the /etc/vbox/autostart.conf and add this users that you want autostart to be enabled, my users for running the virtual machines is vbox 23 24 vi /etc/vbox/autostart.conf 25 26 # Default policy is to deny starting a VM, the other option is "allow". 27 default_policy = deny 28 29 # user vbox is allowed to start virtual machines but starting them 30 # will be delayed for 10 seconds 31 vbox = { 32 allow = true 33 startup_delay = 10 34 } 35 36 Now login as vbox and enable autostart on the machines you want to start automatically, i will do it for two machines called VirtualMachine1 and VirtualMachine2 37 38 VBoxManage setproperty autostartdbpath /etc/vbox 39 VBoxManage modifyvm VirtualMachine1 --autostart-enabled on 40 VBoxManage modifyvm VirtualMachine2 --autostart-enabled on 41 42 Now, as root run this command, or reboot your server: 43 44 /etc/init.d/vboxautostart-service start