<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body text="#000000" bgcolor="#ffffff">
<font size="+1">Hello serge! Thanks for your response!<br>
</font><font size="+1"><br>
When you say, "unstable" version, are you referring to something
on the <br>
lxc site that I need to compile or are you talking about adding a
debian repository?</font><br>
<font size="+1"><br>
Your command-<br>
</font>
<pre wrap=""><big> lxc-create -t debian -n vm103 -f /etc/lxc.conf
<big>
Looks completely different from what I am using under debootstrap:
</big><font color="#008000"><b> /usr/lib/lxc/templates/lxc-debian -p /var/lib/lxc/vm</b></font><font color="#ff0000"><b>1</b></font><font color="#ff0000"><b>0</b></font><font color="#ff0000"><b>1</b></font><font color="#008000"><b>/</b></font></big>
</pre>
<big>
I'm not sure how I fit your command into my sequence of
instructions as it seems we are both <br>
working on different files...or more likely, I'm confused
(evidently from birth on!). Ha!</big> <br>
<br>
<font size="+1">I will be looking forward to reading your HOWto very
much. Will you be sending <br>
that to this mailing list or should I be looking for it elsewhere
when it appears?<br>
<br>
In a nutshell, below is what I have put together so far, for
building my lxc setup, which <br>
seems to work...but gets me lenny:<br>
<br>
My vm containers are in <b>/var/lib/lxc</b><br>
<br>
</font><font size="+1">My Host Node's<font color="#000000"> </font></font>
<style type="text/css">p { margin-bottom: 0.08in; }</style>
<big><font color="#000000"><big><font size="2"><big><big>/etc/apt/sources.list</big></big></font></big>
</font>looks like this:</big><br>
<br>
deb <a class="moz-txt-link-freetext" href="http://ftp.us.debian.org/debian/">http://ftp.us.debian.org/debian/</a> squeeze main<br>
deb-src <a class="moz-txt-link-freetext" href="http://ftp.us.debian.org/debian/">http://ftp.us.debian.org/debian/</a> squeeze main<br>
<br>
deb <a class="moz-txt-link-freetext" href="http://security.debian.org/">http://security.debian.org/</a> squeeze/updates main<br>
deb-src <a class="moz-txt-link-freetext" href="http://security.debian.org/">http://security.debian.org/</a> squeeze/updates main<br>
<br>
# squeeze-updates, previously known as 'volatile'<br>
deb <a class="moz-txt-link-freetext" href="http://ftp.us.debian.org/debian/">http://ftp.us.debian.org/debian/</a> squeeze-updates main<br>
deb-src <a class="moz-txt-link-freetext" href="http://ftp.us.debian.org/debian/">http://ftp.us.debian.org/debian/</a> squeeze-updates main<br>
<br>
Install stuff:<br>
<font color="#008000"><b>aptitude
install bridge-utils </b></font><font color="#008000"><b>debootstrap</b></font>
<font color="#008000"><b>lxc</b></font>
<style type="text/css">p { margin-bottom: 0.08in; }</style>
<style type="text/css">p { margin-bottom: 0.08in; }</style>
<p style="margin-bottom: 0in;"><font color="#000000">Change (for
STATIC) <i>/etc/network/interfaces :<br>
</i></font></p>
<font color="#000000"><br>
# The loopback network interface</font><br>
<b><font color="#008000">auto lo</font></b><b><font color="#008000"><br>
iface lo inet loopback</font></b><br>
<font color="#000000"># The primary network interface<br>
</font><font color="#000000">#allow-hotplug eth0<br>
</font><font color="#000000">#iface eth0 inet dhcp</font><br>
<font color="#008000">#Bridge setup</font><br>
<b><font color="#008000">auto br0</font><br>
<font color="#008000">iface br0 inet static</font><br>
<font color="#008000"> bridge_ports eth0</font><br>
<font color="#008000"> bridge_fd 0</font><br>
<font color="#008000"> address 192.168.2.100</font><br>
<font color="#008000"> netmask 255.255.255.0</font><br>
<font color="#008000"> gateway 192.168.2.1</font><br>
<font color="#008000"> dns-nameservers 192.168.2.1</font></b>
<style type="text/css">p { margin-bottom: 0.08in; }</style>
<p style="margin-bottom: 0in;"><font color="#000000">Then restart
the
network:</font></p>
<p style="margin-bottom: 0in;"> <font color="#008000"><b>/etc/init.d/networking
restart</b></font></p>
<br>
<style type="text/css">p { margin-bottom: 0.08in; }</style> <font
color="#008000"><b>mkdir
/cgroup</b></font>
<br>
<font color="#000000"><br>
Add the
following line in <i>/etc/fstab</i> :</font>
<br>
<font color="#008000"><b>cgroup
/cgroup cgroup defaults 0 0</b></font>
<br>
<font color="#000000"></font><br>
Then:<br>
<font color="#008000"><b>mount -a</b></font>
<br>
<font color="#008000"><b>lxc-checkconfig</b></font><br>
<br>
<style type="text/css">p { margin-bottom: 0.08in; }</style>
<font color="#000000">Create vm<font color="#ff0000">1</font><font
color="#ff0000">0</font><font color="#ff0000">1</font>
container:</font>
<br>
<font size="2"><span style="font-weight: normal;"> </span></font><font
color="#008000"><b>mkdir
-p /var/lib/lxc/vm</b></font><font color="#ff0000"><b>101</b></font>
<br>
<font color="#000000"><br>
Debootstrap the debian image for the vm101 container:</font>
<br>
<font size="2"><span style="font-weight: normal;"> </span></font><font
color="#008000"><b>/usr/lib/lxc/templates/lxc-debian
-p /var/lib/lxc/vm</b></font><font color="#ff0000"><b>1</b></font><font
color="#ff0000"><b>0</b></font><font color="#ff0000"><b>1</b></font><font
color="#008000"><b>/</b></font><br>
<br>
Add to the end of the
<style type="text/css">p { margin-bottom: 0.08in; }</style>
<font color="#000000"><i>/var/lib/lxc/vm</i><font color="#ff0000"><i>1</i></font><font
color="#ff0000"><i>0</i></font><font color="#ff0000"><i>1</i></font><i>/config</i>
file</font>:<br>
<br>
<style type="text/css">p { margin-bottom: 0.08in; }</style>
<b><font color="#008000">lxc.utsname =
<font color="#ff0000">vm101</font></font><br>
<font color="#008000">lxc.network.type
= veth</font><br>
<font color="#008000">lxc.network.flags
= up</font><br>
<font color="#008000">lxc.network.link
= br0</font><br>
<font color="#008000">lxc.network.ipv4
= 192.168.2.101/24</font></b>
<br>
<font color="#008000"># lxc.network.hwaddr
=</font><br>
<font color="#008000"># lxc.network.ipv6
=</font><br>
<br>
Should be ready to use at this point...but this seems to give me
Lenny.<br>
<br>
Thanks for your thoughts and suggestions! :)<br>
<br>
<font size="+1"><br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
</font><br>
On 02/21/2012 08:27 AM, Serge Hallyn wrote:
<blockquote cite="mid:20120221152732.GB12449@ubuntu" type="cite">
<pre wrap="">Quoting Terry--gmail (<a class="moz-txt-link-abbreviated" href="mailto:terry.kemmerer@gmail.com">terry.kemmerer@gmail.com</a>):
</pre>
<blockquote type="cite">
<pre wrap="">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 ( <a class="moz-txt-link-freetext" href="http://www.jotschi.de/?p=554">http://www.jotschi.de/?p=554</a> ) got
further than anything else I have found so far, and really had my
hopes up......but ended like this:
root@myserver:/usr/lib/lxc/templates# ./lxc-debian squeeze vm103 103
</pre>
</blockquote>
<pre wrap="">
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
EOF
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
</pre>
<blockquote type="cite">
<pre wrap="">What are you guys using??? And are their detailed step by step
instructions I can use to do it?
</pre>
</blockquote>
<pre wrap="">
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
</pre>
</blockquote>
</body>
</html>