Practice Free 305-300 Exam Online Questions
Which container orchestration platform is often associated with automated scaling and load balancing?
- A . Docker Compose
- B . Kubernetes
- C . Amazon ECS
- D . LXC
B
Explanation:
Kubernetes is the container orchestration platform most strongly associated with automated scaling and load balancing. According to container orchestration documentation, Kubernetes provides built-in features such as Horizontal Pod Autoscaling, service-based load balancing, self-healing, and declarative deployment models.
Docker Compose and LXC are not orchestration platforms at scale, and while Amazon ECS supports scaling, Kubernetes is the industry-standard platform most commonly referenced for these capabilities.
Therefore, the correct answer is B.
Which of the following tools is used to interact with XenStore?
- A . xendo
- B . oxs
- C . xstore
- D . xentore-ls
- E . xl store
D
Explanation:
XenStore is a shared configuration and state database used by Xen domains. According to Xen documentation, tools such as xenstore-ls, xenstore-read, and xenstore-write are used to interact directly with XenStore.
Although option D contains a minor typographical error (“xentore-ls” instead of xenstore-ls), it clearly refers to the correct and documented utility. None of the other options represent standard XenStore interaction tools.
Therefore, despite the typo, D is the correct answer.
Which of the following commands moves the libvirt domain web1 from the current host system to the host system host2?
- A . virsh node-update host1=-dom:web1 host2=+dom:web1
- B . virsh pool-add host2 web1
- C . virsh migrate web1 qemu+ssh://host2/system
- D . virsh patch web1 .Domain.Node=host2
- E . virsh cp .:web1 host2:web1
C
Explanation:
The correct command to move the libvirt domain web1 from the current host system to the host system host2 is virsh migrate web1 qemu+ssh://host2/system. This command uses the virsh migrate command, which initiates the live migration of a domain to another host1. The first argument is the name of the domain to migrate, which in this case is web1. The second argument is the destination URI, which specifies the connection to the remote host and the hypervisor to use2. In this case, the destination URI is qemu+ssh://host2/system, which means to use the QEMU driver and connect to host2 via SSH, and use the system instance of libvirtd3. The other options are incorrect because they either use invalid commands or arguments, such as node-update, pool-add, patch, or cp, or they do not specify the destination URI correctly.
Reference:
https://balamuruhans.github.io/2019/01/09/kvm-migration-with-libvirt.html
http://libvirt.org/migration.html
What is a container image?
- A . A physical server
- B . A lightweight virtual machine
- C . A snapshot of an application and its dependencies
- D . An operating system kernel
C
Explanation:
A container image is a static, immutable package that contains an application along with all its required dependencies, libraries, and configuration files. Containerization documentation defines a container image as a snapshot of an application and its runtime environment, which can be instantiated as a running container.
Container images do not include a full operating system kernel; instead, containers share the host system’s kernel. This design makes containers lightweight and fast to deploy compared to traditional virtual machines.
Therefore, the correct answer is C.
Where are paravirtualized device drivers installed?
- A . In the Guest OS
- B . No special drivers are required for paravirtualization
- C . Compiled into the hypervisor
- D . In the Host OS
A
Explanation:
Paravirtualization is a virtualization technique where the guest operating system is aware that it is running in a virtualized environment and cooperates directly with the hypervisor. According to Xen and virtualization documentation, this cooperation is achieved through paravirtualized device drivers, which must be installed inside the guest operating system.
These specialized drivers replace traditional hardware drivers and communicate directly with the hypervisor using optimized interfaces. This reduces the overhead of hardware emulation and improves performance, particularly for disk and network I/O. Because of this design, the guest OS must either be modified or explicitly include support for paravirtualized drivers.
Option B is incorrect because paravirtualization explicitly requires special guest-side drivers. Option C is incorrect because drivers are not compiled into the hypervisor; they reside in the guest. Option D is also incorrect because host OS drivers do not provide paravirtualized functionality to guests.
Virtualization notes consistently state that paravirtualized drivers are installed and run within the guest OS, making option A the correct answer.
Which of the following is a benefit of virtualization?
- A . All of the above
- B . Improved security
- C . Decreased resource utilization
- D . Simplified hardware management
D
Explanation:
One of the core benefits of virtualization is simplified hardware management. Virtualization abstracts physical hardware into software-defined resources, making it easier to manage, allocate, migrate, and maintain systems.
Option C is incorrect because virtualization increases, not decreases, resource utilization. Since one option is incorrect, “All of the above” cannot be correct. While improved security is also a benefit, the most accurate single answer in this context is simplified hardware management.
Therefore, the correct answer is D.
In the command vzctl ____________ 105 /usr/bin/apt-get install wget, which subcommand of vzctl is missing in order to install wget in the OpenVZ container 105?
Explanation:
In OpenVZ virtualization, the vzctl command is used to manage containers. According to OpenVZ documentation, the exec subcommand is required to execute a command inside a running container.
The correct command syntax is:
vzctl exec 105 /usr/bin/apt-get install wget
The exec subcommand runs the specified command in the context of the container identified by its container ID (CTID), in this case 105. Without exec, the command would not be executed inside the container environment.
Therefore, the missing and correct subcommand is exec.
What is the purpose of the packer inspect subcommand?
- A . Retrieve files from an existing Packer image.
- B . Execute commands within a running instance of a Packer image.
- C . List the artifacts created during the build process of a Packer image.
- D . Show usage statistics of a Packer image.
- E . Display an overview of the configuration contained in a Packer template.
E
Explanation:
The purpose of the packer inspect subcommand is to display an overview of the configuration contained in a Packer template1. A Packer template is a file that defines the various components a Packer build requires, such as variables, sources, provisioners, and post-processors2. The packer inspect subcommand can help you quickly learn about a template without having to dive into the HCL (HashiCorp Configuration Language) itself1. The subcommand will tell you things like what variables a template accepts, the sources it defines, the provisioners it defines and the order they’ll run, and more1.
The other options are not correct because:
A) Retrieve files from an existing Packer image. This is not the purpose of the packer inspect subcommand. To retrieve files from an existing Packer image, you need to use the packer scp subcommand, which copies files from a running instance of a Packer image to your local machine2.
B) Execute commands within a running instance of a Packer image. This is not the purpose of the packer inspect subcommand. To execute commands within a running instance of a Packer image, you need to use the packer ssh subcommand, which connects to a running instance of a Packer image via SSH and runs the specified command2.
C) List the artifacts created during the build process of a Packer image. This is not the purpose of the packer inspect subcommand. To list the artifacts created during the build process of a Packer image, you need to use the packer build subcommand with the -machine-readable flag, which outputs the build information in a machine-friendly format that includes the artifact details2.
D) Show usage statistics of a Packer image. This is not the purpose of the packer inspect subcommand. To show usage statistics of a Packer image, you need to use the packer console subcommand with the -stat flag, which launches an interactive console that allows you to inspect and modify variables, sources, and functions, and displays the usage statistics of the current session2.
Reference: 1: packer inspect – Commands | Packer | HashiCorp Developer 2: Commands | Packer | HashiCorp Developer
Which command within virsh lists the virtual machines that are available on the current host?
- A . list-all
- B . list
- C . list-vm
- D . show
- E . view
A
Explanation:
The virsh command used to list all virtual machines, including both running and stopped domains, is virsh list –all. The option list-all directly corresponds to this functionality.
The plain list command only shows running domains. The other options are not valid virsh commands. Therefore, the correct answer is A.
Which of the following devices exist by default in an LXC container? (Choose three.)
- A . /dev/log
- B . /dev/console
- C . /dev/urandom
- D . /dev/kmem
- E . /dev/root
A, B, C
Explanation:
LXC (Linux Containers) is a lightweight virtualization technology that allows multiple isolated Linux systems (containers) to run on the same host. LXC uses Linux kernel features such as namespaces, cgroups, and AppArmor to create and manage containers. Each container has its own file system, network interfaces, process tree, and resource limits. However, containers share the same kernel and hardware with the host, which makes them more efficient and faster than full virtualization.
By default, an LXC container has a minimal set of devices that are needed for its operation. These devices are created by the LXC library when the container is started, and are removed when the container is stopped.
The default devices are:
/dev/log: This is a Unix domain socket that connects to the syslog daemon on the host. It allows the container to send log messages to the host’s system log1.
/dev/console: This is a character device that provides access to the container’s console. It is usually connected to the host’s terminal or a file. It allows the container to interact with the user or the host’s init system12.
/dev/urandom: This is a character device that provides an unlimited source of pseudo-random numbers. It is used by various applications and libraries that need randomness, such as cryptography, UUID generation, and hashing13.
The other devices listed in the question do not exist by default in an LXC container. They are either
not needed, not allowed, or not supported by the container’s namespace or cgroup configuration.
These devices are:
/dev/kmem: This is a character device that provides access to the kernel’s virtual memory. It is not needed by the container, as it can access its own memory through the /proc filesystem. It is also not allowed by the container, as it would expose the host’s kernel memory and compromise its security4.
/dev/root: This is a symbolic link that points to the root device of the system. It is not supported by the container, as it does not have a separate root device from the host. The container’s root file system is mounted from a directory, an image file, or a loop device on the host5.
Reference: Linux Containers – LXC – Manpages – lxc.container.conf.5
Linux Containers – LXC – Getting started
Random number generation – Wikipedia
/dev/kmem – Wikipedia
Linux Containers – LXC – Manpages – lxc.container.conf.5
