How to setup OpenQRM 4.7 with LXC Supprt in Debian Squeeze/Lenny

Discussion in 'HOWTO-Related Questions' started by zenny, Oct 4, 2010.

  1. zenny

    zenny Member

    How to setup OpenQRM 4.7 with LXC Support in Debian Squeeze/Lenny

    After reading interesting posts with the posters having interest in OpenQRM:

    I thought of writing this tutorial on OpenQRM as soon as its 4.7 version was realeased. Please find below the tutorial (I have also submitted as an article, but do not exactly know whether I submitted right. Falko may know ;-)


    How to install OpenQRM 4.7 with LXC containers in Debian Squeeze/Lenny: Step by Step

    OpenQRM 4.7 ( was released on September 30, 2010 with LXC support. Wonderful product. Videos of this enterprise grade datacenter management framework is available at I hope that this information is useful to those who are interested. And thanks to Matt and OpenQRM developers for the hard work!

    DISCLAIMER: This is something that worked for me. I do not bear responsibility if something breaks down. You need at least a 100GB for this for basic setup.

    © zenny - Support the Human Ape Project if you like this tutorial. Click here to support. This tutorial cannot be copied or linked or tweeted without this line.


    A1) Download Debian Squeeze netboot CD from
    A2) It will first ask to set up root user password and ask to create a new user. Give the root password twice and create a new user. It will also ask to give the machine's domain and give whatever you like or your tld name.
    A3) Create 3 partitions. 512MB (1/2GB) for /boot, 2GB for Swap and rest for /. Format /boot as ext4 and / as LVM. (you can find more info on how to create LVM2 volume online or can just follow the installer guideline).
    A4) When it asks what to install, deselect everything including 'Standard Adminstration Utilities'. And also uncheck 'Graphical Desktop Environment'.
    A5) Once the setup is complete, just reboot.


    B1) First install bridge utilities.
    B2) Make changes to the /etc/network/interfaces from:

    to (for static IP):

    Change the address, netmask, gateway (find from 'route' command) and dns-nameservers as appropriate.

    Then restart the network:


    C3) Add the following line in /etc/fstab using a text editor:
    You will see something like below:

    The only thing that you cannot do with the vanilla debian squeeze kernel reporting 'Cgroup memory controller: missing' parameter is to allocate memory. One can recompile the kernel with memory controller enabled in a debian way (shall explain in another tutorial if needed), but it hogs 2-3% of CPU resources.


    D1) You need to install debootstrap for creating templates for the containers, so install it by executing:
    D2) create a workspace for vm0 container
    D3) Now debootstrap the debian image for the vm0 container
    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:

    Change the ipv4 address as per your network. You can add MAC of your network hardware also by adding a line ' = 00:11:22:33:44:55'

    D5) Start vm0 by in daemon mode by executing:
    D6) To check if it is running, execute:
    D7) To get into the vm0, execute:
    D8) change the root password of the vm0 container by executing:
    D9) Exit from the container by executing:
    command which will bring to the host root console.


    E1) Download the source of OpenQRM 4.7:
    E2) Uncompress the archive:
    E3) Move to openqrm source directory
    It will install all the necessary dependency if run as root. Else you have to install each dependency manually.

    E5) Install
    E6) Run
    It will take some time as it installs and configures several stuffs.

    E6.1) It will first ask to setup the root password for the mysql server. Set one of your liking, but not a dictionary word.

    E6.2) Again it willl ask the nagios admin password. Supply one but different from the mysql root password.

    E6.3) It will ask then to set up the workgroup for SAMBA. I just went with default 'WORKGROUP'.

    E6.4) It will ask for postfix domain for SMTP, please specify the tld domain you want to use or else go with 'localhost.localdomain'.

    E6.5) It will ask the location of root for tftp and just go with default /srv/tftp.

    E7) After successful installation, it outputs like:


    F1) You need to create a database for OpenQRM before you log into the web interface of OpenQRM as reported in E7 above.

    F2) So create a mysql database:
    Supply the password for the root set up in E6.2 above. And you will land at mysql prompt:
    F3) Grant privileges.
    Change the username and secret of your liking.

    F4) Flush privileges

    G1) Now open http://[your-server-ip-address]/openqrm/ in a browser. A pop-up menu asks you to enter the default admin username and password (openqrm : openqrm) which you supply as reported in E7 above.

    G2) You will see OpenQRM configuration manager which will ask you which network card to use. Choose 'br0' and press 'next'.
    [Screenshot available]

    G3) Then it will ask which database type you want. Select 'mysql' and press 'next'.
    [Screenshot available]

    G4) Then it will ask to fill in the details of the database for openqrm. Use the same credentials that you created in Step F above.
    [Screenshot available]

    G5) After a while, you will see the OpenQRM dashboard.
    [Screenshot available]

    G6) First click on the 'Plugin Manager' You will see a list of plugins. Now activate the plugin one by one as follows in order:

    G6.1) Activate the 'dhcpd' plugin by clicking on the green cross and then start by pressing on the blue start icon. You can see some hints by hovering over the mouse, too.
    [Screenshot available]

    G6.2) Activate and start the 'tftpd' plugin as stated above in G6.1.
    [Screenshot available]

    G6.3) Activate and start the 'lvm-storage' plugin as stated above in G6.1.
    [Screenshot available]

    G6.4) Activate and start the 'lxc-storage' plugin as stated above in G6.1.
    [Screenshot available]

    You can activate and start whatever you need further.

    G7) Now click on Components >> Create >> Storage, you will see your LVM Storage as resource.
    [Screenshot available]

    G8) Then create images.

    For further usage of OpenQRM 4.7, I suggest you to visit and read the documentation which is very comprehensive and meticulous. Enjoy!

    Last edited: Oct 5, 2010
  2. eddiechen

    eddiechen New Member HowtoForge Supporter

    Excellent, I waiting to read the article.

Share This Page