CentOS 7.x lxc container hanging issue

From Notes_Wiki

Home > CentOS > CentOS 7.x > Virtualization > Lxc > Troubleshooting > CentOS 7.x lxc container hanging issue

CentOS 7.x lxc containers on top of CentOS 7.x base host hang. This is perhaps due to wrong config file. CentOS 7.x is more similar to Fedora than CentOS 6.x. CentOS config file is suitable for CentOS 6.x. Hence for CentOS 7.x we need to change config file to fedora after container is created as follows:

  1. Create CentOS 7.x container as usual
  2. After container is created edit its config file '/var/lib/lxc/<container-name>/config' and replace following line
    lxc.include = /usr/share/lxc/config/fedora.common.conf
    Filename centos is changed to fedora for CentOS7 containers
  3. Start the container with new configuration and now it should work fine.

Steps learned from https://vfamilyserver.org/blog/2015/05/centos-7-lxc-container-slow-boot/


Home > CentOS > CentOS 7.x > Virtualization > Lxc > Troubleshooting > CentOS 7.x lxc container hanging issue