Quote:
#aptitude install debootstrap |
D2) create a workspace for vm0 container
Quote:
#mkdir -p /var/lib/lxc/vm0 |
D3) Now debootstrap the debian image for the vm0 container
Quote:
#/usr/lib/lxc/templates/lxc-debian -p /var/lib/lxc/vm0/ |
It will take a
while to complete, and creates a vm0 with a root password 'root'
which we will change in D8 below.
D4) Open
/var/lib/lxc/vm0/config file and add the following at the end
of the file:
Quote:
lxc.utsname
= vm0 |
Change the ipv4 address as per your network. You can add MAC of your
network hardware also by adding a line 'lxc.network.hwaddr =
00:11:22:33:44:55'
D5) Start vm0 by in daemon mode by
executing:
Quote:
#lxc-start -n vm0 -d |
D6) To check if it is running, execute:
Quote:
#lxc-info -n
vm0 (ENTER) |
D7) To get into the vm0, execute:
Quote:
#lxc-console -n vm0 |
D8) change the root password of the vm0 container by executing:
Quote:
#passwd su |
D9) Exit from the container by executing:
Quote:
#poweroff |
command which will bring to the host root console.