Hi,
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">
<uuid>9fbe3d43-e1b4-4244-8dab-b42995ab7403</uuid>
<name>instance-000002f6</name>
<memory>4194304</memory>
<vcpu>2</vcpu>
<os>
<type>exe</type>
<cmdline>console=tty0 console=ttyS0</cmdline>
<init>/sbin/init</init>
</os>
<clock offset="utc"/>
<devices>
<filesystem type="mount">
<source dir="/root/rootfs"/>
<target dir="/"/>
</filesystem>
<interface type="bridge">
<mac address="02:16:3E:00:F6:0E"/>
<source bridge="virbr0"/>
</interface>
<console type="pty"/>
</devices>
</domain>