Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

lxc-create on Fedora appears to be broken (problems parsing the '-f config_file')

Hello Friends:

This isn't the first time I'm running into this. No matter what file contents I feed to the -f option of lxc-create, I get this nondescript error:

root# lxc-create -t fedora -f /var/lib/lxc/lxc.fedora.conf -n vps00.Fedora
lxc-create: tools/lxc_create.c: main: 318 Error creating container vps00.Fedora

Where the contents of /var/lib/lxc/lxc.fedora.conf is as follows (and for which I've tried almost every possible ordering of directives):

lxc.utsname = vps00.Fedora
lxc.rootfs = /var/lib/lxc/vps00.Fedora/rootfs
lxc.mount = /var/lib/lxc/vps00.Fedora/fstab
lxc.arch = x86_64
lxc.include = /usr/share/lxc/config/fedora.common.conf
lxc.network.type = veth
lxc.network.link = br0
lxc.network.name = eth0
lxc.network.flags = up
lxc.network.hwaddr = 22:22:22:22:22:11
lxc.network.ipv4.gateway = 192.168.0.1
lxc.network.ipv4 = 192.168.0.191/24 192.168.0.255

The only thing that doesn't fail is not specifying a config file at all, as follows:

root# lxc-create -n vps00.Fedora -t fedora

This now has happened across multiple versions of Fedora and LXC RPM packages, but I include them here for completeness:

root# rpm -qa | grep lxc
libvirt-daemon-driver-lxc-2.2.1-2.fc25.x86_64
lxc-2.0.8-2.fc25.x86_64
lxc-devel-2.0.8-2.fc25.x86_64
lxc-doc-2.0.8-2.fc25.noarch
lxc-templates-2.0.8-2.fc25.x86_64
lxc-libs-2.0.8-2.fc25.x86_64

root# uname -a
Linux dstorm 4.11.12-200.fc25.x86_64 #1 SMP Fri Jul 21 16:41:43 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux

Any ideas? Why is lxc-create so particular and so cranky? :(

Thank you in advance! :)