2 packs: 15% off with code BUY2. 3 or more: 20% off with code BUY3.

Free LPI LPIC-3 305-300 Practice Questions

14 free LPI LPIC-3 305-300 practice questions from the CertStash pack of 55, each with the correct answer and a full explanation. The rule is the same for every exam: ten free on the product page, 14 free here, all 55 in the pack, and each step includes the one before it.

Question 1

What is the purpose of the command vagrant init?

  1. It executes a provisioning tool in a running box.
  2. It starts a Vagrant box.
  3. It creates a Vagrant configuration file.
  4. It installs Vagrant on a Linux host.
  5. It downloads a Vagrant box.
Show answer and explanation

Correct answer: C. It creates a Vagrant configuration file.

The vagrant init command creates a Vagrantfile, which is the configuration file that defines how a Vagrant environment should be set up. This file specifies the box to use, provider settings, networking, and provisioning instructions. It is the first step in setting up a new Vagrant project.

Why the other options are wrong

  • A. Provisioning is performed by vagrant provision, not vagrant init.
  • B. Starting a box is done with vagrant up, not vagrant init.
  • D. Vagrant is installed on the host system beforehand, not via vagrant init.
  • E. Downloading a box happens during vagrant up or with vagrant box add, not vagrant init.

Question 2

In order to use the option dom0_mem to limit the amount of memory assigned to the Xen Domain-0, where must this option be specified?

  1. In the bootloader configuration, when Xen is booted.
  2. In any of Xen’s global configuration files.
  3. In its .config file, when the Domain-0 kernel is built.
  4. In the configuration file /etc/xen/Domain-0.cfg, when Xen starts.
  5. In its Makefile, when Xen is built.
Show answer and explanation

Correct answer: A. In the bootloader configuration, when Xen is booted.

The dom0_mem parameter is a Xen hypervisor parameter that must be passed to the hypervisor at boot time. This is specified in the bootloader configuration (such as GRUB) so that the parameter is available when Xen starts and can allocate the specified amount of memory to Domain-0 before any domains are created.

Why the other options are wrong

  • B. Xen's global configuration files cannot pass parameters to the hypervisor at boot time.
  • C. The Domain-0 kernel's .config file controls kernel features, not hypervisor memory allocation.
  • D. Domain-0.cfg is used for Domain-0 virtual machine configuration, not hypervisor initialization parameters.
  • E. The Xen build Makefile controls compilation but not runtime hypervisor parameters.

Question 3

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

  1. Both can share directories from the host file system to a guest.
  2. Both start system images as containers instead of virtual machines by default.
  3. Both can download required base images.
  4. Both can apply changes to a base image.
  5. Both start system images as virtual machines instead of containers by default.
Show answer and explanation

Correct answer: A, C, D. Both can share directories from the host file system to a guest; Both can download required base images; Both can apply changes to a base image.

Vagrant and Docker both support sharing host directories with guests (A), downloading and using base images such as boxes or Docker images (C), and applying changes to base images through provisioners or Dockerfiles (D). However, they differ fundamentally in their default approach: Vagrant typically uses virtual machines while Docker uses containers, making options B and E incorrect as stated.

Why the other options are wrong

  • B. Docker starts containers by default, and Vagrant starts virtual machines by default; they are opposites.
  • E. This is contradictory to B and incorrect; Docker uses containers, not virtual machines by default.

Question 4

What is the default provider of Vagrant?

  1. lxc
  2. hyperv
  3. virtualbox
  4. vmware_workstation
  5. docker
Show answer and explanation

Correct answer: C. virtualbox

VirtualBox is the default provider for Vagrant. When a Vagrant configuration does not explicitly specify a provider, Vagrant will use VirtualBox to create and manage virtual machines. VirtualBox is widely available across different operating systems and requires no additional licensing.

Why the other options are wrong

  • A. LXC is a container provider, not the default.
  • B. Hyper-V is a Windows-specific provider and not the default across platforms.
  • D. VMware Workstation is a commercial provider that must be explicitly configured.
  • E. Docker is a container provider that must be explicitly specified as the provider.

Question 5

In an IaaS cloud, what is a common method for provisioning new computing instances with an operating system and software?

  1. Each new instance is connected to the installation media of a Linux distribution and provides access to the installer by logging in via SSH.
  2. Each new instance is created based on an image file that contains the operating system as well as software and default configuration for a given purpose.
  3. Each new instance is a clone of another currently running instance that includes all the software, data and state of the original instance.
  4. Each new instance is connected via a VPN with the computer that started the provisioning and tries to PXE boot from that machine.
  5. Each new instance contains a minimal live system running from a virtual CD as the basis from which the administrator deploys the target operating system.
Show answer and explanation

Correct answer: B. Each new instance is created based on an image file that contains the operating system as well as software and default configuration for a given purpose.

The standard method for provisioning IaaS instances is to create them from pre-built image files (sometimes called machine images, AMIs, or templates) that contain a complete operating system, software stack, and default configurations. This approach is fast, reproducible, and scalable. Users simply instantiate new instances from these images rather than installing from scratch.

