305-300 practice question 1 of 15
Which of the following devices exist by default in an LXC container? (Choose three.)
Full set: 121 questionsBy default, an LXC container is provisioned with a minimal set of device nodes required for basic functionality and security. This includes /dev/log for application logging via a Unix socket, /dev/console for system console interaction, and /dev/urandom for accessing the kernel's entropy pool, which is crucial for cryptographic operations. These devices are considered safe to expose and are essential for a standard Linux environment to operate correctly. Devices that could compromise the host system or break container isolation, such as those providing direct hardware or kernel memory access, are not included in the default configuration. Why Incorrect Options are Wrong
D. /dev/kmem: This device provides direct access to kernel memory. Exposing it to a container would be a critical security vulnerability, completely violating the principle of container isolation.
E. /dev/root: This is not a standard device node. On some traditional systems, it's a symbolic link to the root block device, an abstraction not directly applicable within a container's filesystem. References
1. Graber, S. (2014). LXC 1.0: Security features. In this official blog post by a former LXC project leader, the default security profile for containers is detailed. It explicitly lists the minimal set of character devices allowed by default, which includes /dev/console (c 5:1) and /dev/urandom (c 1:9). It also confirms that access to dangerous devices like /dev/kmem is denied. (Available at: Stéphane Graber's blog, Section: "Cgroup devices controller")
2. Linux man-pages project. (2021). lxc.container.conf(5). The official man page for LXC configuration describes the lxc.cgroup.devices.allow option. The default configuration files (e.g., /usr/share/lxc/config/common.conf) that ship with LXC use this option to create a whitelist of safe devices, which includes /dev/console and /dev/urandom.
3. The Linux Foundation. (n.d.). Filesystem Hierarchy Standard. While not specific to LXC, the FHS defines standard file locations. It specifies /dev as the location for device files. The presence of /dev/log as a socket for local syslog message delivery is a de facto standard in Linux distributions, and LXC templates create it to ensure applications can log messages correctly. (Reference: FHS Version 3.0, Section 3.7 /dev)
Keep practicing
Take the free 305-300 practice test
Ten exam-style questions with answers and explanations, plus the exam facts and study guides.
More questions
Other 305-300 practice questions
- Question 2Which functionality is provided by Vagrant as well as by Docker? (Choose three.)
- Question 3A clone of a previously used virtual machine should be created. All VM specific informati…
- Question 4Which of the following mechanisms are used by LXC and Docker to create containers? (Choos…
- Question 5Which of the following values are valid in the firmware attribute of a element in a libvi…
- Question 6After creating a new Docker network using the following command: docker network create --…
- Question 7Which of the following commands boots a QEMU virtual machine using hardware virtualizatio…
