305-300 · domain
VM Deployment And Provisioning
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.
Focused practice
Practice VM Deployment And Provisioning questions
Scored sessions drawing only from this domain — pick a length below.
Start 20-question practice test →What this domain covers
What to know about VM Deployment And Provisioning
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.
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
Watch out for
Common VM Deployment And Provisioning exam traps
- ▸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.
Question index
All VM Deployment And Provisioning questions (36)
Click any question to see the full explanation, or start a practice session above.
A 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?
Hard2You 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?
Easy3When 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?
Medium4In a Vagrant environment, where should sensitive data like API keys be stored to avoid committing them to version control?
Medium5You 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?
Medium6Which THREE settings are commonly configured in the 'provider' block of a Vagrantfile for virtualbox?
Medium7When using Vagrant to manage a libvirt-based provider, which command verifies that the virtual machine is currently running and identifies the provider in use?
Easy8You 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?
Medium9Which command is used to display the configuration of a Packer build in a readable format?
Easy10When 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?
Medium11Which file in a Vagrant project directory is processed by default to define the virtual environment configuration?
Easy12Which THREE configuration items can be managed via cloud-init 'write_files' module?
Hard13In a Vagrantfile, which method is used to pass environment variables into the guest virtual machine during the provisioning phase?
Hard14You 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?
Hard15What is the default behavior of Vagrant when a box is not found locally on the host machine?
Easy16Which tool is commonly used alongside Packer to validate the configuration file for syntax errors before attempting a build?
Medium17In cloud-init, which syntax is required at the very beginning of the configuration file to ensure it is recognized as a cloud-config script?
Hard18You 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?
Medium19When using Vagrant with multiple machines in a single Vagrantfile, how do you define individual configurations?
Medium20Which cloud-init module is responsible for setting the hostname of the instance during the initial boot process?
Medium21You 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?
Medium22A 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?
Hard23Which TWO components are defined in a Packer 'build' block?
Hard24When using Packer with the QEMU builder, what does the 'format' option in the 'qemu' builder define?
Hard25Which TWO pieces of information does Packer require to build an image for an existing cloud environment?
Hard26You 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?
Hard27You 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?
Hard28In a Packer build process for OpenStack, which 'post-processor' type is typically used to upload the resulting image to the Glance image service?
Medium29A 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?
Medium30You 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?
Easy31What is the primary function of the cloud-init 'runcmd' module?
Medium32Which THREE of the following are common cloud-init modules?
Medium33Which THREE directives are valid under the cloud-init 'users' configuration section?
Medium34Which TWO methods can be used to pass configuration data to cloud-init during instance creation?
Hard35You 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?
Hard36Which Packer builder is most appropriate for creating an image specifically for Amazon Web Services (AWS)?
MediumOther domains
All 305-300 exam domains
Frequently asked questions
- What does the VM Deployment And Provisioning domain cover on the 305-300 exam?
- 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.
- How many questions are in this domain?
- This page lists all 36 VM Deployment And Provisioning questions in the 305-300 question bank. The actual exam draws from this domain proportionally to its weighting in the official exam blueprint.
- What is the best way to practise this domain?
- Start with a short focused session (10 questions) to identify gaps, then work through explanations. Repeat with a longer session once the weak areas feel solid.
- Can I practise only VM Deployment And Provisioning questions?
- Yes — the session launcher on this page filters questions to this domain only. Choose any session length for inline explanations and scoring.