Why the other options are wrong

  • A. Connecting new instances to installation media and using SSH-based installers is inefficient and not the common practice in IaaS.
  • C. Cloning a running instance including its state is not standard provisioning; it captures a specific point in time.
  • D. PXE booting from a remote provisioning machine is cumbersome and not typical for IaaS cloud providers.
  • E. Using a minimal live system as a basis and then deploying the OS is a more manual approach than using pre-built images.

Question 6

Which command within virsh lists the virtual machines that are running on the current host?

  1. view
  2. list-vm
  3. list
  4. show
  5. list-all
Show answer and explanation

Correct answer: C. list

The virsh list command displays the virtual machines currently running on the host. By default, it shows only running VMs, though the --all flag can be used to display all VMs including inactive ones. This is the standard command for viewing the status of virtual machines managed by libvirt.

Why the other options are wrong

  • A. view is not a valid virsh command.
  • B. list-vm is not the correct virsh syntax; the command is simply list.
  • D. show is used to display configuration details of a specific domain, not to list all VMs.
  • E. list-all is not the correct syntax; use list --all instead.

Question 7

What is the purpose of cloud-init?

  1. Replace common Linux init systems, such as systemd or SysV init.
  2. Assign an IaaS instance to a specific computing node within a cloud.
  3. Standardize the configuration of infrastructure services, such as load balancers or virtual firewalls in a cloud.
  4. Orchestrate the creation and start of multiple related IaaS instances.
  5. Prepare the generic image of an IaaS instance to fit a specific instance’s configuration.
Show answer and explanation

Correct answer: E. Prepare the generic image of an IaaS instance to fit a specific instance’s configuration.

cloud-init is a tool used during IaaS instance initialization to customize a generic cloud image to match the specific requirements of a particular instance. It handles tasks such as setting hostname, configuring network interfaces, installing packages, running scripts, and applying user-provided configuration. This allows a single generic image to be deployed across many instances with different configurations.

Why the other options are wrong

  • A. cloud-init does not replace init systems; it runs early in the boot process alongside them.
  • B. cloud-init does not assign instances to specific computing nodes; that is handled by the cloud orchestration layer.
  • C. cloud-init is instance-level configuration, not infrastructure-wide service standardization.
  • D. Orchestrating multiple related instances is the role of orchestration tools like Terraform or CloudFormation, not cloud-init.

Question 8

What is the purpose of the packer inspect subcommand?

  1. Retrieve files from an existing Packer image.
  2. Execute commands within a running instance of a Packer image.
  3. List the artifacts created during the build process of a Packer image.
  4. Show usage statistics of a Packer image.
  5. Display an overview of the configuration contained in a Packer template.
Show answer and explanation

Correct answer: E. Display an overview of the configuration contained in a Packer template.

The packer inspect command reads a Packer template file and displays an overview of its configuration, including the variables, builders, provisioners, and post-processors defined in the template. This is useful for understanding what a template does before executing it.

Why the other options are wrong

  • A. Retrieving files from a built image would require different tools, not the inspect subcommand.
  • B. Executing commands within a running instance is not the purpose of inspect; that is handled by provisioners during the build.
  • C. Listing artifacts is related to the build output, not the purpose of the inspect subcommand.
  • D. Retrieve usage statistics is not a function of Packer's inspect command.

Question 9

What is the purpose of capabilities in the context of container virtualization?

  1. Map potentially dangerous system calls to an emulation layer provided by the container virtualization.
  2. Restrict the disk space a container can consume.
  3. Enable memory deduplication to cache files which exist in multiple containers.
  4. Allow regular users to start containers with elevated permissions.
  5. Prevent processes from performing actions which might infringe the container.
Show answer and explanation

Correct answer: E. Prevent processes from performing actions which might infringe the container.

Capabilities in container virtualization are Linux kernel features that restrict what privileged operations a process can perform. They allow fine-grained control over elevated permissions by breaking down root's authority into discrete units, preventing processes from performing dangerous actions even if they run with elevated privileges. This is a core security mechanism for containers.

Why the other options are wrong

  • A. System call emulation is handled by seccomp or ptrace mechanisms, not capabilities.
  • B. Disk space restrictions are enforced by cgroups (storage limits), not capabilities.
  • C. Memory deduplication is a hypervisor or kernel memory management feature, unrelated to capabilities.
  • D. Capabilities restrict what elevated users can do; they don't grant regular users elevated permissions.

Question 10

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

  1. /var/lib/cloud/
  2. /etc/cloud-init/cache/
  3. /proc/sys/cloud/
  4. /tmp/.cloud/
  5. /opt/cloud/var/
Show answer and explanation

Correct answer: A. /var/lib/cloud/

cloud-init stores all its state information, cache data, and configuration retrieved from external sources (such as metadata servers) in the /var/lib/cloud/ directory. This includes instance metadata, configuration files processed during initialization, and status information about previous cloud-init executions.

