LPI · Free Practice Questions · Last reviewed May 2026
18real exam-style questions organised by domain, each with the correct answer highlighted and a plain-English explanation of why it's right — and why the others are wrong.
Which THREE of the following are valid Libvirt storage pool types?
ram
iscsi
iSCSI targets are supported as storage backends.
lvm
LVM volume groups can be managed as storage pools.
usb
dir
Directory-based storage is a standard Libvirt pool type.
Which command is used to list all defined virtual networks in Libvirt?
brctl show
virsh net-list --all
This is the correct command to list networks.
virsh domiflist
virsh list-networks
You need to migrate a running QEMU VM to a remote host using live migration. Which command-line argument for QEMU-KVM initiates a migration to a target host at 192.168.1.50 on port 4444?
-remote 192.168.1.50:4444
-migrate tcp:192.168.1.50:4444
Correct syntax for initiating migration via CLI.
-live-migrate 192.168.1.50:4444
-incoming tcp:192.168.1.50:4444
When migrating a Libvirt domain using 'virsh migrate --live', which option must be specified to ensure the guest's memory state is copied over the network?
--copy-storage-all
This flag forces the migration of non-shared disk images.
--shared-storage
--migrate-disk
--memory-copy
You are troubleshooting a libvirt network issue where the virtual machines cannot reach the external gateway. The virtual network uses a NAT configuration. Which file would you inspect to verify the iptables rules generated by libvirt for this network?
/var/lib/libvirt/network/default.xml
/etc/sysconfig/network-scripts/ifcfg-virbr0
/etc/libvirt/qemu/networks/default.xml
The XML file defines the network and triggers the iptables rule generation.
/etc/iptables/rules.v4
You are configuring a Xen guest that requires direct hardware access to a specific network interface card. Which configuration parameter in the guest domain configuration file must be specified to enable PCI passthrough?
pci = [ '00:1f.1' ]
Correct syntax for passing a PCI device to a Xen guest.
device_pass = 'eth0'
hw_access = '00:1f.1'
vif = [ 'type=pci, bus=00:1f.1' ]
Want more Full Virtualization practice?
Practice this domainWhich THREE of the following are valid storage driver options for Docker on Linux?
overlay2
The recommended storage driver for most Linux distributions.
ext4-driver
vfs
zfs
A supported storage driver for ZFS filesystems.
btrfs
A supported storage driver for Btrfs filesystems.
You are optimizing a Dockerfile to reduce image size. Which THREE of the following practices are recommended?
Use the FROM latest tag for all base images
Always install recommended packages for security
Remove /var/lib/apt/lists/* after installing packages
Cleaning the package cache reduces image size significantly.
Use multi-stage builds to discard build-time dependencies
This allows for a smaller final image by excluding source code and build tools.
Use a single RUN command to chain multiple commands with &&
This reduces the number of image layers created.
You are troubleshooting a Docker container that cannot reach the internet despite the host having connectivity. The container uses the default bridge network. Which iptables chain is most likely causing the block?
PREROUTING
POSTROUTING
FORWARD
Docker injects rules into the FORWARD chain to control inter-network traffic.
OUTPUT
You are configuring an LXC container and need to grant it access to a specific host character device without running the container in privileged mode. Which configuration option in the container's config file should you use?
lxc.cgroup2.devices.allow
This allows the container to access the specified device node.
lxc.cap.keep
lxc.mount.entry
lxc.hook.pre-start
A Docker container is failing to connect to an external database despite the host being able to ping it. You suspect a bridge networking issue. Which command allows you to inspect the current NAT rules created by Docker?
docker network inspect bridge
iptables -t nat -L -n
Docker adds rules to the NAT table for port forwarding and masquerading.
ip link show docker0
sysctl -a | grep net.bridge
You need to run a container that requires access to the host's network namespace directly to perform packet capture. Which Docker run flag should you use?
--cap-add NET_ADMIN
--privileged
--net bridge
--network host
This flag joins the container to the host network stack.
Want more Container Virtualization practice?
Practice this domainYou are using Packer to automate a build. You notice the build fails because the 'communicator' cannot connect. Which type of communicator is most suitable for a KVM-based build where SSH is not yet configured?
ssh
http
winrm
none
This is used when external orchestration is not required.
In a Packer build process for OpenStack, which 'post-processor' type is typically used to upload the resulting image to the Glance image service?
manifest
shell-local
openstack
This handles the image upload to Glance.
compress
When using Vagrant to manage a libvirt-based provider, which command verifies that the virtual machine is currently running and identifies the provider in use?
vagrant up
vagrant status
This displays the status and the provider.
vagrant validate
vagrant box list
You 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?
users.ssh_key
ssh_keys
ssh_authorized_keys
This is the correct key under the user definition.
authorized_keys_file
Which file in a Vagrant project directory is processed by default to define the virtual environment configuration?
settings.json
Vagrantfile
This is the required configuration filename.
provision.sh
config.yml
You are using Packer to build a custom image for KVM. Which HCL2 block is specifically required to define the virtualization parameters like memory and CPU for the builder?
provisioners
post-processors
boot_command
qemuargs
The qemuargs block allows direct manipulation of the QEMU command line arguments used for the builder instance.
Want more VM Deployment And Provisioning practice?
Practice this domainThe 305-300 exam has 200 questions and must be completed in 120 minutes. Cisco passing scores vary by exam version and are not always publicly listed.
CLI output interpretation, network topology analysis, routing behaviour, switching concepts, troubleshooting, and configuration questions.
The exam covers 3 domains: Full Virtualization, Container Virtualization, VM Deployment And Provisioning. Questions are weighted by domain — higher-weight domains appear more on your actual exam.
No. These are original exam-style practice questions written against the official LPI 305-300 exam objectives. They are not copied from the real exam. Courseiva focuses on genuine understanding, not memorisation of braindumps.
Courseiva tracks your accuracy per domain and routes you toward weak areas automatically. Free, no account required.