
Lpi 305-300 Dumps Updated Mar 21, 2024 WIith 62 Questions
View All 305-300 Actual Free Exam Questions Mar 21, 2024 Updated
NEW QUESTION # 14
Which of the following values are valid in thefirmwareattribute of a<os>element in a libvirt domain definition?(Choose two.)
- A. efi
- B. bios
- C. pcie
- D. virtio
- E. scsi
Answer: A,B
Explanation:
Explanation
The firmware attribute of the <os> element in a libvirt domain definition specifies the type of firmware used to boot the virtual machine. The valid values for this attribute are efi and bios, which correspond to the Extensible Firmware Interface (EFI) and the Basic Input/Output System (BIOS) respectively. EFI is a newer standard that supports more features and security than BIOS, such as Secure Boot and faster boot times. BIOS is an older standard that is widely compatible and supported by most hypervisors and operating systems. The other values, scsi, virtio, and pcie, are not related to firmware, but to different types of devices or drivers that can be used in a virtual machine. References: 1 (search for firmware enum)
NEW QUESTION # 15
Which of the following commands moves the libvirt domainweb1from the current host system to the host systemhost2?
- A. virsh migrate web1 qemu+ssh://host2/system
- B. virsh patch web1 .Domain.Node=host2
- C. virsh pool-add host2 web1
- D. virsh node-update host1=-dom:web1 host2=+dom:web1
- E. virsh cp .:web1 host2:web1
Answer: A
Explanation:
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.
References:
https://balamuruhans.github.io/2019/01/09/kvm-migration-with-libvirt.html
http://libvirt.org/migration.html
NEW QUESTION # 16
How does Packer interact with system images?
- A. Packer creates an instance based on a source image, prepares the instance through a network connection and bundles the resulting instance as a new system image.
- B. Packer periodically connects through the network to the Packer daemons of all running Packer images in order to re-apply the whole template to the running instance.
- C. Packer installs a client within the image which has to be run periodically via cron in order to retrieve the latest template from the Packer server and apply it locally.
- D. Packer downloads and extracts an image in order to make changes to the image's file system, repack the modified image and upload it again.
- E. Packer has to be installed within the target image and is executed during the image's first boot in order to execute preparation tasks.
Answer: A
Explanation:
Explanation
Packer is a tool that automates the creation of identical machine images for multiple platforms from a single source configuration. Packer works by creating an instance based on a source image, which is a pre-existing image that serves as a starting point. Packer then connects to the instance through a network connection, such as SSH or WinRM, and runs various commands and scripts to install and configure software within the instance. Packer then shuts down the instance and creates a new system image from it, which can be used to launch new instances. Packer supports many platforms, such as AWS, Azure, VMware, Docker, and others.
Packer does not install any software or run any daemon within the target image, nor does it periodically connect to the running instances to re-apply the template. Packer also does not modify the source image directly, but creates a new image from the modified instance. References:
* Packer by HashiCorp
* HashiCorp Packer - Build Automated Machine Images
* Introduction | Packer | HashiCorp Developer
NEW QUESTION # 17
A clone of a previously used virtual machine should be created. All VM specific information, such as user accounts, shell histories and SSH host keys should be removed from the cloned disk image. Which of the following tools can perform these tasks?
- A. virt-svspre
- B. sysprep
- C. vire-wipe
- D. virc-reset
- E. virt-sparsi
- F. virt-rescue
Answer: B
Explanation:
Explanation
Sysprep is a tool that removes all your personal account and security information, and then prepares the machine to be used as an image. It is supported by Windows and some Linux distributions. It can also remove drivers and other machine-specific settings. Sysprep is required when creating a managed image outside of a gallery in Azure
https://learn.microsoft.com/en-us/azure/virtual-machines/generalize
NEW QUESTION # 18
A clone of a previously used virtual machine should be created. All VM specific information, such as user accounts, shell histories and SSH host keys should be removed from the cloned disk image. Which of the following tools can perform these tasks?
- A. virt-svspre
- B. sysprep
- C. vire-wipe
- D. virc-reset
- E. virt-sparsi
- F. virt-rescue
Answer: A
NEW QUESTION # 19
What happens when the following command is executed twice in succession?
docker run -tid -v data:/data debian bash
- A. The original content of the container image data is available in both containers, although changes stay local within each container.
- B. Both containers share the contents of the data volume, have full permissions to alter its content and mutually see their respective changes.
- C. Each container is equipped with its own independent data volume, available at /data/ in the respective container.
- D. The second command invocation fails with an error stating that the volume data is already associated with a running container.
- E. The container resulting from the second invocation can only read the content of /data/ and cannot change it.
Answer: B
Explanation:
Explanation
The command docker run -tid -v data:/data debian bash creates and runs a new container from the debian image, with an interactive terminal and a detached mode, and mounts a named volume data at /data in the container12. If the volume data does not exist, it is created automatically3. If the command is executed twice in succession, two containers are created and run, each with its own terminal and process ID, but they share the same volume data. This means that both containers can access, modify, and see the contents of the data volume, and any changes made by one container are reflected in the other container. Therefore, the statement C is true and the correct answer. The statements A, B, D, and E are false and incorrect, as they do not describe the behavior of the command or the volume correctly. References:
* 1: docker run | Docker Docs.
* 2: Docker run reference | Docker Docs - Docker Documentation.
* 3: Use volumes | Docker Documentation.
* [4]: How to Use Docker Run Command with Examples - phoenixNAP.
NEW QUESTION # 20
Which of the following statements are true regarding a Pod in Kubernetes? (Choose two.)
- A. A Pod is the smallest unit of workload Kubernetes can run.
- B. All containers of a Pod run on the same node.
- C. When a Pod fails, Kubernetes restarts the Pod on another node by default.
- D. systemd is used to manage individual Pods on the Kubernetes nodes.
- E. Pods are always created automatically and cannot be explicitly configured.
Answer: A,B
NEW QUESTION # 21
Which of the following mechanisms are used by LXC and Docker to create containers? (Choose three.)
- A. Control Groups
- B. File System Permissions
- C. POSIXACLs
- D. Kernel Namespaces
- E. Linux Capabilities
Answer: A,D,E
NEW QUESTION # 22
Which of the following are true regarding the CPU of a QEMU virtual machine? (Choose two.)
- A. Each QEMU virtual machine can only have one CPU with one core.
- B. QEMU uses the concept of virtual CPUs to map the virtual machines to physical CPUs.
- C. For each QEMU virtual machine, one dedicated physical CPU core must be reserved.
- D. QEMU virtual machines support multiple virtual CPUs in order to run SMP systems.
- E. The CPU architecture of a QEMU virtual machine is independent of the host system's architecture.
Answer: D,E
NEW QUESTION # 23
Which of the following statements in aDockerfileleads to a container which outputs hello world? (Choose two.)
- A. ENTRYPOINT "echo Hello World"
- B. ENTRYPOINT [ "echo hello world" ]
- C. ENTRYPOINT "echo", "Hello", "World*
- D. ENTRYPOINT echo Hello World
- E. ENTRYPOINT [ "echo", "hello", "world" ]
Answer: B,E
NEW QUESTION # 24
Which of the following statements are true regarding a Pod in Kubernetes? (Choose two.)
- A. A Pod is the smallest unit of workload Kubernetes can run.
- B. All containers of a Pod run on the same node.
- C. When a Pod fails, Kubernetes restarts the Pod on another node by default.
- D. systemd is used to manage individual Pods on the Kubernetes nodes.
- E. Pods are always created automatically and cannot be explicitly configured.
Answer: A,B
Explanation:
Explanation
A Pod in Kubernetes is a collection of one or more containers that share the same network and storage resources, and a specification for how to run the containers. A Pod is the smallest unit of workload Kubernetes can run, meaning that it cannot be divided into smaller units. Therefore, option C is correct. All containers of a Pod run on the same node, which is the smallest unit of computing hardware in Kubernetes. A node is a physical or virtual machine that hosts one or more Pods. Therefore, option A is also correct. Pods are not always created automatically and cannot be explicitly configured. Pods can be created manually using YAML or JSON files, or using commands like kubectl run or kubectl create. Pods can also be created automatically by higher-level controllers, such as Deployment, ReplicaSet, or StatefulSet. Therefore, option B is incorrect.
When a Pod fails, Kubernetes does not restart the Pod on another node by default. Pods are ephemeral by nature, meaning that they can be terminated or deleted at any time. If a Pod is managed by a controller, the controller will create a new Pod to replace the failed one, but it may not be on the same node. Therefore, option D is incorrect. systemd is not used to manage individual Pods on the Kubernetes nodes. systemd is a system and service manager for Linux operating systems that can start and stop services, such as docker or kubelet. However, systemd does not interact with Podsdirectly. Pods are managed by the kubelet service, which is an agent that runs on each node and communicates with the Kubernetes control plane. Therefore, option E is incorrect. References:
* Pods | Kubernetes
* What is a Kubernetes pod? - Red Hat
* What's the difference between a pod, a cluster, and a container?
* What are Kubernetes Pods? | VMware Glossary
* Kubernetes Node Vs. Pod Vs.Cluster: Key Differences - CloudZero
NEW QUESTION # 25
What kind of virtualization is implemented by LXC?
- A. CPU emulation
- B. Paravirtualization
- C. System containers
- D. Hardware containers
- E. Application containers
Answer: C
NEW QUESTION # 26
Which of the following values are valid in thefirmwareattribute of a<os>element in a libvirt domain definition? (Choose two.)
- A. efi
- B. bios
- C. pcie
- D. virtio
- E. scsi
Answer: A,B
NEW QUESTION # 27
Which file in acgroupdirectory contains the list of processes belonging to thiscgroup?
- A. subjects
- B. members
- C. procs
- D. casks
- E. pids
Answer: C
Explanation:
Explanation
The file procs in a cgroup directory contains the list of processes belonging to this cgroup. Each line in the file shows the PID of a process that is a member of the cgroup. A process can be moved to a cgroup by writing its PID into the cgroup's procs file. For example, to move the process with PID 24982 to the cgroup cg1, the following command can be used: echo 24982 > /sys/fs/cgroup/cg1/procs1. The file procs is different from the file tasks, which lists the threads belonging to the cgroup. The file procs can be used to move all threads in a thread group at once, while the file tasks can be used to move individual threads2. References:
* Creating and organizing cgroups cgroup2 - GitHub Pages
* Control Groups - The Linux Kernel documentation
NEW QUESTION # 28
Which of the following statements are true about container-based virtualization? (Choose two.)
- A. Each container runs its own operating system kernel.
- B. All containers run within the operating system kernel of the host system.
- C. Container-based virtualization relies on hardware support from the host system's CPU.
- D. Different containers may use different distributions of the same operating system.
- E. Linux does not support container-based virtualization because of missingkernel APIs.
Answer: B,D
NEW QUESTION # 29
FILL BLANK
What LXC command starts a new process within a running LXC container? (Specify ONLY the command without any path or parameters.)
Answer:
Explanation:
lxc-attach
Explanation
The lxc-attach command allows the user to start a new process within a running LXC container12. It takes the name of the container as an argument and optionally a command to execute inside the container. If no command is specified, it creates a new shell inside the container1. For example, to list all the files in the home directory of a container named myContainer, one can use:
lxc-attach -n myContainer - ls -lh /home
References:
* 1: Executing a command inside a running LXC - Unix & Linux Stack Exchange
NEW QUESTION # 30
Which of the following statements is true regarding networking with libvirt?
- A. Libvirt's network functionality is limited to connectingvirtual machines to a physical network interface of the host system.
- B. Libvirt supports exactly one virtual network and connects all virtual machines to it.
- C. Libvirt requires a dedicated network interface that may not be used by the host system.
- D. Libvirt networks appear, by default, as standard Linux bridges in the host system.
- E. Libvirt assiqns the same MAC address to all virtual machines and isolates their network interfaces at the link layer.
Answer: D
NEW QUESTION # 31
In order to use the optiondom0_memto limit the amount of memory assigned to the Xen Domain-0, where must this option be specified?
- A. In any of Xen's global configuration files.
- B. In its .config file, when the Domain-0 kernel is built.
- C. In its Makefile, when Xen is built.
- D. In the bootloader configuration, when Xen is booted.
- E. In the configuration file /etc/xen/Domain-0.cfg, when Xen starts.
Answer: D
Explanation:
Explanation
The option dom0_mem is used to set the initial and maximum memory size of the Domain-0, which is the privileged domain that starts first and manages the unprivileged domains (DomU) in Xen. The option dom0_mem must be specified in the bootloader configuration, such as GRUB or GRUB2, when Xen is booted.
This ensures that the Domain-0 kernel can allocate memory for storing memory metadata and network related parameters based on the boot time amount of memory. If the option dom0_mem is not specified in the bootloader configuration, the Domain-0 will use all the available memory on the host system by default, which may cause performance and security issues. References:
* Managing Xen Dom0s CPU and Memory
* Xen Project Best Practices
* Dom0 Memory - Where It Has Not Gone
NEW QUESTION # 32
Which directory is used bycloud-initto store status information and configuration information retrieved from external sources?
- A. /etc/cloud-init/cache/
- B. /proc/sys/cloud/
- C. /opt/cloud/var/
- D. /var/lib/cloud/
- E. /tmp/.cloud/
Answer: D
Explanation:
Explanation
cloud-init uses the /var/lib/cloud/ directory to store status information and configuration information retrieved from external sources, such as the cloud platform'smetadata service or user data files. The directory contains subdirectories for different types of data, such as instance, data, handlers, scripts, and sem. The instance subdirectory contains information specific to the current instance, such as the instance ID, the user data, and the cloud-init configuration. The data subdirectory contains information about the data sources that cloud-init detected and used. The handlers subdirectory contains information about the handlers that cloud-init executed.
The scripts subdirectory contains scripts that cloud-init runs at different stages of the boot process, such as per-instance, per-boot, per-once, and vendor. The sem subdirectory contains semaphore files that cloud-init uses to track the execution status of different modules and stages. References:
* Configuring and managing cloud-init for RHEL 8 - Red Hat Customer Portal
* vsphere - what is the linux file location where the cloud-init user ...
NEW QUESTION # 33
......
New 305-300 Exam Questions Real Lpi Dumps: https://passleader.bootcamppdf.com/305-300-exam-actual-tests.html