[Lxc-users] lxc template for RHEL?

Fajar A. Nugraha list at fajar.net
Sun Aug 26 05:24:28 UTC 2012


On Sun, Aug 26, 2012 at 11:09 AM, Dan Kegel <dank at kegel.com> wrote:
>> The default networking config section from lxc-fedora (upstream
>> version), when used in Ubuntu host would add an additional interface
>> in the container (because it's basically a separate, additional
>> networking section) and will result in "failed to rename
>> vethXXXXXX->eth0 : File exists" error, so I commented it out. Which is
>> why I'm surprised if you say lxc-fedora works for you, because its
>> default networking section should be the same (i.e. should also cause
>> "eth0: File exists" error).
>
> Works here.  The resulting concatenated config file for fedora is
>
> lxc.network.type=veth
> lxc.network.link=lxcbr0
> lxc.network.flags=up

That's because you use ubuntu's version of lxc-fedora. The upstream
version would've caused an error.

>> Since you already have a working /etc/resolv.conf (i.e. NOT a symlink)
>> inside the container, can you try rebooting the container? If it works
>> (i.e. got networking on boot), I can push a simple fix (which
>> basically would just change "cp -a" to just "cp").
>
> It does seem to have networking on boot now, so I think you're on to
> something there.

Please re-download lxc-centos.in and try again. You need to remove the
cache first (rm -rf /var/cache/lxc/centos/x86_64/6/rootfs) so that it
will be recreated.

... or if you just want new containers to work, just replace
/etc/resolv.conf in /var/cache/lxc/centos/x86_64/6/rootfs with a
working version.

-- 
Fajar




More information about the lxc-users mailing list