Created attachment 56074 [details] [review] Detect libvirt LXC detect_container function expects "/proc/1/environ" to contain a line starting with "container=lxc", which is not there if container is run from libvirt. The solution is to check for LIBVIRT_LXC_ anvironment variables, which attached patch does.
libvirt upstream has agreed to set container=lxc now, too, and I think that's the better place to fix it. Hence, closing.
The libvirt fix won't be present until libvirt 0.9.10; you can track it here: https://www.redhat.com/archives/libvir-list/2012-January/msg00973.html
Or actually, upstream decided to go for container=lxc-libvirt, which is even nicer.
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.