
[Jan 09, 2025] 305-300 Exam Dumps - 100% Marks In 305-300 Exam!
Exam Dumps Use Real LPIC-3 Dumps With 62 Questions!
The LPIC-3 Exam 305 covers various topics related to virtualization and containerization technologies. Some of the key topics that the exam covers include virtualization concepts, implementation of virtualization, containerization concepts, implementation of containerization, advanced virtualization and containerization technologies, cloud-based virtualization and containerization technologies, and security implementation in virtualization and containerization environments.
NEW QUESTION # 13
What is the purpose of capabilities in the context of container virtualization?
- A. Map potentially dangerous system calls to an emulation layer provided by the container virtualization.
- B. Enable memory deduplication to cache files which exist in multiple containers.
- C. Prevent processes from performing actions which might infringe the container.
- D. Allow regular users to start containers with elevated permissions.
- E. Restrict the disk space a container can consume.
Answer: C
Explanation:
Explanation
Capabilities are a way of implementing fine-grained access control in Linux. They are a set of flags that define the privileges that a process can have. By default, a process inherits the capabilities of its parent, but some capabilities can be dropped or added by the process itself or by the kernel. In the context of container virtualization, capabilities are used to prevent processes from performing actions that might infringe the container, such as accessing the host's devices, mounting filesystems, changing the system time, or killing other processes. Capabilities allow containers to run with a reduced set of privileges, enhancing the security and isolation of the container environment. For example, Docker uses a default set of capabilities that are granted to the processes running inside a container, and allows users to add or drop capabilities as needed12.
References:
* Capabilities | Docker Documentation1
* Linux Capabilities: Making Them Work in Containers2
NEW QUESTION # 14
Virtualization of which hardware component is facilitated by CPUs supporting nested page table extensions, such as Intel Extended Page Table (EPT) or AMD Rapid Virtualization Indexing (RVI)?
- A. Memory
- B. IO Cache
- C. Host Bus Adapters
- D. Network Interfaces
- E. Hard Disks
Answer: A
NEW QUESTION # 15
Which of the following statements in aDockerfileleads to a container which outputs hello world? (Choose two.)
- A. ENTRYPOINT [ "echo hello world" ]
- B. ENTRYPOINT [ "echo", "hello", "world" ]
- C. ENTRYPOINT "echo", "Hello", "World*
- D. ENTRYPOINT echo Hello World
- E. ENTRYPOINT "echo Hello World"
Answer: A,B
Explanation:
Explanation
The ENTRYPOINT instruction in a Dockerfile specifies the default command to run when a container is started from the image. The ENTRYPOINT instruction can be written in two forms: exec form and shell form.
The exec form uses a JSON array to specify the command and its arguments, such as [ "executable",
"param1", "param2" ]. The shell form uses a single string to specify the command and its arguments, such as
"executable param1 param2". The shell form is converted to the exec form by adding /bin/sh -c to the beginning of the command. Therefore, the following statements in a Dockerfile are equivalent and will lead to a container that outputs hello world:
ENTRYPOINT [ "echo hello world" ] ENTRYPOINT [ "/bin/sh", "-c", "echo hello world" ] ENTRYPOINT
"echo hello world" ENTRYPOINT [ "echo", "hello", "world" ] ENTRYPOINT [ "/bin/sh", "-c", "echo",
"hello", "world" ] ENTRYPOINT "echo hello world"
The other statements in the question are invalid or incorrect. The statement A. ENTRYPOINT "echo Hello World" is invalid because it uses double quotes to enclose the entire command, which is not allowed in the shell form. The statement D. ENTRYPOINT echo Hello World is incorrect because it does not use quotes to enclose the command, which is required in the shell form. The statement E. ENTRYPOINT "echo", "Hello",
"World" is invalid because it uses double quotes to separate the command and its arguments, which is not allowed in the exec form. References:
* Dockerfile reference | Docker Docs
* Using the Dockerfile ENTRYPOINT and CMD Instructions - ATA Learning
* Difference Between run, cmd and entrypoint in a Dockerfile
NEW QUESTION # 16
Which of the following values are valid in the type attribute of a<domain>element in a libvirt domain definition? (Choose two.)
- A. namespace
- B. proc
- C. kvm
- D. cgroup
- E. Ixc
Answer: C,E
Explanation:
Explanation
The type attribute of a <domain> element in a libvirt domain definition specifies the hypervisor used for running the domain. The allowed values are driver specific, but include "xen", "kvm", "hvf" (since 8.1.0 and QEMU 2.12), "qemu" and "lxc"1. Therefore, the valid values among the options are C. kvm and E. lxc. KVM stands for Kernel-based Virtual Machine, which is a full virtualization solution for Linux on x86 hardware containing virtualization extensions (Intel VT or AMD-V)2. LXC stands for Linux Containers, which is an operating system-level virtualization method for running multiple isolated Linux systems (containers) on a single control host3. The other options are not valid values for the type attribute, asthey are either not hypervisors or not supported by libvirt. References:http://libvirt.org/formatdomain.html
https://libvirt.org/formatcaps.html
NEW QUESTION # 17
Which of the following devices exist by default in an LXC container? (Choose three.)
- A. /dev/urandom
- B. /dev/kmem
- C. /dev/root
- D. /dev/console
- E. /dev/log
Answer: A,D,E
Explanation:
Explanation
LXC (Linux Containers) is a lightweight virtualization technology that allows multiple isolated Linux systems (containers) to run on the same host. LXC uses Linux kernel features such as namespaces, cgroups, and AppArmor to create and manage containers. Each container has its own file system, network interfaces, process tree, and resource limits. However, containers share the same kernel and hardware with the host, which makes them more efficient and faster than full virtualization.
By default, an LXC container has a minimal set of devices that are needed for its operation. These devices are created by the LXC library when the container is started, and are removed when the container is stopped. The default devices are:
* /dev/log: This is a Unix domain socket that connects to the syslog daemon on the host. It allows the container to send log messages to the host's system log1.
* /dev/console: This is a character device that provides access to the container's console. It is usually connected to the host's terminal or a file. It allows the container to interact with the user or the host's init system12.
* /dev/urandom: This is a character device that provides an unlimited source of pseudo-random numbers. It is used by various applications and libraries that need randomness, such as cryptography, UUID generation, and hashing13.
The other devices listed in the question do not exist by default in an LXC container. They are either not needed, not allowed, or not supported by the container's namespace or cgroup configuration. These devices are:
* /dev/kmem: This is a character device that provides access to the kernel's virtual memory. It is not needed by the container, as it can access its own memory through the /proc filesystem. It isalso not allowed by the container, as it would expose the host's kernel memory and compromise its security4.
* /dev/root: This is a symbolic link that points to the root device of the system. It is not supported by the container, as it does not have a separate root device from the host. The container's root file system is mounted from a directory, an image file, or a loop device on the host5.
References:
* Linux Containers - LXC - Manpages - lxc.container.conf.5
* Linux Containers - LXC - Getting started
* Random number generation - Wikipedia
* /dev/kmem - Wikipedia
* Linux Containers - LXC - Manpages - lxc.container.conf.5
NEW QUESTION # 18
Which of the following services can QEMU provide in a user network? (Choose three.)
- A. DHCP
- B. AppleTalk
- C. CIFS
- D. TFTP
- E. BGP
Answer: A,D
Explanation:
Explanation
QEMU can provide some network services in a user network, which is a mode of networking that does not require any administrator privilege to run. The user network uses the SLIRP TCP/IP emulator to create a virtual NAT'ted subnet, with a DHCP server started by QEMU that gives out IP addresses to the guest machines and puts the host on 10.0.2.21. QEMU can also provide a TFTP server in the user network, which can be used to boot the guest machines from a network image. The TFTP server can be configured with the
-tftp option2. QEMU does not provide BGP, CIFS, or AppleTalk services in the user network. BGP is a routing protocol that is used to exchange routing information between autonomous systems on the Internet3. CIFS is a file-sharing protocol that is used to access files and printers on a network4. AppleTalk is a deprecated network protocol suite that was used by Apple devices5. These services require more advanced networking features than the user network can offer, such as bridging, routing, or tunneling.
References:
* Documentation/Networking - QEMU
* QEMU/Networking - Wikibooks, open books for an open world
* Border Gateway Protocol - Wikipedia
* Common Internet File System - Wikipedia
* AppleTalk - Wikipedia
NEW QUESTION # 19
Which of the following statements are true about sparse images in the context of virtual machine storage?
(Choose two.)
- A. Sparse images allocate backend storage at the first usage of a block.
- B. Sparse images are automatically resized when their maximum capacity is about to be exceeded.
- C. Sparse images may consume an amount of space different from their nominal size.
- D. Sparse images are automatically shrunk when files within the image are deleted.
- E. Sparse images can only be used in conjunction with paravirtualization.
Answer: A,C
NEW QUESTION # 20
What is the purpose of capabilities in the context of container virtualization?
- A. Map potentially dangerous system calls to an emulation layer provided by the container virtualization.
- B. Enable memory deduplication to cache files which exist in multiple containers.
- C. Prevent processes from performing actions which might infringe the container.
- D. Allow regular users to start containers with elevated permissions.
- E. Restrict the disk space a container can consume.
Answer: C
NEW QUESTION # 21
How can data be shared between several virtual machines running on the same Linux-based host system?
- A. By writing data to the file system since all virtual machines on the same host system use the same file system.
- B. By using a network file system or file transfer protocol.
- C. By mounting other virtual machines' file systems from /dev/virt-disks/remote/.
- D. By attaching the same virtual hard disk to all virtual machines and activating EXT4 sharing extensions on it.
- E. By setting up a ramdisk in one virtual machine and mounting it using its UUID in the other VMs.
Answer: B
NEW QUESTION # 22
Which of the following network interface types are valid in an LXD container configuration? (Choose three.)
- A. macvlan
- B. ipsec
- C. bridged
- D. wifi
- E. physical
Answer: A,C,E
Explanation:
Explanation
LXD supports the following network interface types in an LXD container configuration1:
* macvlan: Creates a virtual interface on the host with a unique MAC address and attaches it to an existing physical interface. This allows the container to have direct access to the physical network, but prevents communication with the host and other containers on the same host2.
* bridged: Connects the container to an existing bridge interface on the host. This allows the container to communicate with the host and other containers on the same bridge, as well as the external network if the bridge is connected to a physical interface3.
* physical: Passes an existing physical interface on the host to the container. This allows the container to have exclusive access to the physical network, but removes the interface from the host4.
The other network interface types, ipsec and wifi, are not valid in an LXD container configuration. Ipsec is a protocol for secure communication over IP networks, not a network interface type. Wifi is a wireless technology for connecting devices to a network, not a network interface type. References:
* About networking - Canonical LXD documentation
* Macvlan network - Canonical LXD documentation
* Bridge network - Canonical LXD documentation
* Physical network - Canonical LXD documentation
NEW QUESTION # 23
A clone of a previously used virtual machine should be created. All VM specific information, such as user accounts, shell histories and SSH host keys should be removed from the cloned disk image. Which of the following tools can perform these tasks?
- A. sysprep
- B. vire-wipe
- C. virt-sparsi
- D. virt-rescue
- E. virc-reset
- F. virt-svspre
Answer: A
Explanation:
Explanation
Sysprep is a tool that removes all your personal account and security information, and then prepares the machine to be used as an image. It is supported by Windows and some Linux distributions. It can also remove drivers and other machine-specific settings. Sysprep is required when creating a managed image outside of a gallery in Azure
https://learn.microsoft.com/en-us/azure/virtual-machines/generalize
NEW QUESTION # 24
Which of the following values would be valid in the FROM statement in aDockerfile?
- A. registry:ubuntu:focal
- B. file:/tmp/ubuntu/Dockerfile
- C. ubuntu:focal
- D. docker://ubuntu: focal
- E. http://docker.example.com/images/ubuntu-focal.iso
Answer: C
NEW QUESTION # 25
If aDockerfilecontains the following lines:
WORKDIR /
RUN cd /tmp
RUN echo test > test
where is the filetestlocated?
- A. /tmp/test on the system running docker build.
- B. /ting/test within the container image.
- C. /root/tesc within the container image.
- D. test in the directory holding the Dockerf ile.
- E. /test within the container image.
Answer: E
NEW QUESTION # 26
The commandvirsh vol-list vmsreturns the following error:
error: failed to get pool 'vms'
error: Storage pool not found: no storage pool with matching name 'vms ' Given that the directory/vmsexists, which of the following commands resolves this issue?
- A. libvirt-poolctl new --name=/vms --type=dir --path=/vms
- B. dd if=/dev/zero of=/vms bs=1 count=0 flags=name:vms
- C. qemu-img pool vms:/vms
- D. touch /vms/.libvirtpool
- E. virsh pool-create-as vms dir --target /vms
Answer: E
Explanation:
Explanation
The command virsh pool-create-as vms dir --target /vms creates and starts a transient storage pool named vms of type dir with the target directory /vms12. This command resolves the issue of the storage pool not found error, as it makes the existing directory /vms visible to libvirt as a storage pool. The other commands are invalid because:
* dd if=/dev/zero of=/vms bs=1 count=0 flags=name:vms is not a valid command syntax. The dd command does not take a flags argument, and the output file /vms should be a regular file, not a directory3.
* libvirt-poolctl new --name=/vms --type=dir --path=/vms is not a valid command name. There is no such command as libvirt-poolctl in the libvirt package4.
* qemu-img pool vms:/vms is not a valid command syntax. The qemu-img command does not have a pool subcommand, and the vms:/vms argument is not a valid image specification5.
* touch /vms/.libvirtpool is not a valid command to create a storage pool. The touch command only creates an empty file, and the .libvirtpool file is not recognized by libvirt as a storage pool configuration file6.
References:
* 1: virsh - difference between pool-define-as and pool-create-as - Stack Overflow
* 2: dd(1) - Linux manual page - man7.org
* 3: 12.3.3. Creating a Directory-based Storage Pool with virsh - Red Hat Customer Portal
* 4: libvirt - Linux Man Pages (3)
* 5: qemu-img(1) - Linux manual page - man7.org
* 6: touch(1) - Linux manual page - man7.org
NEW QUESTION # 27
Which of the following resources can be limited by libvirt for a KVM domain? (Choose two.)
- A. Number of available files
- B. Number of running processes
- C. Size of available memory
- D. Amount of CPU lime
- E. File systems allowed in the domain
Answer: C,D
NEW QUESTION # 28
Which of the following devices exist by default in an LXC container? (Choose three.)
- A. /dev/urandom
- B. /dev/kmem
- C. /dev/root
- D. /dev/console
- E. /dev/log
Answer: A,D,E
NEW QUESTION # 29
Which of the following statements are true regarding a Pod in Kubernetes? (Choose two.)
- A. systemd is used to manage individual Pods on the Kubernetes nodes.
- B. Pods are always created automatically and cannot be explicitly configured.
- C. When a Pod fails, Kubernetes restarts the Pod on another node by default.
- D. A Pod is the smallest unit of workload Kubernetes can run.
- E. All containers of a Pod run on the same node.
Answer: D,E
Explanation:
Explanation
A Pod in Kubernetes is a collection of one or more containers that share the same network and storage resources, and a specification for how to run the containers. A Pod is the smallest unit of workload Kubernetes can run, meaning that it cannot be divided into smaller units. Therefore, option C is correct. All containers of a Pod run on the same node, which is the smallest unit of computing hardware in Kubernetes. A node is a physical or virtual machine that hosts one or more Pods. Therefore, option A is also correct. Pods are not always created automatically and cannot be explicitly configured. Pods can be created manually using YAML or JSON files, or using commands like kubectl run or kubectl create. Pods can also be created automatically by higher-level controllers, such as Deployment, ReplicaSet, or StatefulSet. Therefore, option B is incorrect.
When a Pod fails, Kubernetes does not restart the Pod on another node by default. Pods are ephemeral by nature, meaning that they can be terminated or deleted at any time. If a Pod is managed by a controller, the controller will create a new Pod to replace the failed one, but it may not be on the same node. Therefore, option D is incorrect. systemd is not used to manage individual Pods on the Kubernetes nodes. systemd is a system and service manager for Linux operating systems that can start and stop services, such as docker or kubelet. However, systemd does not interact with Podsdirectly. Pods are managed by the kubelet service, which is an agent that runs on each node and communicates with the Kubernetes control plane. Therefore, option E is incorrect. References:
* Pods | Kubernetes
* What is a Kubernetes pod? - Red Hat
* What's the difference between a pod, a cluster, and a container?
* What are Kubernetes Pods? | VMware Glossary
* Kubernetes Node Vs. Pod Vs.Cluster: Key Differences - CloudZero
NEW QUESTION # 30
What is the default provider of Vagrant?
- A. virtualbox
- B. vmware_workstation
- C. docker
- D. lxc
- E. hyperv
Answer: A
Explanation:
Explanation
Vagrant is a tool that allows users to create and configure lightweight, reproducible, and portable development environments. Vagrant supports multiple providers, which are the backends that Vagrant uses to create and manage the virtual machines. By default, VirtualBox is the default provider for Vagrant. VirtualBox is still the most accessible platform to use Vagrant: it is free, cross-platform, and has been supported by Vagrant for years. With VirtualBox as the default provider, it provides the lowest friction for new users to get started with Vagrant. However, users can also use other providers, such as VMware, Hyper-V, Docker, or LXC, depending on their preferences and needs. To use another provider, users must install it as a Vagrant plugin and specify it when running Vagrant commands. Users can also change the default provider by setting the VAGRANT_DEFAULT_PROVIDER environmental variable. References:
* Default Provider - Providers | Vagrant | HashiCorp Developer1
* Providers | Vagrant | HashiCorp Developer2
* How To Set Default Vagrant Provider to Virtualbox3
NEW QUESTION # 31
FILL BLANK
What is the default path to the Docker daemon configuration file on Linux? (Specify the full name of the file,Including path.)
Answer:
Explanation:
/etc/docker/daemon.json
NEW QUESTION # 32
FILL BLANK
What LXC command lists containers sorted by their CPU, block I/O or memory consumption? (Specify ONLY the command without any path or parameters.)
Answer:
Explanation:
lxc-top
NEW QUESTION # 33
Which file format is used by libvirt to store configuration data?
- A. XML files
- B. SQLite databases
- C. INI-style text files
- D. Java-like properties files
- E. Text files containing key/value pairs
Answer: A
NEW QUESTION # 34
After setting up a data container using the following command:
docker create -v /data --name datastore debian /bin/true
how is an additional new container started which shares the/datavolume with the datastore container?
- A. docker run --share-with datastore --name service debian bash
- B. docker run --volume-backend datastore -v /data --name service debian bash
- C. docker run -v /data --name service debian bash
- D. docker run -v datastore:/data --name service debian bash
- E. docker run --volumes-from datastore --name service debian bash
Answer: E
Explanation:
Explanation
The correct way to start a new container that shares the /data volume with the datastore container is to use the
--volumes-from flag. This flag mounts all the defined volumes from the referenced containers. In this case, the datastore container has a volume named /data, which is mounted in the service container at the same path. The other options are incorrect because they either use invalid flags, such as --share-with or --volume-backend, or they create new volumes instead of sharing the existing one, such as -v datastore:/data or -v /data. References:
* Docker Docs - Volumes
* Stack Overflow - How to map volume paths using Docker's --volumes-from?
* Docker Docs - docker run
NEW QUESTION # 35
......
Pass Your 305-300 Exam Easily With 100% Exam Passing Guarantee: https://www.lead1pass.com/Lpi/305-300-practice-exam-dumps.html
305-300 Dumps are Available for Instant Access: https://drive.google.com/open?id=1-hr3lEvbwkLFNe7V-nH-w1-_hBcavgWB