Identify OpenVZ virtual machine from inside

Posted by Alfred Godoy on Super User See other posts from Super User or by Alfred Godoy
Published on 2012-04-15T22:38:46Z Indexed on 2012/04/15 23:34 UTC
Read the original article Hit count: 284

Is there any way for me to identify which OpenVZ container I am in, from inside the container? I am working on a setup where OpenVZ machines shall boot the same (read-only) disk image, so I can not configure them individually in the file system. I need a unique identification for each of the virtual servers, to be used by scripts running inside the OpenVZ containers.

(I'm running Debian Lenny, BTW.)

© Super User or respective owner

Related posts about virtualization

Related posts about debian-lenny