Why the other options are wrong

  • B. /etc/cloud-init/cache/ is not the standard cloud-init storage location for runtime data.
  • C. /proc/sys/cloud/ does not exist; /proc is for kernel parameters, not cloud-init storage.
  • D. /tmp/.cloud/ is temporary and would not reliably persist cloud-init state across reboots.
  • E. /opt/cloud/var/ is not a standard cloud-init directory.

Question 11

If docker stack is to be used to run a Docker Compose file on a Docker Swarm, how are the images referenced in the Docker Compose configuration made available on the Swarm nodes?

  1. docker stack builds the images locally and copies them to only those Swarm nodes which run the service.
  2. docker stack passes the images to the Swarm master which distributes the images to all other Swarm nodes.
  3. docker stack instructs the Swarm nodes to pull the images from a registry, although it does not upload the images to the registry.
  4. docker stack transfers the image from its local Docker cache to each Swarm node.
  5. docker stack triggers the build process for the images on all nodes of the Swarm.
Show answer and explanation

Correct answer: C. docker stack instructs the Swarm nodes to pull the images from a registry, although it does not upload the images to the registry.

When using docker stack to deploy services from a Docker Compose file to a Docker Swarm, the images must already exist in a container registry. Docker Stack instructs each Swarm node to pull the required images from that registry independently. The images are not built, copied, or distributed by Stack itself. Each node handles the pull operation.

Why the other options are wrong

  • A. docker stack does not build images locally; build operations must occur separately before deploying with stack.
  • B. There is no image distribution process through a Swarm master; nodes pull directly from registries.
  • D. docker stack does not transfer images from local Docker caches to remote nodes.
  • E. docker stack does not trigger build processes on nodes; pre-built images from a registry are required.

Question 12

Which CPU flag indicates the hardware virtualization capability on an AMD CPU?

  1. HVM
  2. VIRT
  3. SVM
  4. PVM
  5. VMX
Show answer and explanation

Correct answer: C. SVM

The SVM (Secure Virtual Machine) flag indicates hardware virtualization capability on AMD processors. This CPU feature enables AMD-V virtualization technology, allowing the processor to support hypervisors and virtual machines. This is AMD's equivalent to Intel's VMX flag.

Why the other options are wrong

  • A. HVM stands for Hardware Virtual Machine but is not the specific AMD CPU flag designation.
  • B. VIRT is not the specific AMD CPU virtualization flag.
  • D. PVM is not a recognized AMD CPU virtualization flag.
  • E. VMX is the Intel CPU virtualization flag, not AMD.

Question 13

Which of the following statements are true regarding a Pod in Kubernetes? (Choose two.)

  1. All containers of a Pod run on the same node.
  2. Pods are always created automatically and cannot be explicitly configured.
  3. A Pod is the smallest unit of workload Kubernetes can run.
  4. When a Pod fails, Kubernetes restarts the Pod on another node by default.
  5. systemd is used to manage individual Pods on the Kubernetes nodes.
Show answer and explanation

Correct answer: A, C. All containers of a Pod run on the same node; A Pod is the smallest unit of workload Kubernetes can run.

Option A is correct: all containers within a single Pod share the same network namespace and run on the same node, allowing them to communicate via localhost. Option C is correct: a Pod is the smallest deployable unit in Kubernetes; you cannot run a container directly without wrapping it in a Pod. Option B is false because Pods can be explicitly configured and defined in manifests. Option D is false; Kubernetes does not automatically restart a failed Pod on another node by default. That behavior is provided by higher-level controllers like Deployments. Option E is false; systemd is not used to manage Pods; the kubelet on each node manages Pods.

Why the other options are wrong

  • B. Pods are explicitly configured through manifests and are not created automatically.
  • D. Pod restart on another node is not default behavior; it requires a controller like Deployment.
  • E. systemd is not involved in Pod management; the kubelet manages Pods directly.

Question 14

Which file in a cgroup directory contains the list of processes belonging to this cgroup?

  1. pids
  2. members
  3. procs
  4. tasks
  5. subjects
Show answer and explanation

Correct answer: C. procs

The 'procs' file in a cgroup directory contains the list of process IDs (PIDs) belonging to that cgroup. This file allows administrators to see which processes are members of a specific cgroup and is fundamental to cgroup management and process accounting.

Why the other options are wrong

  • A. The 'pids' file is used to set limits on the number of processes in a cgroup, not to list them.
  • B. There is no 'members' file in cgroup directories.
  • D. The 'tasks' file existed in cgroups v1 but is not the standard interface in modern cgroup implementations.
  • E. There is no 'subjects' file in cgroup directories.

That was 14 of 55.

The full LPI LPIC-3 305-300 pack has all 55 questions, each with the answer, the explanation and why the other options are wrong, plus a questions-only copy for timed runs. US$39, paid once, with free monthly updates and a pass-or-your-money-back guarantee.

Get the full pack

Not ready yet? Get the first 27 free as one PDF by email. Get the Half Pack →