Limited-Time Offer: Enjoy 50% Savings! Ends in 00h 00m 00s Coupon code: 50OFF
Skip to content

Free LPI LPIC-3: Virtualization and Containerization - Exam 305, (version 3.0) 305-300 Exam Questions

Page: 1 / 13 Total 121 questions

Want more questions? Get Premium Access.

Question 1

Which of the following statements are true regarding hardware-based virtualization? (Choose TWO correct answers.)

Correct Answer: A. Hardware-based virtualization relies on the host system's processor to call the hypervisor when critical instructions are executed by a virtual machine.; C. Hardware-based virtualization requires special support in the host system's hardware which is present in recent x86-based computers.
Explanation:

Hardware-based virtualization uses CPU-assisted virtualization features to improve performance and isolation when running virtual machines. According to virtualization documentation, modern processors such as Intel VT-x and AMD-V provide special CPU instructions that allow the processor to trap and transfer control to the hypervisor when sensitive or privileged instructions are executed by a guest virtual machine. This behavior makes statement A correct.

Additionally, hardware-based virtualization requires explicit CPU and chipset support, which is now standard in most modern x86-based systems. These hardware extensions reduce the need for complex software emulation and enable near-native performance for virtual machines. Therefore, statement C is also correct.

Statement B describes full software emulation rather than hardware-assisted virtualization and is incorrect in this context. Statement D is false because hardware-based virtualization is widely available and heavily used on x86 architectures in enterprise, cloud, and desktop environments.

Virtualization notes consistently highlight that hardware-based virtualization is the foundation for platforms such as KVM, Xen, VMware ESXi, and Hyper-V, making it a critical technology in modern computing. Thus, the correct answers are A and C.


Question 2

If a Dockerfile contains the following lines:

WORKDIR /

RUN cd /tmp

RUN echo test > test

where is the file test located?

Correct Answer: C. /test within the container image.
Explanation:

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 3

Which of the following statements are true regarding emulation? (Choose TWO)

Correct Answer: A. Emulation allows operating systems to be run on foreign architectures; C. Emulation implements a whole computing system in software
Explanation:

Emulation is a technique in which a complete computing system is implemented entirely in software. According to virtualization documentation, emulation allows operating systems and applications compiled for one CPU architecture to run on a different, foreign architecture, making statement A correct.

Statement C is also correct because emulation reproduces the entire hardware environment, including CPU, memory, and devices, using software alone. This contrasts with virtualization, which relies on hardware support and does not emulate the full system.

Statement B is incorrect because emulation does provide full virtual machines, not just individual components. Statement D is also incorrect, as emulation does not require changes to the guest OS; the guest believes it is running on real hardware.

Therefore, the correct answers are A and C.


Question 4

What happens when the following command is executed twice in succession?

docker run -tid -v data:/data debian bash

Correct Answer: C. Both containers share the contents of the data volume, have full permissions to alter its content and mutually see their respective changes.
Explanation:

The command docker run -tid -v data:/data debian bash creates and runs a new container from the debian image, with an interactive terminal and a detached mode, and mounts a named volume data at /data in the container12. If the volume data does not exist, it is created automatically3. If the command is executed twice in succession, two containers are created and run, each with its own terminal and process ID, but they share the same volume data. This means that both containers can access, modify, and see the contents of the data volume, and any changes made by one container are reflected in the other container. Therefore, the statement C is true and the correct answer. The statements A, B, D, and E are false and incorrect, as they do not describe the behavior of the command or the volume correctly. Reference:

1: docker run | Docker Docs.

2: Docker run reference | Docker Docs - Docker Documentation.

3: Use volumes | Docker Documentation.

[4]: How to Use Docker Run Command with Examples - phoenixNAP.


Question 5

Which of the following tasks are part of a hypervisor's responsibility? (Choose two.)

Correct Answer: C. Map the resources of virtual machines to the resources of the host system.; E. Isolate the virtual machines and prevent unauthorized access to resources of other virtual machines.
Explanation:

A hypervisor is a software that creates and runs virtual machines (VMs) by separating the operating system and resources from the physical hardware. One of the main tasks of a hypervisor is to map the resources of VMs to the resources of the host system, such as CPU, memory, disk, and network. This allows the hypervisor to allocate and manage the resources among multiple VMs and ensure that they run efficiently and independently123. Another important task of a hypervisor is to isolate the VMs and prevent unauthorized access to resources of other VMs. This ensures the security and privacy of the VMs and their data, as well as the stability and performance of the host system. The hypervisor can use various techniques to isolate the VMs, such as virtual LANs, firewalls, encryption, and access control145.

The other tasks listed are not part of a hypervisor's responsibility, but rather of the guest operating system or the application running inside the VM. A hypervisor does not create filesystems during the installation of new VMs, as this is done by the installer of the guest operating system6. A hypervisor does not provide host-wide unique PIDs to the processes running inside the VMs, as this is done by the kernel of the guest operating system7. A hypervisor does not manage authentication to network services running inside a VM, as this is done by the network service itself or by a directory service such as LDAP or Active Directory8. Reference: 1 (search for ''What is a hypervisor?''), 2 (search for ''How does a hypervisor work?''), 3 (search for ''The hypervisor gives each virtual machine the resources that have been allocated''), 4 (search for ''Benefits of hypervisors''), 5 (search for ''Isolate the virtual machines and prevent unauthorized access''), 6 (search for ''Create filesystems during the installation of new virtual machine quest operating systems''), 7 (search for ''Provide host-wide unique PIDs to the processes running inside the virtual machines''), 8 (search for ''Manage authentication to network services running inside a virtual machine'').


