[libvirt-users] Libvirt-LXC, container get stuck if it prints too much logs in the console

Bertrand NOEL bertrand.noel at cern.ch
Wed Oct 21 14:38:01 UTC 2015

I am creating containers using libvirt-lxc. My problem is that a process 
at bootup gets stuck at some point. My usecase is Puppet, but I can 
reproduce with a loop in bash. I noticed it is stuck until I connect to 
the console of the container (virsh -c lxc:/// console id). Then after 
disconnecting the console, waiting some times, the process gets stuck 
again. The more the process outputs to the console, the quicker it 
becomes stuck.

To test that behavior, at bootup (in rc.local), in a loop I curl some 
server that I monitor. In my server logs I can see requests stops after 
some time.
(I tweaked rc.local systemd service to output to console)

Host and container are CentOS 7.1
Libvirt v1.2.8
Below is my libvirt.xml

<domain type="lxc">
     <cmdline>console=tty0 console=ttyS0</cmdline>
   <clock offset="utc"/>
     <filesystem type="mount">
       <source dir="/root/rootfs"/>
       <target dir="/"/>
     <interface type="bridge">
       <mac address="02:16:3E:00:F6:0E"/>
       <source bridge="virbr0"/>
     <console type="pty"/>

More information about the libvirt-users mailing list