You must be able to write and interpret Packer templates, Vagrantfiles, and cloud-init configs for automated VM deployment. The single most important thing is matching each tool's component to its role: builder versus post-processor, provisioner versus provider, and correct cloud-init file headers.
Start practicing
VM Deployment And Provisioning — choose a session length
Free · No account required
Domain overview
This domain covers automated VM image creation and guest provisioning on the LPIC-3 305 exam. It tests Packer builders and post-processors for OpenStack, Vagrant box handling and Vagrantfile provisioning options, and cloud-init configuration syntax. Questions are scenario-based, asking you to identify the correct builder, post-processor, Vagrantfile method, or cloud-init directive for a given provisioning task.
Exam objectives
Packer post-processor types, including docker-import and vagrant, and uploading images to OpenStack Glance
Vagrantfile provisioning methods such as shell, file, and ansible, plus passing environment variables into guests
Vagrant box resolution behavior, including downloading boxes from the Vagrant Cloud registry when absent locally
cloud-init configuration file headers and module directives, including the #cloud-config first-line requirement
Confusing Packer builders with post-processors: the openstack builder creates the image, while a separate post-processor uploads it to Glance.
Assuming Vagrant fails when a box is missing locally; by default it attempts to download the box from the configured registry.
Forgetting that cloud-init requires the exact #cloud-config header on the first line, otherwise the file is ignored or misparsed.
Click any question to see the full explanation and answer options, or start a focused practice session above.
In a Packer build process for OpenStack, which 'post-processor' type is typically used to upload the resulting image to the Glance image service?
2When using Vagrant to manage a libvirt-based provider, which command verifies that the virtual machine is currently running and identifies the provider in use?
3You are configuring cloud-init to inject an SSH key into a new VM. Which directive in the configuration metadata ensures the key is added to the correct user's authorized_keys file?
4Which file in a Vagrant project directory is processed by default to define the virtual environment configuration?
5When defining a Vagrant network configuration for a libvirt provider, which mode allows the VM to receive an IP address directly from the physical network's DHCP server?
6A cloud-init configuration file is failing to apply the 'write_files' module. Which log file on the target instance should you examine to diagnose the parsing error?
7What is the primary function of the cloud-init 'runcmd' module?
8When provisioning with Vagrant, which command is best used to apply changes to a configuration (like adding a new shell script) without destroying the existing virtual machine?
9You need to ensure that a specific package is installed during the first boot of a cloud instance. Which cloud-init key should be added to the configuration?
10Which Packer builder is most appropriate for creating an image specifically for Amazon Web Services (AWS)?
11In a Vagrantfile, which method is used to pass environment variables into the guest virtual machine during the provisioning phase?
12In cloud-init, which syntax is required at the very beginning of the configuration file to ensure it is recognized as a cloud-config script?
13Which tool is commonly used alongside Packer to validate the configuration file for syntax errors before attempting a build?
14What is the default behavior of Vagrant when a box is not found locally on the host machine?
15Which cloud-init module is responsible for setting the hostname of the instance during the initial boot process?
16When using Packer with the QEMU builder, what does the 'format' option in the 'qemu' builder define?
17In a Vagrant environment, where should sensitive data like API keys be stored to avoid committing them to version control?
18Which command is used to display the configuration of a Packer build in a readable format?
19When using Vagrant with multiple machines in a single Vagrantfile, how do you define individual configurations?
20Which THREE of the following are common cloud-init modules?
21Which TWO components are defined in a Packer 'build' block?
22Which THREE configuration items can be managed via cloud-init 'write_files' module?
23Which THREE settings are commonly configured in the 'provider' block of a Vagrantfile for virtualbox?
24Which TWO pieces of information does Packer require to build an image for an existing cloud environment?
25Which THREE directives are valid under the cloud-init 'users' configuration section?
26Which TWO methods can be used to pass configuration data to cloud-init during instance creation?
27You are building a Vagrant environment for a development team. The Vagrantfile must provision three identical web servers and one load balancer, all using the same base box but with different hostnames and static IP addresses. Which Vagrantfile construct should you use to define these machines and their individual settings?
28You are using Packer to build a KVM-compatible QEMU image for an on-premises OpenStack cloud. The build completes successfully, but the resulting image fails to boot because the virtual disk is not recognized. You verify that the QEMU builder is configured with accelerator 'kvm' and the correct machine type. Which QEMU builder option should you review to ensure the disk image is created in a format that OpenStack can use?
29A Packer template targets the qemu builder to produce a KVM-compatible image. The build completes without error, but when the resulting qcow2 file is booted with `qemu-system-x86_64 -drive file=image.qcow2,if=virtio`, the guest kernel panics with "VFS: Unable to mount root fs" because it cannot see any block device. The template defines only `iso_url`, `iso_checksum`, `ssh_username`, and `ssh_password`. Which change to the template is MOST likely to resolve this?
30You are using Packer to build an image for a private cloud. The build uses the 'qemu' builder and a 'shell' provisioner. The provisioner script runs but fails to install a package because the package repository is unreachable. You suspect the VM has no network connectivity during provisioning. Which Packer feature should you verify to ensure the VM has network access?
31You are provisioning a KVM guest with virt-install. The guest must use a pre-existing disk image located at /var/lib/libvirt/images/web.img and must not have the image created or modified by virt-install. Which option should you include in the virt-install command?
32You are using Vagrant to manage a development environment. You need to run a shell script that installs dependencies after the VM boots for the first time. Which provisioner type should you use in your Vagrantfile?
33You are creating a Vagrant environment for a development team. The team needs a single VM that uses the 'ubuntu/jammy64' box and forwards host port 8080 to guest port 80. Which Vagrantfile configuration block correctly defines this?
34You maintain a Vagrant environment where a single Vagrantfile defines three web servers and one database server. You need each web server to use a different forwarded SSH port on the host because port 2222 is already taken by another project. Which approach correctly assigns unique host ports per machine?
35You are using cloud-init to configure a VM that must run a script only on the very first boot, and the script must not run again on subsequent reboots. The script is provided as a MIME part in a multipart user-data file. Which cloud-init module should be used to ensure this behavior?
36A Packer build targeting the qemu builder completes, but the resulting image boots to a login prompt and never runs your provisioning scripts. You configured an ssh communicator with a username and password. Which condition most likely prevents Packer from connecting to the guest during the build?
You must be able to write and interpret Packer templates, Vagrantfiles, and cloud-init configs for automated VM deployment. The single most important thing is matching each tool's component to its role: builder versus post-processor, provisioner versus provider, and correct cloud-init file headers.
The Courseiva 305-300 question bank contains 36 questions in the VM Deployment And Provisioning domain. Click any question to see the full explanation and answer breakdown.
Start with a 10-question focused session to identify your baseline accuracy in this domain. Read every explanation — even for questions you answer correctly — to understand the reasoning. Once you score consistently above 80%, move to a 20–30 question session to confirm depth before moving to the next domain.
Yes — the session launcher on this page draws questions exclusively from the VM Deployment And Provisioning domain. Choose 10, 20, 30, or 50 questions for a focused session, or click individual questions to review them one by one.
Save your results, see per-domain analytics, and get readiness scores — free, for every certification.
Sign Up FreeFree forever · Every certification included