[Lxc-users] lxc template for RHEL?

Fajar A. Nugraha list at fajar.net
Sat Aug 25 10:34:20 UTC 2012


On Sat, Aug 25, 2012 at 9:22 AM, Dan Kegel <dank at kegel.com> wrote:
> On Fri, Aug 24, 2012 at 7:00 PM, Fajar A. Nugraha <list at fajar.net> wrote:
>>> Aren't the default templates supposed to work with the default config file?
>>
>> It should. Which is why I thought you edit the config file. Try:
>> - adding lxc.network.veth.pair=test-e0
>
> No change.

I think I figure out what's wrong. Short version is upstream template
(even the fedora one) needs modification. At least it does on Ubuntu
:)


>> - try the second link, which create the rootfs and config file by hand
>> instead of using a script.
>
> Well, foo.  I need to end up with a debugged script,

Had you tried creating it manually, you'd have a working centos
container AND understand more deeply how it works.
In case you haven't figure it out already, I wrote that wiki page :)

> and I was hoping
> that since lxc-create -t centos had worked for someone recently
> (and lxc-create -t fedora works for me now), success wouldn't be far off.

Not sure how Johannes got his template working and what his
environment is, but I've written mine. See
https://github.com/fajarnugraha/lxc/blob/centos-template/templates/lxc-centos.in

Tested on Ubuntu 12.04 host to install centos guest container (centos
6 only for now). Based on lxc-fedora, it mostly automates the manual
process on my wiki page, plus rpmdb fix to allow it to work on
non-centos host.

If you're not familiar with github, "raw" button downloads that file
only, while "history" button shows changes to that file.

-- 
Fajar




More information about the lxc-users mailing list