[Lxc-users] lxc-centos on Ubuntu 12.04

Kim C. Callis kim.callis at gmail.com
Fri Feb 8 14:37:53 UTC 2013


Yes, I did try it as lxc-centos and it still failed. 

Roland Neary <neary at stone-it.com> wrote:

>If I recall you need to place the template in the dir like you did but,
>when creating a container call it 'lxc-centos' instead of centos.
>
>
>Regards,
>
>Roland Neary
>
>
>-----Original message-----
>From: Kim C. Callis <kim.callis at gmail.com>
>Sent: Fri 08-Feb-2013 14:16
>To: lxc-users at lists.sourceforge.net
>Subject: [Lxc-users] lxc-centos on Ubuntu 12.04
>
>
>Ok, I am good and lost... I thought it would be as simple as adding
>your script to /usr/share/lxc/templates and then doing:
>
>$ sudo lxc-create -n centosbox -t centos -- - user
>
>No config file specified, using the default config
>/usr/bin/lxc-create: line 297: type:
>/usr/share/lxc/templates/lxc-centos: not found
>unknown template 'centos'
>aborted
>
>So what is the trick to getting the template accepted?
>
>
>On Tue, Feb 5, 2013 at 5:16 PM, Fajar A. Nugraha <list at fajar.net
><mailto:list at fajar.net> > wrote:
>On Wed, Feb 6, 2013 at 1:44 AM, Papp Tamas <tompos at martos.bme.hu
><mailto:tompos at martos.bme.hu> > wrote:
>> On 02/05/2013 01:56 PM, Roland Neary wrote:
>>> Nothing exciting, I modified a few values such as dns servers which
>were hardcoded into the script
>>> but not appropriate for my setup.
>
>> Well, it's not really good.
>> config file and fstab file are not created by default (for me) after
>this command:
>>
>> $ /lxc-centos -n container -p /data/lxc/container
>>
>>
>> After that the rpm database is a bit broken.
>> Do you see orphaned files int the output of the this command?
>
>
>Yeah, creating RH/centos on Ubuntu/Debian is quite a hassle. Try mine:
>https://github.com/fajarnugraha/lxc/blob/centos-template/templates/lxc-centos.in
>
>After trying several methods, I found the best method to work around
>rpm issue is by invoking yum twice: once using the Ubuntu hosts's yum
>command (which results in broken rpmdb version and locations), and the
>next one using the newly-created-rootfs' yum (which will create a
>"correct" rpm database). The downloaded rpm files are preserved
>between runs (copied, to be exact), so there's no extra bandwidth used
>for the second yum process.
>
>The script is pretty much self-explatanory, so if you want to just
>pick some parts of it, feel free to do so.
>
>--
>Fajar
>
>------------------------------------------------------------------------------
>Free Next-Gen Firewall Hardware Offer
>Buy your Sophos next-gen firewall before the end March 2013
>and get the hardware for free! Learn more.
>http://p.sf.net/sfu/sophos-d2d-feb <http://p.sf.net/sfu/sophos-d2d-feb>
>
>_______________________________________________
>Lxc-users mailing list
>Lxc-users at lists.sourceforge.net
><mailto:Lxc-users at lists.sourceforge.net> 
>https://lists.sourceforge.net/lists/listinfo/lxc-users
>
>
>
>------------------------------------------------------------------------------
>
>Free Next-Gen Firewall Hardware Offer
>
>Buy your Sophos next-gen firewall before the end March 2013 
>
>and get the hardware for free! Learn more.
>
>http://p.sf.net/sfu/sophos-d2d-feb
>
>
>_______________________________________________
>
>Lxc-users mailing list
>
>Lxc-users at lists.sourceforge.net
>
>https://lists.sourceforge.net/lists/listinfo/lxc-users

-- 
Sent from my Galaxy S III phone with K-9 Mail. Please excuse my brevity.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.linuxcontainers.org/pipermail/lxc-users/attachments/20130208/59117938/attachment.html>


More information about the lxc-users mailing list