[Lxc-users] Squeeze Template fix?

Terry--gmail terry.kemmerer at gmail.com
Tue Feb 21 19:44:16 UTC 2012

Hello serge! Thanks for your response!

When you say, "unstable" version, are you referring to something on the
lxc site that I need to compile or are you talking about adding a debian 

Your command-

	lxc-create -t debian -n vm103 -f /etc/lxc.conf

Looks completely different from what I am using under debootstrap:
*	/usr/lib/lxc/templates/lxc-debian -p /var/lib/lxc/vm**1**0**1**/*

I'm not sure how I fit your command into my sequence of instructions as 
it seems we are both
working on different files...or more likely, I'm confused (evidently 
from birth on!). Ha!

I will be looking forward to reading your HOWto very much.  Will you be 
that to this mailing list or should I be looking for it elsewhere when 
it appears?

In a nutshell, below is what I have put together so far, for building my 
lxc setup, which
seems to work...but gets me lenny:

My vm containers are in */var/lib/lxc*

My Host Node's/etc/apt/sources.list looks like this:

deb http://ftp.us.debian.org/debian/ squeeze main
deb-src http://ftp.us.debian.org/debian/ squeeze main

deb http://security.debian.org/ squeeze/updates main
deb-src http://security.debian.org/ squeeze/updates main

# squeeze-updates, previously known as 'volatile'
deb http://ftp.us.debian.org/debian/ squeeze-updates main
deb-src http://ftp.us.debian.org/debian/ squeeze-updates main

Install stuff:
*aptitude install bridge-utils **debootstrap* *lxc*

Change (for STATIC) //etc/network/interfaces :

# The loopback network interface
*auto lo**
iface lo inet loopback*
# The primary network interface
#allow-hotplug eth0
#iface eth0 inet dhcp
#Bridge setup
*auto br0
iface br0 inet static
     bridge_ports eth0
     bridge_fd 0

Then restart the network:

*/etc/init.d/networking restart*

*mkdir /cgroup*

Add the following line in //etc/fstab/ :
*cgroup /cgroup cgroup defaults 0 0*

*mount -a*

Create vm101 container:
*mkdir -p /var/lib/lxc/vm**101*

Debootstrap the debian image for the vm101 container:
*/usr/lib/lxc/templates/lxc-debian -p /var/lib/lxc/vm**1**0**1**/*

Add to the end of the //var/lib/lxc/vm//1//0//1///config/ file:

*lxc.utsname = vm101
lxc.network.type = veth
lxc.network.flags = up
lxc.network.link = br0
lxc.network.ipv4 =*
# lxc.network.hwaddr =
# lxc.network.ipv6 =

Should be ready to use at this point...but this seems to give me Lenny.

Thanks for your thoughts and suggestions! :)

On 02/21/2012 08:27 AM, Serge Hallyn wrote:
> Quoting Terry--gmail (terry.kemmerer at gmail.com):
>> Debian Squeeze Host
>> It appears the template in the sources lxc package is lenny and I
>> have solved what needs to be done to get networking working
>> correctly with this lenny version, BUT I NEED SQUEEZE in my vm's,
>> not lenny.
>> I have been searching for how to change to squeeze, but the
>> solutions I have found on the web so far end in failures for me. For
>> example, the fix I found here ( http://www.jotschi.de/?p=554 ) got
>> further than anything else I have found so far, and really had my
>> hopes up......but ended like this:
>> root at myserver:/usr/lib/lxc/templates# ./lxc-debian squeeze vm103 103
> What version of lxc are you using?  The latest unstable version looks
> like it should default to squeeze, with a separate lxc-lenny template
> existing.
> But, note that you should probably be using lxc-create, rather than
> using lxc-debian directly.  Like this:
> cat>  /etc/lxc.conf<<  EOF
> lxc.network.type=veth
> lxc.network.link=virbr0
> lxc.network.flags=up
> lxc-create -t debian -n vm103 -f /etc/lxc.conf
> If your version still gives you lenny, you could try
> SUITE=squeeze lxc-create -t debian -n vm103 -f /etc/lxc.conf
>> What are you guys using???  And are their detailed step by step
>> instructions I can use to do it?
> I'm working on a detailed guide for the Ubuntu packages.  I should have
> a readable version sometime this week.  Some things will be different
> from the Debian version, but it should be a decent starting point.
> -serge
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.linuxcontainers.org/pipermail/lxc-users/attachments/20120221/273cec9e/attachment.html>

More information about the lxc-users mailing list