10 free LPI LPIC-3 305-300 practice questions with the correct answer and a full explanation for each, taken from the CertStash pack of 55 questions. Work through them, then open each answer to check your reasoning.
Get all 55 questions (US$39) · Download these 10 as a PDF
Question 1
What is the purpose of the command vagrant init?
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?
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
What is the default provider of Vagrant?
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 4
In an IaaS cloud, what is a common method for provisioning new computing instances with an operating system and software?
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 5
Which command within virsh lists the virtual machines that are running on the current host?
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 6
What is the purpose of cloud-init?
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 7
What is the purpose of the packer inspect subcommand?
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 8
What is the purpose of capabilities in the context of container virtualization?
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 9
Which directory is used by cloud-init to store status information and configuration information retrieved from external sources?
Show answer and explanation
Correct answer: A. /var/lib/cloud/
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 10
How does Packer interact with system images?
Show answer and explanation
Correct answer: E. Packer creates an instance based on a source image, prepares the instance through a network connection and bundles the resulting instance as a new system image.
Packer is an image building tool that creates instances from source images, applies configurations and customizations through provisioners (which connect via network to the running instance), and then captures the modified instance as a new system image. This process happens before deployment, not during runtime on the host system.
Why the other options are wrong
- A. Packer executes preparation tasks during the build process, not during the image's first boot.
- B. Packer does not install clients within images that periodically fetch updates from a Packer server.
- C. Packer does not connect to running instances after they are deployed; it prepares images before deployment.
- D. Packer uses provisioners and builders to configure instances, not by directly extracting and modifying file systems offline.
That was 10 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.
