OpenVZ Forum


Home » Mailing lists » Users » How to determine a container from the filesystem?
Re: How to determine a container from the filesystem? [message #45914 is a reply to message #45910] Fri, 13 April 2012 22:33 Go to previous messageGo to previous message
efball is currently offline  efball
Messages: 41
Registered: September 2006
Location: Santa Rosa, California
Member
On Fri, Apr 13, 2012 at 04:07:58PM -0400, Brad Alexander wrote:
> I just found out through the proxmox-ve forums that running ntp on a
> container is considered a Bad Thing. So I am reworking my puppet
> installation to disable ntp on the containers...But I was trying to
> figure out a foolproof way of looking on the machine and determining
> if it is a container or not. The only thing I have found so far is
> that /proc/mtrr exists on the physical servers, but not on the
> containers. Is this a viable way to make this determination or is
> there a better way?

if [ -d /proc/vz -a ! -d /proc/bc ]

/proc/vz - always exists if OpenVZ kernel is running (inside
and outside container) /proc/bc - exists on node, but not
inside container.


--

E Frank Ball efball@efball.com


E Frank Ball efball@efball.com
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Run From Backup - pty issue
Next Topic: CfP 7th Workshop on Virtualization in High-Performance Cloud Computing (VHPC'12)
Goto Forum:
  


Current Time: Tue Sep 17 20:49:16 GMT 2024

Total time taken to generate the page: 0.06162 seconds