Changes between Version 10 and Version 11 of IniciarMVDuranteArranque


Ignore:
Timestamp:
29/04/15 10:16:38 (10 years ago)
Author:
jguerra
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • IniciarMVDuranteArranque

    v10 v11  
    11Articulos de referencia 
    22[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] 
    43 
    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/] 
    105 
    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 
     6Before 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: 
    247 
    25  1. Modificar o Crear el archivo  
     8As root: 
    269 
    27 {{{ 
    28 nano /etc/default/virtualbox 
    29 }}} 
     10vi /etc/default/virtualbox 
    3011 
     12add this lines: 
    3113 
    32 {{{ 
    3314VBOXAUTOSTART_DB=/etc/vbox 
    34 VBOXAUTOSTART_CONFIG=/etc/vbox/autostart.cfg 
    35 }}} 
     15VBOXAUTOSTART_CONFIG=/etc/vbox/autostart.conf 
     16 
     17Now change the permissions to the folder for vboxusers 
     18 
     19chgrp vboxusers /etc/vbox 
     20chmod 1775 /etc/vbox 
     21 
     22Create 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 
     24vi /etc/vbox/autostart.conf 
     25 
     26# Default policy is to deny starting a VM, the other option is "allow". 
     27default_policy = deny 
     28 
     29# user vbox is allowed to start virtual machines but starting them 
     30# will be delayed for 10 seconds 
     31vbox = { 
     32 allow = true 
     33 startup_delay = 10 
     34} 
     35 
     36Now 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 
     38VBoxManage setproperty autostartdbpath /etc/vbox 
     39VBoxManage modifyvm VirtualMachine1 --autostart-enabled on 
     40VBoxManage modifyvm VirtualMachine2 --autostart-enabled on 
     41 
     42Now, as root run this command, or reboot your server: 
     43 
     44/etc/init.d/vboxautostart-service start