How to install OpenQRM 4.8 with LXC containers in Debian Squeeze/Ubuntu 10.04 LTS: Step by Step (Page 4)


D) INSTALL DEBOOTSTRAP TO TEST FIRST CONTAINER

D1) You need to install debootstrap for creating templates for the containers, so install it by executing:

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
lxc.network.type = veth
lxc.network.flags = up
lxc.network.link = br0
lxc.network.ipv4 = 192.168.7.110/24

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)
'vm0' is RUNNING

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.


PreviousNext