On 5/25/2011 7:51 PM, David Touzeau wrote:
> Dear all
>
> to detect if we are inside an OpenVZ, openvzve,xen machine
> we can check the presence of :
> /proc/vz/veinfo
> /proc/vz/version
> /proc/sys/xen
> /sys/bus/xen
> /proc/xen
>
> But i did not find any information inside the LXC contener in order to
> detect We are really in an LXC contener.
>
> Is there a tip ??
>
> Best regards

Recent lxc_start sets an environment variable in the init process.

http://lxc.git.sourceforge.net/git/gitweb.cgi?p=lxc/lxc;a=commit;h=3244e75040a98d2854144ebc169a5a61ddbe0a26

But I like the other trick of checking if init is in a cgroup better for 
now, since it will work for containers that were created by other means 
than lxc_start.

-- 
bkw

------------------------------------------------------------------------------
vRanger cuts backup time in half-while increasing security.
With the market-leading solution for virtual backup and recovery, 
you get blazing-fast, flexible, and affordable data protection.
Download your free trial now. 
http://p.sf.net/sfu/quest-d2dcopy1
_______________________________________________
Lxc-users mailing list
Lxc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/lxc-users

Reply via email to