On Mon, Aug 01, 2016 at 04:01:00PM +0200, tapczan wrote: > Hello > > There is an easy way to determine if I'm in LXC, content of file > /proc/self/cgroup shows path with /lxc, eg: > > 2:cpu:/lxc/host > > However in LXD this rule is no longer valid: > > 2:cpu:/ > > It looks like real host from that point of view. > > So tools like chef OHAI have issue in determining virtualisation role > and status. > > Is there as easy way to determine if I'm inside LXD container?
Try `systemd-detect-virt` on systemd-based distros, or `running-in-container` on upstart-based distros. Tycho > lxc-users mailing list > [email protected] > http://lists.linuxcontainers.org/listinfo/lxc-users _______________________________________________ lxc-users mailing list [email protected] http://lists.linuxcontainers.org/listinfo/lxc-users
