Re: [Lxc-users] [PATCH 1/1] Add lxc-clone script

2011-06-22 Thread Serge Hallyn
Actually, perhaps this is better integrated into the templates.

I'm working on consolidating and extending the ubuntu templates into
one, and it looks like maybe it's better to put the cloning stuff
into that.  Though it makes the create command syntax all the more
baroque, which I don't like.  But I'll send out the result and
we'll see how it goes.

thanks,
-serge

--
Simplify data backup and recovery for your virtual environment with vRanger.
Installation's a snap, and flexible recovery options mean your data is safe,
secure and there when you need it. Data protection magic?
Nope - It's vRanger. Get your free trial download today.
http://p.sf.net/sfu/quest-sfdev2dev
___
Lxc-users mailing list
Lxc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/lxc-users


[Lxc-users] [PATCH 1/2] lxc-create: pass remaining args to templates

2011-06-22 Thread Serge E. Hallyn
This way I can do

lxc-create -t ubuntu -f /etc/lxc.conf -n u1 -- -x

and have -x passed to the template

Signed-off-by: Serge Hallyn serge.hal...@ubuntu.com
---
 src/lxc/lxc-create.in |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/src/lxc/lxc-create.in b/src/lxc/lxc-create.in
index 16011ab..00e6b21 100644
--- a/src/lxc/lxc-create.in
+++ b/src/lxc/lxc-create.in
@@ -162,7 +162,7 @@ if [ ! -z $lxc_template ]; then
read dummy
 fi
 
-${templatedir}/lxc-$lxc_template --path=$lxc_path/$lxc_name 
--name=$lxc_name
+${templatedir}/lxc-$lxc_template --path=$lxc_path/$lxc_name 
--name=$lxc_name $*
 if [ $? -ne 0 ]; then
echo failed to execute template '$lxc_template'
${bindir}/lxc-destroy -n $lxc_name
-- 
1.7.4.1


--
Simplify data backup and recovery for your virtual environment with vRanger.
Installation's a snap, and flexible recovery options mean your data is safe,
secure and there when you need it. Data protection magic?
Nope - It's vRanger. Get your free trial download today.
http://p.sf.net/sfu/quest-sfdev2dev
___
Lxc-users mailing list
Lxc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/lxc-users


[Lxc-users] [PATCH 3/2] lxc-ubuntu template: set lxc.arch in config

2011-06-22 Thread Serge E. Hallyn
Otherwise the container works fine, except uname -a reports x86_64,
not i686.

And unfortunately debootstrap and lxc.arch each accept only the
opposite of each other (i386 vs i686) :)

Signed-off-by: Serge Hallyn serge.hal...@ubuntu.com
---
 templates/lxc-ubuntu.in |9 +++--
 1 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/templates/lxc-ubuntu.in b/templates/lxc-ubuntu.in
index 0b68e84..41ea90f 100644
--- a/templates/lxc-ubuntu.in
+++ b/templates/lxc-ubuntu.in
@@ -175,6 +175,7 @@ lxc.tty = 4
 lxc.pts = 1024
 lxc.rootfs = $rootfs
 lxc.mount  = $path/fstab
+lxc.arch = $arch
 
 lxc.cgroup.devices.deny = a
 # /dev/null and zero
@@ -397,8 +398,8 @@ trim_container=0
 if [ $arch == x86_64 ]; then arch=amd64
 fi
 
-if [ $arch == i686 ]; then
-arch=i386
+if [ $arch == i386 ]; then
+arch=i686
 fi
 
 hostarch=$arch
@@ -418,6 +419,10 @@ do
 esac
 done
 
+if [ $arch == i386 ]; then
+arch=i686
+fi
+
 if [ ! -z $clean -a -z $path ]; then
 clean || exit 1
 exit 0
-- 
1.7.4.1


--
Simplify data backup and recovery for your virtual environment with vRanger.
Installation's a snap, and flexible recovery options mean your data is safe,
secure and there when you need it. Data protection magic?
Nope - It's vRanger. Get your free trial download today.
http://p.sf.net/sfu/quest-sfdev2dev
___
Lxc-users mailing list
Lxc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/lxc-users