LPIC-3: Virtualization and Containerization - Exam 305, version 3.0 305-300 Exam Questions

Page: 1 / 14
Total 121 questions
Question 1

Which of the following is true about LXC?



Answer : C

LXC (Linux Containers) is a container runtime that uses Linux kernel features such as namespaces and cgroups to provide lightweight, isolated environments. According to containerization documentation, LXC allows multiple Linux systems (containers) to run on a single host while sharing the same kernel.

LXC is Linux-specific, uses the Linux kernel directly, and is not a virtual machine manager. Therefore, the correct answer is C.


Question 2

Which of the following KVM parameters is identical to the KVM parameter -hdb file.img?



Answer : D

In QEMU/KVM, the legacy parameter -hdb file.img attaches a disk image as the primary IDE slave device. According to QEMU documentation, this corresponds to an IDE device with index 1, media type disk, and interface IDE.

The modern equivalent using the -drive syntax is:

-drive file=file.img,index=1,media=disk,if=ide

Option D matches this mapping precisely. The other options use invalid or unsupported parameter combinations and do not correctly represent the IDE device mapping.

Therefore, the correct answer is D.


Question 3

What is the name of the kernel module that is required to be loaded in order to use KVM on an Intel CPU architecture?

(Specify ONLY the module name without any path information and with or without the module suffix.)

Solution:

kvm-intel.ko -- or -- kvm-intel -- or -- kvm_intel.ko -- or -- kvm_intel

Determine whether the given solution is correct?



Answer : A

Kernel-based Virtual Machine (KVM) relies on hardware-assisted virtualization features provided by modern CPUs. On Intel CPU architectures, this support is enabled through the kvm_intel kernel module. Official KVM and Linux virtualization documentation clearly states that the required module for Intel processors is named kvm_intel, with the optional .ko suffix when referring to the kernel object file.

The provided solution lists multiple acceptable representations of the module name, including kvm_intel and kvm_intel.ko, both of which are valid and correct. Linux kernel module naming conventions allow the module to be referenced with or without the .ko suffix when loading it using tools such as modprobe or lsmod.

Although variants using a hyphen (kvm-intel) are not the canonical kernel module name, the solution explicitly includes the correct and documented module name. Therefore, the solution correctly identifies the required kernel module for enabling KVM on Intel CPUs.

Virtualization documentation emphasizes that KVM functionality requires both the generic kvm module and the CPU-specific module (kvm_intel for Intel or kvm_amd for AMD). Hence, the determination that the solution is correct aligns with verified documentation.


Question 4

How does cloud-init enhance the customization of cloud instances?



Answer : B

Cloud-init enhances cloud instance customization by allowing users to provide user data and scripts that are executed during the first boot of an instance. According to cloud-init documentation, these scripts and configuration files enable tasks such as installing packages, configuring services, setting hostnames, managing users, and injecting SSH keys.

Cloud-init does not automatically configure every aspect of an instance, nor does it provide a graphical interface. It also does not directly integrate with containerization tools. Its strength lies in automation and repeatability, making instance initialization consistent across environments.

Thus, the correct answer is B.


Question 5

Which virsh subcommand is used to change the CD-ROM image file attached to a virtual machine?



Answer : A

In libvirt-based virtualization environments, the virsh change-media subcommand is used to change the media attached to removable devices such as CD-ROM drives. According to libvirt documentation, this command allows administrators to insert or eject ISO images from a running virtual machine without shutting it down.

This functionality is commonly used during operating system installations or software updates. The change-media command supports both live and persistent changes depending on the options used.

Therefore, the correct and documented answer is change-media.


Question 6

If a Dockerfile contains the following lines:

WORKDIR /

RUN cd /tmp

RUN echo test > test

where is the file test located?



Answer : C

The WORKDIR instruction sets the working directory for any subsequent RUN, CMD, ENTRYPOINT, COPY and ADD instructions that follow it in the Dockerfile1. The RUN instruction executes commands in a new layer on top of the current image and commits the results2. The RUN cd command does not change the working directory for the next RUN instruction, because each RUN command runs in a new shell and a new environment3. Therefore, the file test is created in the root directory (/) of the container image, not in the /tmp directory. Reference:

Dockerfile reference: WORKDIR

Dockerfile reference: RUN

difference between RUN cd and WORKDIR in Dockerfile


Question 7

What is Docker Hub?



Answer : B

Docker Hub is a cloud-based container image registry used to store, manage, and distribute Docker container images. According to container documentation, it hosts both official images and user-contributed images.

Docker Hub is not a Linux distribution, orchestration platform, or runtime. Therefore, the correct answer is B.


Page:    1 / 14   
Total 121 questions