Skip to content

305-300 Practice Questions

Prepare for 305-300 with more than an answer.

233 questions in the full set20 sample questionsUpdated Jan 26, 2026
Exam fee
$340 USD
Level
Expert
Valid for
5 years
Domains covered on the exam 3
  1. Full Virtualization41.67%
  2. Container Virtualization41.67%
  3. VM Deployment and Provisioning13.33%
  1. 1

    A Docker container running a web application is unexpectedly slow. You suspect the container is being throttled on disk I/O. Which command would you use to view real-time block I/O statistics for all running containers?

    Show answer details

    Correct answer: D

    The docker stats command provides a live stream of resource usage statistics for running containers. This includes CPU usage, memory usage, network I/O, and crucially for this scenario, block I/O (disk reads and writes). This allows an administrator to quickly identify if a container is performing an excessive amount of disk activity. docker top shows processes inside a container, docker events shows daemon events, and docker system df shows overall disk usage by Docker objects.

  2. 2

    True or False: In a Xen environment, a Hardware-assisted Virtual Machine (HVM) guest requires a specially modified kernel to run, while a Para-Virtualized (PV) guest can run an unmodified operating system.

    Show answer details

    Correct answer: B

    False. The statement reverses the concepts. A Para-Virtualized (PV) guest has a modified kernel that is aware it is being virtualized, allowing it to communicate directly with the hypervisor for better performance in some cases. A Hardware-assisted Virtual Machine (HVM) guest uses CPU virtualization extensions (like Intel VT-x or AMD-V) to run a completely unmodified operating system, as the hardware provides the necessary abstraction.

  3. 3

    An administrator is launching a QEMU/KVM virtual machine directly from the command line. They want to enable the QEMU Guest Agent for this VM, which is connected via a virtio-serial port. Which command-line argument should be added to the qemu-system-x86_64 command?

    Show answer details

    Correct answer: A

    To enable the QEMU Guest Agent, you need a three-part configuration. First, -device virtio-serial-pci adds the virtio serial device to the VM. Second, -chardev socket,... creates a character device on the host, in this case a Unix socket. Third, -device virtserialport,... connects the virtio serial device inside the VM to the character device on the host. This combination establishes the communication channel for the guest agent. The other options are incomplete or use incorrect device names.

  4. 4

    A developer needs to create a Docker container for a Python application that will run in a production environment with strict memory constraints. Which of the following should be configured to prevent the container from consuming excessive system resources? (Select TWO)

    Show answer details

    Correct answer: A, C

    Docker uses kernel cgroups to enforce resource limits. The --memory (or -m) flag sets a hard limit on the amount of RAM the container can use. To prevent the container from using swap space when it hits its memory limit (which can lead to performance degradation), you should set --memory-swap to the same value as --memory. This effectively disables swapping for the container. ulimit sets limits per-process, not for the entire container cgroup, and --shm-size relates to shared memory, not main RAM usage.

  5. 5

    A cloud engineer is deploying a new VM instance using an image that supports cloud-init. They need to configure a new user, install specific packages, and write a configuration file on the first boot. Which of the following cloud-config user-data snippets correctly demonstrates how to create a user named appadmin, install nginx and htop, and write a simple index.html file?

    graph TD A[Start Instance] --> B{Read User-Data} B --> C[Create User 'appadmin'] B --> D[Install Packages] B --> E[Write Files] C --> F[Instance Ready] D --> F E --> F

    Show answer details

    Correct answer: A

    The correct cloud-config syntax, which starts with the #cloud-config shebang, uses declarative, top-level keys like users, packages, and write_files. This option correctly uses a list for the users module to define the new user and their sudo privileges, a list for the packages module to specify packages for installation, and the write_files module to create a file with specified content.

  6. 6

    A DevOps team is experiencing inconsistent application behavior in KVM guests running on a NUMA-based host. Performance analysis indicates that VMs are frequently accessing memory from remote NUMA nodes, causing high latency. Which virsh subcommand should be used to inspect the current NUMA configuration and CPU pinning for a running domain named app-vm1?

    Show answer details

    Correct answer: C

    The virsh numatune command is specifically designed to display and modify NUMA parameters for a running virtual machine. This command provides details on memory node binding and vCPU to physical CPU pinning, which is essential for diagnosing and resolving NUMA-related performance issues. vcpuinfo shows vCPU state but not pinning, nodeinfo shows host NUMA details but not the VM's configuration, and memtune controls overall memory limits, not NUMA placement.

  7. 7

    An administrator is building a minimal, secure Docker image for a Go application. To reduce the attack surface and image size, they are using a multi-stage build. Which of the following are key benefits of this approach? (Select TWO)

    Show answer details

    Correct answer: A, D

    Multi-stage builds allow you to use one stage with a full SDK to build the application (e.g., golang:1.19) and a subsequent stage to copy only the compiled binary into a minimal base image (e.g., scratch or alpine). This ensures that build-time dependencies, compilers, and source code are not present in the final image, dramatically reducing its size and attack surface. It does not automatically handle image signing or affect the build cache in the described manner.

  8. 8

    A system administrator needs to convert a VMware VMDK disk image (source.vmdk) to a QCOW2 format for use with KVM, while also enabling compression and preallocating all metadata to improve performance. Which qemu-img convert command achieves this?

    Show answer details

    Correct answer: B

    The correct command is qemu-img convert -f vmdk -O qcow2 -c -o preallocation=metadata source.vmdk target.qcow2. The -f flag specifies the source format, -O specifies the output format. The -c flag is the shorthand for enabling qcow2 compression. The -o flag is used for format-specific options, and preallocation=metadata tells qemu-img to create a non-sparse image where only the metadata is preallocated, which can improve performance by avoiding metadata fragmentation.

  9. 9

    You are tasked with setting up a highly available LXD cluster for running critical system containers. During the initialization of the second cluster node, you are prompted for the address of an existing cluster member. After providing the address and the trust password, the join process fails with a network timeout. The nodes are on the same subnet, and basic ping tests between them are successful. What is the most likely cause of this failure?

    Show answer details

    Correct answer: B

    LXD clustering relies on communication over TCP port 8443 for its API and internal raft consensus protocol. While ICMP (ping) may be allowed, a common security practice is to block most incoming ports by default. A network timeout during the join process, despite successful ping tests, strongly indicates that a firewall is blocking the specific port LXD requires for cluster communication. Storage pool names being different or NTP issues would typically result in different error messages after the initial connection is established.

  10. 10

    True or False: When using the libvirt provider in Vagrant, the Vagrantfile must explicitly define a private network for the VM to be accessible from the host, as no default NAT network is created automatically.

    Show answer details

    Correct answer: B

    False. By default, the vagrant-libvirt provider will attempt to connect the VM to libvirt's 'default' virtual network, which is typically a NAT-based network. This allows the VM to access the external network and provides a DHCP-assigned IP address. While defining a private network (config.vm.network "private_network") is a common practice for stable host-to-guest communication, it is not strictly required for the VM to get network connectivity upon creation.

Create an account to continue.