This shows you the differences between two versions of the page.
|
saisp:labs:07:contents:05 [2014/04/13 22:17] alexandru.carp [04. Crearea containerelor] |
saisp:labs:07:contents:05 [2014/04/14 11:42] (current) alexandru.carp |
||
|---|---|---|---|
| Line 1: | Line 1: | ||
| - | ==== 04. Crearea containerelor ==== | + | ==== 05. [10p] Crearea containerelor ==== |
| Pentru a crea in mod facil un container, exista comanda **lxc-create**. Aceasta: | Pentru a crea in mod facil un container, exista comanda **lxc-create**. Aceasta: | ||
| Line 14: | Line 14: | ||
| * fisierul de configurare - ''config'' | * fisierul de configurare - ''config'' | ||
| * sistemul de fisiere - ''rootfs/'' | * sistemul de fisiere - ''rootfs/'' | ||
| + | |||
| + | Creati un nou container, de tip ''debian'', cu numele ''**ct2**''. | ||
| + | |||
| + | Verificati ca a fost creat, folosind ''lxc-ls'': | ||
| + | <code bash> | ||
| + | root@saisp-vm-1:~# lxc-ls | ||
| + | ct1 ct2 | ||
| + | </code> | ||
| + | |||
| + | Inspectati fisierul de configurare creat: | ||
| + | <code bash> | ||
| + | root@saisp-vm-1:~# cat /var/lib/lxc/ct2/config | ||
| + | </code> | ||
| + | |||
| + | Apoi: | ||
| + | * porniti containerul in background | ||
| + | * afisati, pe statia **saisp-vm-1**, ierarhia de procese si observati procesele corespunzatoare celor 2 containere. | ||
| + | * opriti cele doua containere, folosind comanda ''lxc-stop''. | ||