<br><div class="gmail_quote">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:<div><br></div><div><b>$ sudo lxc-create -n centosbox -t centos -- - user</b></div>

<div><b><br></b></div>
<div><div>No config file specified, using the default config</div><div>/usr/bin/lxc-create: line 297: type: /usr/share/lxc/templates/lxc-centos: not found</div><div>unknown template 'centos'</div><div>aborted</div>


<div><br></div><div>So what is the trick to getting the template accepted?</div><div style="font-weight:bold"><br></div></div><div class="HOEnZb"><div class="h5"><div><br></div><div>On Tue, Feb 5, 2013 at 5:16 PM, Fajar A. Nugraha <span dir="ltr"><<a href="mailto:list@fajar.net" target="_blank">list@fajar.net</a>></span> wrote:</div>

<div><div class="gmail_quote">
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div>On Wed, Feb 6, 2013 at 1:44 AM, Papp Tamas <<a href="mailto:tompos@martos.bme.hu" target="_blank">tompos@martos.bme.hu</a>> wrote:<br>



> On 02/05/2013 01:56 PM, Roland Neary wrote:<br>
>> Nothing exciting, I modified a few values such as dns servers which were hardcoded into the script<br>
>> but not appropriate for my setup.<br>
<br>
</div><div>> Well, it's not really good.<br>
> config file and fstab file are not created by default (for me) after this command:<br>
><br>
> $ /lxc-centos -n container -p /data/lxc/container<br>
><br>
><br>
> After that the rpm database is a bit broken.<br>
> Do you see orphaned files int the output of the this command?<br>
<br>
<br>
</div>Yeah, creating RH/centos on Ubuntu/Debian is quite a hassle. Try mine:<br>
<a href="https://github.com/fajarnugraha/lxc/blob/centos-template/templates/lxc-centos.in" target="_blank">https://github.com/fajarnugraha/lxc/blob/centos-template/templates/lxc-centos.in</a><br>
<br>
After trying several methods, I found the best method to work around<br>
rpm issue is by invoking yum twice: once using the Ubuntu hosts's yum<br>
command (which results in broken rpmdb version and locations), and the<br>
next one using the newly-created-rootfs' yum (which will create a<br>
"correct" rpm database). The downloaded rpm files are preserved<br>
between runs (copied, to be exact), so there's no extra bandwidth used<br>
for the second yum process.<br>
<br>
The script is pretty much self-explatanory, so if you want to just<br>
pick some parts of it, feel free to do so.<br>
<span><font color="#888888"><br>
--<br>
Fajar<br>
</font></span><div><div><br>
------------------------------------------------------------------------------<br>
Free Next-Gen Firewall Hardware Offer<br>
Buy your Sophos next-gen firewall before the end March 2013<br>
and get the hardware for free! Learn more.<br>
<a href="http://p.sf.net/sfu/sophos-d2d-feb" target="_blank">http://p.sf.net/sfu/sophos-d2d-feb</a><br>
_______________________________________________<br>
Lxc-users mailing list<br>
<a href="mailto:Lxc-users@lists.sourceforge.net" target="_blank">Lxc-users@lists.sourceforge.net</a><br>
<a href="https://lists.sourceforge.net/lists/listinfo/lxc-users" target="_blank">https://lists.sourceforge.net/lists/listinfo/lxc-users</a><br>
</div></div></blockquote></div><br></div>
</div></div></div><br>