[Lxc-users] lxc template for RHEL?

Dan Kegel dank at kegel.com
Sat Aug 25 01:48:20 UTC 2012


On Fri, Aug 24, 2012 at 6:23 PM, Fajar A. Nugraha <list at fajar.net> wrote:
> On Sat, Aug 25, 2012 at 4:26 AM, Dan Kegel <dank at kegel.com> wrote:
>> lxc-start: failed to rename vethMR2TXx->eth0 : File exists
>
> What does your config file looks like?
> It looks like you're telling lxc to label the container's network
> device in the HOST (lxc.network.veth.pair) as eth0. Which (obviously)
> won't work, since the host already has an eth0.

I'm not using any specific config file.
/etc/lxc/lxc.conf contains

lxc.network.type=veth
lxc.network.link=lxcbr0
lxc.network.flags=up

and I don't see any reference to eth0 there.
Aren't the default templates supposed to work with the default config file?

For what it's worth, the end of the log from
$ sudo lxc-create -n demo.centos6 -t centos -- -R 6
is:
Download complete.
Copy /var/cache/lxc/centos/i686/6/rootfs to
/var/lib/lxc/demo.centos6/rootfs ...
Copying rootfs to /var/lib/lxc/demo.centos6/rootfs ...setting root
passwd to rooter
container rootfs and config created
container is configured for lxc.network.type=veth and
lxc.network.link=virbr0 (which is default if you have libvirt runnig)
'centos' template installed
'demo.centos6' created

$ sudo lxc-start -n demo.centos6
then says
lxc-start: failed to rename vethA8XI49->eth0 : File exists

Uninstalling libvirt with "dpkg -r libvirt0 python-libvirt
libvirt-bin", and then repeating, didn't seem to change anything.
- Dan

p.s. Earlier, I'd been testing on a 64 bit system.
On my 32 bit system, I had to change the script's treatment of $arch,
see attachment.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: lxc-centos
Type: application/octet-stream
Size: 10838 bytes
Desc: not available
URL: <http://lists.linuxcontainers.org/pipermail/lxc-users/attachments/20120824/c0fbceab/attachment.obj>


More information about the lxc-users mailing list