OpenVZ Forum


Home » Mailing lists » Users » How to determine a container from the filesystem?
Re: How to determine a container from the filesystem? [message #45924 is a reply to message #45910] Tue, 17 April 2012 07:29 Go to previous messageGo to previous message
kir is currently offline  kir
Messages: 1645
Registered: August 2005
Location: Moscow, Russia
Senior Member

On 04/14/2012 12:07 AM, Brad Alexander wrote:
> I just found out through the proxmox-ve forums that running ntp on a
> container is considered a Bad Thing.

Not necessarily. In fact, it's a good thing to run ntpd inside a
container, it's just you need to

1. Have only ONE container doing that.
2. Grant that container sys_time capability, so it will be able to set
system time.

This is because time is not virtualized, ie all the containers share the
same time (because indeed there's only one time -- time zones of course
can be different).

> 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?

Solutions provided here in this thread by E Frank Ball and Martin Dobrev
are both good.


Kir Kolyshkin
http://static.openvz.org/userbars/openvz-developer.png
 
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 Jul 16 21:27:52 GMT 2024

Total time taken to generate the page: 0.03003 seconds