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

Page: 1 / 14
Total 121 questions
Question 1

Which utility is used to create and manage virtual machine disk images in Linux?



Answer : D

In Linux-based virtualization environments, qemu-img is the standard utility used to create, convert, inspect, and manage virtual machine disk images. Virtualization and containerization documentation clearly identifies qemu-img as a core component of the QEMU/KVM virtualization stack. It supports multiple disk image formats such as RAW, QCOW2, VMDK, and VHD, making it highly versatile across different hypervisors and platforms.

The qemu-img tool allows administrators to perform critical disk operations, including creating new disk images, resizing existing images, converting between formats, and checking disk integrity. For example, it is commonly used to create QCOW2 images, which support advanced features like copy-on-write, snapshots, and compression.

Other options listed are incorrect because Disk Utility is a general-purpose storage management tool, VirtualBox Manager is specific to Oracle VirtualBox, and Libvirt Disk Manager is not a recognized standalone utility. Libvirt relies on qemu-img internally for disk image handling.

Official virtualization notes consistently reference qemu-img as the primary disk image management tool in Linux virtualization environments, especially when working with KVM and libvirt-based systems.


Question 2

Xen is a:



Answer : B

Xen is classified as a Type 1 (bare-metal) hypervisor, meaning it runs directly on the system hardware rather than on top of a host operating system. Virtualization documentation defines Type 1 hypervisors as having direct control over CPU, memory, and hardware resources, providing better performance and stronger isolation compared to Type 2 hypervisors.

In a Xen-based system, the hypervisor is loaded first during boot. A privileged management domain, known as Domain 0 (Dom0), is then started to manage hardware access and virtual machine lifecycle operations. This architecture clearly differentiates Xen from hosted (Type 2) hypervisors such as VirtualBox.

Xen is not merely a management tool or application virtualization platform; it is a full hypervisor used in enterprise, cloud, and service provider environments. Therefore, the correct answer is B.


Question 3

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 : A

LXD supports the following network interface types for containers: macvlan, bridged, physical, sriov, and ovn1. Macvlan creates a virtual interface on the host that is connected to the same network as the parent interface2. Bridged connects the container to a network bridge that acts as a virtual switch3. Physical attaches the container to a physical network interface on the host2. Ipsec and wifi are not valid network interface types for LXD containers. Reference:

1: Bridge network - Canonical LXD documentation

2: How to create a network - Canonical LXD documentation

4: LXD containers and networking with static IP - Super User


Question 4

Which functionality is provided by Vagrant as well as by Docker? (Choose three.)



Answer : A, C, D

Both Vagrant and Docker can share directories from the host file system to a guest. This allows the guest to access files and folders from the host without copying them. Vagrant uses the config.vm.synced_folder option in the Vagrantfile to specify the shared folders1. Docker uses the -v or --volume flag in the docker run command to mount a host directory as a data volume in the container2.

Both Vagrant and Docker can download required base images. Base images are the starting point for creating a guest environment. Vagrant uses the config.vm.box option in the Vagrantfile to specify the base image to use1. Docker uses the FROM instruction in the Dockerfile to specify the base image to use2. Both Vagrant and Docker can download base images from public repositories or local sources.

Both Vagrant and Docker can apply changes to a base image. Changes are modifications or additions to the base image that customize the guest environment. Vagrant uses provisioners to run scripts or commands on the guest after it is booted1. Docker uses instructions in the Dockerfile to execute commands on the base image and create a new image2. Both Vagrant and Docker can save the changes to a new image or discard them after the guest is destroyed.

Vagrant and Docker differ in how they start system images. Vagrant starts system images as virtual machines by default, using a provider such as VirtualBox, VMware, or Hyper-V1. Docker starts system images as containers by default, using the native containerization functionality on macOS, Linux, and Windows2. Containers are generally more lightweight and faster than virtual machines, but less secure and flexible. Reference: 1: Vagrant vs. Docker | Vagrant | HashiCorp Developer 2: Vagrant vs Docker: Which Is Right for You? (Could Be Both) - Kinsta Web Development Tools


Question 5

What is the typical format for cloud-init configuration files?



Answer : D

Cloud-init configuration files are typically written in YAML (Yet Another Markup Language) format. Official cloud-init documentation specifies that cloud-config files use YAML syntax, which is human-readable and well suited for declarative configuration.

YAML files allow administrators to define users, packages, services, networking, and commands in a structured and consistent way. While cloud-init can process shell scripts and MIME multipart data, YAML remains the standard and recommended format.

Thus, the correct answer is D.


Question 6

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 /data volume with the datastore container?



Answer : C

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. Reference:

Docker Docs - Volumes

Stack Overflow - How to map volume paths using Docker's --volumes-from?

Docker Docs - docker run


Question 7

When setting up a KVM virtualization host, which one of the following components is NOT required?



Answer : E

When configuring a KVM-based virtualization host, several core components are mandatory to enable and manage virtual machines. According to KVM and virtualization documentation, KVM kernel modules are essential because they provide hardware-assisted virtualization support within the Linux kernel. QEMU is required to perform hardware emulation and manage virtual machine execution. Libvirt acts as the virtualization management API, enabling centralized and secure control of virtual machines. Additionally, bridgeutils is commonly required to configure network bridges, allowing virtual machines to communicate with external networks.

However, virsh is not strictly required. Virsh is a command-line utility that interacts with libvirt to manage virtual machines, but it is only a management interface, not a core dependency. Virtual machines can still be created and managed using alternative tools such as virt-manager, Ansible, OpenStack, or custom API-based solutions without virsh being installed.

Virtualization documentation clearly distinguishes between essential backend components (KVM, QEMU, libvirt) and optional management tools (virsh). Therefore, while virsh is widely used and highly recommended for administrative convenience, it is not a mandatory component for a functional KVM virtualization host.


Page:    1 / 14   
Total 121 questions