




























































































Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
This practice exam evaluates a learner’s applied knowledge of open source virtualization technologies such as KVM, libvirt, QEMU, oVirt, and cloud-native virtualization patterns. The exam simulates real-world scenarios involving hypervisor configuration, VM lifecycle management, virtual networking, resource scheduling, NUMA awareness, storage provisioning, and troubleshooting virtualization workloads in Linux environments. Learners demonstrate mastery of virtualization architecture, performance tuning, security isolation, SELinux/AppArmor integration, and automation using tools like Ansible and Terraform. The practice exam emphasizes hands-on lab accuracy, architectural decision-making, and debugging misconfigured or unstable virtual compute environments.
Typology: Exams
1 / 101
This page cannot be seen from the preview
Don't miss anything!





























































































Question 1. Which hypervisor type runs directly on the hardware without a host operating system? A) Type‑ 1 B) Type‑ 2 C) Para‑virtualized D) Emulated Answer: A Explanation: Type‑1 (bare‑metal) hypervisors are installed directly on the physical server, providing the most efficient use of resources. Question 2. In KVM, which device file must exist for virtual machines to be created? A) /dev/kvm B) /dev/qemu C) /dev/libvirt D) /dev/vm Answer: A Explanation: The /dev/kvm character device is created by the KVM kernel module and is required for QEMU to access hardware virtualization extensions. Question 3. What is the primary advantage of using the virtio driver model in a guest VM? A) Full hardware emulation B) Reduced I/O overhead through paravirtualization C) Automatic guest OS installation D) Enables live migration
Answer: B Explanation: Virtio provides a paravirtualized interface that bypasses emulated hardware, dramatically improving disk and network I/O performance. Question 4. Which command converts a raw disk image to QCOW2 format? A) qemu-img convert - f raw - O qcow2 source.img dest.qcow B) qemu-img resize source.img +10G C) qemu-img create - f qcow2 dest.qcow2 20G D) qemu-img info source.img Answer: A Explanation: The qemu-img convert command changes the format; specifying input (-f raw) and output (-O qcow2) formats performs the conversion. Question 5. In libvirt, which XML element defines the amount of memory allocated to a guest? A) <vcpu> B) <memory> C) <disk> D) <interface> Answer: B Explanation: The <memory> element (in KiB) sets the guest's RAM size within the domain XML definition.
Answer: B Explanation: Containers use namespaces and cgroups to isolate processes while sharing the host kernel, unlike hardware VMs. Question 9. In a Xen environment, which domain has direct access to hardware devices? A) DomU B) Dom C) DomP D) DomA Answer: B Explanation: Dom0 is the privileged control domain that manages hardware, device drivers, and other guest domains (DomU). Question 10. Which tool allows you to edit a guest’s filesystem without booting the VM? A) virt-manager B) libguestfs C) virsh D) xl Answer: B Explanation: libguestfs provides utilities (e.g., guestmount) to access and modify a VM’s disk image while it is offline.
Question 11. What is the purpose of the virt-install option --disk path=...,size=20,format=qcow2? A) Create a 20 GB QCOW2 disk image for the new VM B) Attach an existing 20 GB raw disk C) Resize an existing QCOW2 disk to 20 GB D) Export the VM’s disk as QCOW Answer: A Explanation: The --disk argument defines a new storage volume; size=20 creates a 20 GB image, and format=qcow2 sets its format. Question 12. Which libvirt command lists all defined (but possibly shut down) virtual machines? A) virsh list --all B) virsh status C) virsh domains D) virsh pool-list Answer: A Explanation: virsh list --all shows both running and defined (inactive) domains. Question 13. In KVM, which option enables CPU pinning of a vCPU to a specific host core? A) - smp cpus= B) - cpu host C) - pinset 0- 3 D) - numa node,cpus=0- 1
A) ovs-vsctl add-br br B) ip link add name br0 type bridge C) ovs-ofctl add-br br D) brctl addbr br Answer: A Explanation: ovs-vsctl add-br is the OVS utility to create a virtual switch bridge. Question 17. In a KVM guest, which virtio device improves block I/O performance? A) virtio‑net B) virtio‑scsi C) virtio‑serial D) virtio‑gpu Answer: B Explanation: virtio‑scsi provides a high‑performance SCSI controller using the virtio framework, ideal for block devices. Question 18. Which command displays the current NUMA node topology of the host? A) lscpu --output=NUMA B) numactl --hardware C) virsh nodeinfo D) cat /proc/numa Answer: B
Explanation: numactl --hardware prints NUMA nodes, available CPUs, and memory per node. Question 19. What is the effect of enabling balloon memory in a KVM guest? A) Increases guest CPU frequency B) Allows dynamic adjustment of guest RAM at runtime C) Provides GPU acceleration D) Disables swap inside the guest Answer: B Explanation: Memory ballooning lets the host reclaim or allocate RAM to a running guest without a reboot. Question 20. Which libvirt feature integrates SELinux labeling for guest disks? A) sVirt B) AppArmor C) seccomp D) LSM Answer: A Explanation: sVirt extends SELinux to label VM processes and disk images, isolating guests from each other. Question 21. In Xen, what does the xl create command do? A) Starts the Xen hypervisor itself B) Boots a new domain from a configuration file
Question 24. Which of the following best describes a “bridge” in Linux networking for VMs? A) A NAT router that provides internet access B) A virtual switch that forwards frames between host and guest interfaces C) A firewall rule set for VM traffic D) A VPN tunnel for guest traffic Answer: B Explanation: A Linux bridge acts like a virtual Ethernet switch, connecting tap interfaces of VMs to the host’s physical NIC. Question 25. Which command shows the current CPU pinning configuration for a libvirt domain? A) virsh vcpuinfo virsh cpupin --current reports the host CPU cores each vCPU is pinned to. Question 26. What is the primary function of the virtio‑rng device? A) Provide high‑speed network throughput B) Supply a random number generator to the guest C) Accelerate graphics rendering
D) Enable USB pass‑through Answer: B Explanation: virtio‑rng exposes the host’s entropy source to the guest, improving cryptographic operations. Question 27. In an LXC container, which command creates a new container named myc1 from the Ubuntu image? A) lxc launch ubuntu myc B) lxc init ubuntu myc C) lxc create ubuntu myc D) lxc exec ubuntu myc Answer: B Explanation: lxc init creates a container from a specified image without starting it; lxc launch would start it immediately. Question 28. Which of the following is a valid reason to use PCI pass‑through (VFIO) with a VM? A) To share a GPU among multiple guests simultaneously B) To give a guest exclusive, near‑native access to a physical device C) To emulate a network card in software D) To enable live migration of the device Answer: B
C) CPU frequency scaling D) Network throughput Answer: B Explanation: dommemstat provides memory‑related metrics such as current usage, balloon size, and swap. Question 32. Which of the following is NOT a valid Xen domain type? A) PV B) HVM C) PVH D) VMDK Answer: D Explanation: VMDK is a virtual disk format, not a Xen domain type. Xen supports PV, HVM, and PVH. Question 33. In a KVM environment, which tool provides a graphical interface for managing VMs? A) virsh B) virt-manager C) xl D) qemu-img Answer: B
Explanation: virt-manager is a desktop GUI for creating, configuring, and monitoring KVM/libvirt guests. Question 34. Which libvirt command can be used to define (but not start) a new VM from an XML file? A) virsh create virsh define registers the domain XML with libvirt without booting the VM. Question 35. What is the default storage pool type created by libvirt on most distributions? A) iscsi B) dir C) logical D) rbd Answer: B Explanation: The dir pool type represents a directory on the host filesystem where disk images are stored. Question 36. Which of the following best describes “live migration” in virtualization? A) Moving a powered‑off VM’s disk files to another host B) Transferring a running VM’s memory and state to a different host without downtime
Question 39. Which libvirt feature allows limiting the maximum amount of CPU time a guest can consume? A) cgroup CPU quota via <cputune> element B) <memory> limit C) <disk> throttling D) <interface> bandwidth Answer: A Explanation: The <cputune> element can set period and quota to restrict CPU usage. Question 40. Which command lists all virtual bridges configured on a Linux host? A) virsh net-list --all B) brctl show C) ip link show type bridge D) ovs-vsctl list-br Answer: C Explanation: ip link show type bridge displays all network interfaces of the bridge type. Question 41. Which Xen toolstack command is used to list all running domains? A) xl list B) xl status C) xl domlist D) xl show
Answer: A Explanation: xl list provides a table of active domains with their IDs and states. Question 42. In KVM, which QEMU option enables CPU feature masking to hide host features from the guest? A) - cpu host B) - cpu core2duo,+sse3,-aes C) - cpu none D) - cpu max Answer: B Explanation: Using -cpu with a specific model and feature flags allows selective exposure or hiding of CPU capabilities. Question 43. Which of the following is a benefit of using the QCOW2 disk format? A) Fixed-size allocation only B) Built‑in snapshot support and thin provisioning C) Direct raw block access without conversion D) Mandatory encryption Answer: B Explanation: QCOW2 supports snapshots, compression, and dynamic (thin) allocation, saving storage space. Question 44. What does the virsh domiflist command display?
Answer: B Explanation: xenstore is a centralized repository used by Xen domains for configuration data and inter‑domain messaging. Question 47. Which command measures network throughput between a KVM guest and the host using netperf? A) netperf - H <host_ip> - t TCP_STREAM B) iperf3 - c <host_ip> C) ping - c 10 <host_ip> D) traceroute <host_ip> Answer: A Explanation: netperf with the TCP_STREAM test reports raw TCP bandwidth, suitable for virtualization performance testing. Question 48. What does the virt-sandbox tool provide? A) A full hypervisor replacement B) An isolated environment for running untrusted workloads using libvirt and containers C) Live migration of containers D) Automatic snapshot creation for VMs Answer: B Explanation: virt-sandbox creates lightweight, sandboxed containers managed via libvirt, enhancing security.
Question 49. Which of the following is the correct way to enable SELinux support for libvirt (sVirt) on a RHEL system? A) setsebool - P virt_use_sanctuary on B) setsebool - P virt_use_sandbox on C) setsebool - P virt_use_nfs on D) setsebool - P virt_use_fusefs on Answer: B Explanation: virt_use_sandbox allows libvirt to label and manage sandboxed containers/VMs under SELinux. Question 50. In KVM, which QEMU flag enables a USB tablet device to improve mouse pointer synchronization? A) - device usb-tablet B) - usb - device tablet C) - device virtio-tablet D) - input tablet Answer: A Explanation: -device usb-tablet provides absolute mouse positioning, eliminating pointer drift in graphical consoles. Question 51. Which libvirt command can be used to migrate a running VM to another host without downtime? A) virsh migrate --live