Question 6

What is the same of the global configuration file for the xl tool stack?

Correct Answer: A. etcxenxlconf
Explanation:

The xl toolstack is the modern command-line management interface used for administering the Xen hypervisor, replacing the older xm toolstack. According to official Xen virtualization documentation, the global configuration file for the xl toolstack is /etc/xen/xl.conf.

This configuration file defines default behaviors and policies for the xl management commands. It allows administrators to configure global settings such as default CPU scheduling behavior, memory handling, device model settings, and other operational parameters that affect how virtual machines (domains) are managed on a Xen host. These settings apply system-wide and influence the behavior of all xl commands unless overridden by per-domain configuration files.

The file /etc/xen/xl.conf is read by the xl toolstack at runtime and is part of the standard Xen configuration directory structure. Individual virtual machine definitions are typically stored as separate configuration files in /etc/xen/, but xl.conf serves as the central, global configuration reference.

Virtualization notes emphasize that proper configuration of xl.conf is important for performance tuning, stability, and compliance in Xen-based environments. While many default installations function correctly without modifying this file, enterprise deployments often customize it to align with workload requirements and hardware capabilities.

Therefore, the correct and documented global configuration file for the xl toolstack is /etc/xen/xl.conf.


Question 7

Which of the following commands lists all differences between the disk images vm1-snap.img and vm1.img?

Correct Answer: E. virt-diff -a vm1-snap.img -A vm1.img
Explanation:

The virt-diff command-line tool can be used to list the differences between files in two virtual machines or disk images. The output shows the changes to a virtual machine's disk images after it has been running. The command can also be used to show the difference between overlays1. To specify two guests, you have to use the -a or -d option for the first guest, and the -A or -D option for the second guest. For example: virt-diff -a old.img -A new.img1. Therefore, the correct command to list all differences between the disk images vm1-snap.img and vm1.img is: virt-diff -a vm1-snap.img -A vm1.img. The other commands are not related to finding differences between disk images. virt-delta is a tool to create delta disks from two disk images2. virt-cp-in is a tool to copy files and directories into a virtual machine disk image3. virt-cmp is a tool to compare two files or directories in a virtual machine disk image4. virt-history is a tool to show the history of a virtual machine disk image5. Reference:

21.13. virt-diff: Listing the Differences between Virtual Machine Files ...

21.14. virt-delta: Creating Delta Disks from Two Disk Images ...

21.6. virt-cp-in: Copying Files and Directories into a Virtual Machine Disk Image ...

21.7. virt-cmp: Comparing Two Files or Directories in a Virtual Machine Disk Image ...

21.8. virt-history: Showing the History of a Virtual Machine Disk Image ...


Question 8

Which directory is used by cloud-init to store status information and configuration information retrieved from external sources?

Correct Answer: A. /var/lib/cloud/
Explanation:

cloud-init uses the /var/lib/cloud/ directory to store status information and configuration information retrieved from external sources, such as the cloud platform's metadata service or user data files. The directory contains subdirectories for different types of data, such as instance, data, handlers, scripts, and sem. The instance subdirectory contains information specific to the current instance, such as the instance ID, the user data, and the cloud-init configuration. The data subdirectory contains information about the data sources that cloud-init detected and used. The handlers subdirectory contains information about the handlers that cloud-init executed. The scripts subdirectory contains scripts that cloud-init runs at different stages of the boot process, such as per-instance, per-boot, per-once, and vendor. The sem subdirectory contains semaphore files that cloud-init uses to track the execution status of different modules and stages. Reference:

Configuring and managing cloud-init for RHEL 8 - Red Hat Customer Portal

vsphere - what is the linux file location where the cloud-init user ...


Question 9

When using Packer to create machine images, what are some common sources for base images? (Select all that apply)

Correct Answer: C. Custom images created by the organization; D. Official operating system images
Explanation:

Packer is an image automation tool used to create identical machine images for multiple platforms from a single configuration. According to virtualization and containerization documentation, Packer typically uses trusted and standardized base images as the starting point for image creation. The most common sources include official operating system images provided by vendors such as Red Hat, Ubuntu, or cloud service providers, and custom images created internally by an organization.

Using official images ensures that the base system is secure, properly maintained, and compliant with vendor standards. Organizations often build custom base images to enforce internal security policies, hardening standards, and preinstalled software, which Packer then extends into environment-specific images.

Physical servers are not considered common or practical base sources for Packer, as Packer operates on machine image artifacts rather than cloning live hardware systems. Images from untrusted sources are explicitly discouraged in virtualization documentation due to security and compliance risks.

Therefore, documentation clearly supports custom organizational images and official operating system images as the correct and recommended base sources for Packer image creation.


Question 10

What is cloud-init?

Correct Answer: A. A configuration tool for customizing cloud instances
Explanation:

Cloud-init is a widely used instance initialization and configuration tool designed specifically for cloud environments. According to cloud-init documentation, it is responsible for customizing cloud instances at first boot using metadata and user-provided data.

Cloud-init performs tasks such as setting hostnames, configuring networking, injecting SSH keys, installing packages, and executing user-defined scripts. It is supported by most major cloud providers and works across virtual machines regardless of the underlying hypervisor.

Cloud-init is not a containerization tool, a cloud management platform, or a virtualization solution. Instead, it operates within a virtual machine to perform configuration tasks after the instance has been provisioned.

Therefore, the correct answer is A.