informatica:linux:virtualizacion:lxc
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
informatica:linux:virtualizacion:lxc [2015/08/06 21:40] – jose | informatica:linux:virtualizacion:lxc [2015/08/06 23:09] (current) – jose | ||
---|---|---|---|
Line 129: | Line 129: | ||
Por ejemplo: | Por ejemplo: | ||
lxc-create -t debian -n mldonkey | lxc-create -t debian -n mldonkey | ||
+ | Cuando la crea te da la password de root. | ||
+ | La podemos arrancar: | ||
+ | root@alcala: | ||
+ | Mirar como está | ||
+ | root@alcala: | ||
+ | Name: | ||
+ | State: | ||
+ | PID: 15393 | ||
+ | CPU use: 0.07 seconds | ||
+ | BlkIO use: 0 bytes | ||
+ | Todas los contenedores | ||
+ | root@alcala: | ||
+ | NAME STATE IPV4 IPV6 AUTOSTART | ||
+ | ---------------------------------------- | ||
+ | mldonkey | ||
+ | Podemos entrar en ella | ||
+ | root@alcala: | ||
+ | root@mldonkey: | ||
+ | |||
+ | Vemos que tiene el mismo kernel que el host | ||
+ | root@alcala: | ||
+ | Linux alcala 3.16.0-4-amd64 #1 SMP Debian 3.16.7-ckt11-1+deb8u2 (2015-07-17) x86_64 GNU/Linux | ||
+ | | ||
+ | root@mldonkey: | ||
+ | Linux mldonkey 3.16.0-4-amd64 #1 SMP Debian 3.16.7-ckt11-1+deb8u2 (2015-07-17) x86_64 GNU/Linux | ||
+ | |||
+ | ====== RED ====== | ||
+ | En el host tenemos que crear un bridge con nuestra tarjeta de red: | ||
+ | < | ||
+ | auto br0 | ||
+ | iface br0 inet dhcp | ||
+ | bridge_ports eth0 | ||
+ | bridge_fd 0 | ||
+ | bridge_maxwait 0 | ||
+ | </ | ||
+ | |||
+ | En el fichero de configuración por defecto ponemos que cada máquina tenga una interficie con el bridge: | ||
+ | / | ||
+ | | ||
+ | lxc.network.type = veth | ||
+ | lxc.network.flags = up | ||
+ | lxc.network.link = br0 | ||
+ | | ||
+ | Cuando creemos una máquina le pondrá esa configuración, | ||
+ | / | ||
+ | |
informatica/linux/virtualizacion/lxc.1438897223.txt.gz · Last modified: 2015/08/06 21:40 by jose