Request: Detect LXC virtualization type
Open
Nobody has claimed this yet.
- Dominant language
- Perl
- Stars
- 737
- Forks
- 214
- PR merge metrics
- No merged PRs in 30d
Description
From virt-what, lxc containers can be detected as follows. virt-what cites this documentation http://www.freedesktop.org/wiki/Software/systemd/ContainerInterface
if [ -e "${root}/proc/1/environ" ] &&
cat "${root}/proc/1/environ" | tr '\000' '\n' | grep -Eiq '^container='; then
echo lxc
fi
/proc/1/environ contains
TERM=linux^@container=lxc^@container_ttys=/dev/pts/0 /dev/pts/1^@
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
The issue names no file or test; start by locating Rex's existing virtualization-type detection entry point. Compare it with the provided virt-what and systemd ContainerInterface guidance for /proc/1/environ, and consider the work done when an LXC container is detected as lxc.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- linux, perl
- Domain
- infrastructure, operating-systems
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100