Hello,
I migrated versions 2 to 3 of lxc with the official Debian test package without error when installing the new
Lxc version 3 package. During the installation, I replied do not keep the current configuration file and to replace the configuration file with the new lxc3 maintainer version, because I wanted a complete and clean LXC 3 version, without having some parts of old configuration.
The current version
> lxc-info --version
3.0.3
lxc-checkconfig is fine.
> lxc-checkconfig
Kernel configuration not found at /proc/config.gz; searching... Kernel configuration found at /boot/config-4.18.0-3-amd64 --- Namespaces --- Namespaces: enabled Utsname namespace: enabled Ipc namespace: enabled Pid namespace: enabled User namespace: enabled Network namespace: enabled --- Control groups --- Cgroups: enabled Cgroup v1 mount points: /sys/fs/cgroup/systemd /sys/fs/cgroup/freezer /sys/fs/cgroup/net_cls,net_prio /sys/fs/cgroup/memory /sys/fs/cgroup/cpu,cpuacct /sys/fs/cgroup/devices /sys/fs/cgroup/perf_event /sys/fs/cgroup/cpuset /sys/fs/cgroup/pids /sys/fs/cgroup/blkio Cgroup v2 mount points: /sys/fs/cgroup/unified Cgroup v1 clone_children flag: enabled Cgroup device: enabled Cgroup sched: enabled Cgroup cpu account: enabled Cgroup memory controller: enabled Cgroup cpuset: enabled --- Misc --- Veth pair device: enabled, not loaded Macvlan: enabled, not loaded Vlan: enabled, not loaded Bridges: enabled, loaded Advanced netfilter: enabled, loaded CONFIG_NF_NAT_IPV4: enabled, loaded CONFIG_NF_NAT_IPV6: enabled, not loaded CONFIG_IP_NF_TARGET_MASQUERADE: enabled, not loaded CONFIG_IP6_NF_TARGET_MASQUERADE: enabled, not loaded CONFIG_NETFILTER_XT_TARGET_CHECKSUM: enabled, loaded CONFIG_NETFILTER_XT_MATCH_COMMENT: enabled, not loaded FUSE (for use with lxcfs): enabled, loaded --- Checkpoint/Restore --- checkpoint restore: enabled CONFIG_FHANDLE: enabled CONFIG_EVENTFD: enabled CONFIG_EPOLL: enabled CONFIG_UNIX_DIAG: enabled CONFIG_INET_DIAG: enabled CONFIG_PACKET_DIAG: enabled CONFIG_NETLINK_DIAG: enabled File capabilities: Note : Before booting a new kernel, you can check its configuration usage : CONFIG=/path/to/config /bin/lxc-checkconfig
My issue is about the container config file
> lxc-ls
Failed to load config for centos Failed to load config for debian Failed to load config for ubuntu
lxc-info complain default config file is not in the ritght place
> lxc-info centos
Failed to load config for centos Failure to retrieve information on /home/olivier/.local/share/lxc:centos
If I want to create new container, I get some error.
> lxc-create -t download -n test
lxc-create: test: confile.c: parse_line: 2262 Unknown configuration key "lxc.id_map" lxc-create: test: parse.c: lxc_file_for_each_line_mmap: 142 Failed to parse config file "/home/olivier/.config/lxc/default.conf" at line "lxc.id_map = u 0 100000 65536" lxc-create: test: conf.c: chown_mapped_root: 3126 No uid mapping for container root lxc-create: test: lxccontainer.c: do_storage_create: 1288 Error chowning "/home/olivier/.local/share/lxc/test/rootfs" to container root lxc-create: test: conf.c: suggest_default_idmap: 4738 You must either run as root, or define uid mappings lxc-create: test: conf.c: suggest_default_idmap: 4739 To pass uid mappings to lxc-create, you could create lxc-create: test: conf.c: suggest_default_idmap: 4740 ~/.config/lxc/default.conf: lxc-create: test: conf.c: suggest_default_idmap: 4741 lxc.include = /etc/lxc/default.conf lxc-create: test: conf.c: suggest_default_idmap: 4742 lxc.idmap = u 0 100000 65536 lxc-create: test: conf.c: suggest_default_idmap: 4743 lxc.idmap = g 0 100000 65536 lxc-create: test: lxccontainer.c: do_lxcapi_create: 1869 Failed to create (none) storage for test lxc-create: test: tools/lxc_create.c: main: 327 Failed to create container test
How can fix this issue in a clean way ?
Thanks for your help.