[UPDATED] Lpi 305-300 Certification Exam Questions [Q30-Q55]

Share

[UPDATED] Lpi 305-300 Certification Exam Questions

Quickly and Easily Pass Lpi Exam with 305-300 real Dumps

NEW QUESTION # 30
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. Linux does not support container-based virtualization because of missingkernel APIs.
  • D. Container-based virtualization relies on hardware support from the host system's CPU.
  • E. Different containers may use different distributions of the same operating system.

Answer: B,E


NEW QUESTION # 31
What is the purpose of a .dockerignore file?

  • A. It specifies files that Docker does not submit to the Docker daemon when building a Docker image
  • B. It exists in the root file system of containers that should ignore volumes and ports provided by Docker.
  • C. It lists files existing in a Docker image which should be excluded when building a derivative image.
  • D. It specifies which parts of a Dockerfile should be ignored when building a Docker image.
  • E. It must be placed in the top level directory of volumes that Docker should never attach automatically to a container

Answer: A


NEW QUESTION # 32
What kind of virtualization is implemented by LXC?

  • A. System containers
  • B. Hardware containers
  • C. CPU emulation
  • D. Application containers
  • E. Paravirtualization

Answer: A

Explanation:
Explanation
LXC implements system containers, which are a type of operating-system-level virtualization. System containers allow running multiple isolated Linux systems on a single Linux control host, using a single Linux kernel. System containers share the same kernel with the host and each other, but have their own file system, libraries, andprocesses. System containers are different from application containers, which are designed to run a single application or service in an isolated environment. Application containers are usually smaller and more portable than system containers, but also more dependent on the host kernel and libraries. Hardware containers, CPU emulation, and paravirtualization are not related to LXC, as they are different kinds of virtualization methods that involve hardware abstraction, instruction translation, or modification of the guest operating system. References:
* 1: LXC - Wikipedia
* 2: Linux Virtualization : Linux Containers (lxc) - GeeksforGeeks
* 3: Features - Proxmox Virtual Environment


NEW QUESTION # 33
What is the purpose of the packer inspect subcommand?

  • A. Execute commands within a running instance of a Packer image.
  • B. Show usage statistics of a Packer image.
  • C. Display an overview of the configuration contained in a Packer template.
  • D. List the artifacts created during the build process of a Packer image.
  • E. Retrieve files from an existing Packer image.

Answer: C


NEW QUESTION # 34
FILL BLANK
Which subcommand ofvirshopens the XML configuration of a virtual network in an editor in order to make changes to that configuration? (Specify ONLY the subcommand without any parameters.)

Answer:

Explanation:
net-edit


NEW QUESTION # 35
What is the purpose ofcloud-init?

  • A. Orchestrate the creation and start of multiple related laaS instances.
  • B. Standardize the configuration of infrastructure services, such as load balancers or virtual firewalls in a cloud.
  • C. Prepare the generic image of an laaS instance to fit a specific instance's configuration.
  • D. Assign an laaS instance to a specific computing node within a cloud.
  • E. Replace common Linux inic systems, such as systemd or SysV init.

Answer: C

Explanation:
Explanation
Cloud-init is a tool that processes configurations and runs through five stages during the initial boot of Linux VMs in a cloud. It allows users to customize a Linux VM as it boots for the first time, by applying user data to the instance. User data can include scripts, commands, packages, files, users, groups, SSH keys, and more.
Cloud-init can also interact with various cloud platforms and services, such as Azure, AWS, OpenStack, and others. The purpose of cloud-init is to prepare the generic image of an laaS instance to fit a specific instance's configuration, such as hostname, network, security, and application settings. References:
* Cloud-init - The standard for customising cloud instances
* Understanding cloud-init - Azure Virtual Machines
* Tutorial - Customize a Linux VM with cloud-init in Azure - Azure Virtual Machines


NEW QUESTION # 36
Which of the following network interface types are valid in an LXD container configuration? (Choose three.)

  • A. wifi
  • B. physical
  • C. macvlan
  • D. ipsec
  • E. bridged

Answer: B,C,E

Explanation:
Explanation
LXD supports the following network interface types in an LXD container configuration1:
* macvlan: Creates a virtual interface on the host with a unique MAC address and attaches it to an existing physical interface. This allows the container to have direct access to the physical network, but prevents communication with the host and other containers on the same host2.
* bridged: Connects the container to an existing bridge interface on the host. This allows the container to communicate with the host and other containers on the same bridge, as well as the external network if the bridge is connected to a physical interface3.
* physical: Passes an existing physical interface on the host to the container. This allows the container to have exclusive access to the physical network, but removes the interface from the host4.
The other network interface types, ipsec and wifi, are not valid in an LXD container configuration. Ipsec is a protocol for secure communication over IP networks, not a network interface type. Wifi is a wireless technology for connecting devices to a network, not a network interface type. References:
* About networking - Canonical LXD documentation
* Macvlan network - Canonical LXD documentation
* Bridge network - Canonical LXD documentation
* Physical network - Canonical LXD documentation


NEW QUESTION # 37
How does Packer interact with system images?

  • A. 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.
  • 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 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.
  • 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: D


NEW QUESTION # 38
What is true aboutcontainerd?

  • A. It is a text file format defining the build process of containers.
  • B. It runs in each Docker container and provides DHCP client functionality
  • C. It requires the Docker engine and Docker CLI to be installed.
  • D. It uses rune to start containers on a container host.
  • E. It is the initial process run at the start of any Docker container.

Answer: D


NEW QUESTION # 39
FILL BLANK
What LXC command lists containers sorted by their CPU, block I/O or memory consumption? (Specify ONLY the command without any path or parameters.)

Answer:

Explanation:
lxc-top
Explanation
LXD supports the following network interface types for containers: macvlan, bridged, physical, sriov, and ovn1. Macvlan creates a virtual interface on the host that is connected to the same network as the parent interface2. Bridged connects the container to a network bridge that acts as a virtual switch3. Physical attaches the container to a physical network interface on the host2. Ipsec and wifi are not valid network interface types for LXD containers. References:
* 1: Bridge network - Canonical LXD documentation
* 2: How to create a network - Canonical LXD documentation
* 4: LXD containers and networking with static IP - Super User


NEW QUESTION # 40
After setting up a data container using the following command:
docker create -v /data --name datastore debian /bin/true
how is an additional new container started which shares the/datavolume with the datastore container?

  • A. docker run --share-with datastore --name service debian bash
  • B. docker run -v datastore:/data --name service debian bash
  • C. docker run --volumes-from datastore --name service debian bash
  • D. docker run -v /data --name service debian bash
  • E. docker run --volume-backend datastore -v /data --name service debian bash

Answer: C

Explanation:
Explanation
The correct way to start a new container that shares the /data volume with the datastore container is to use the
--volumes-from flag. This flag mounts all the defined volumes from the referenced containers. In this case, the datastore container has a volume named /data, which is mounted in the service container at the same path. The other options are incorrect because they either use invalid flags, such as --share-with or --volume-backend, or they create new volumes instead of sharing the existing one, such as -v datastore:/data or -v /data. References:
* Docker Docs - Volumes
* Stack Overflow - How to map volume paths using Docker's --volumes-from?
* Docker Docs - docker run


NEW QUESTION # 41
FILL BLANK
Which subcommand ofvirshopens the XML configuration of a virtual network in an editor in order to make changes to that configuration? (Specify ONLY the subcommand without any parameters.)

Answer:

Explanation:
net-edit
Explanation
The subcommand of virsh that opens the XML configuration of a virtual network in an editor in order to make changes to that configuration is net-edit1. This subcommand takes the name or UUID of the network as a parameter and opens the network XML file in the default editor, which is specified by the $EDITOR shell variable1. The changes made to the network configuration are applied immediately after saving and exiting the editor1.
References:
* 1: net-edit - libvirt.


NEW QUESTION # 42
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


NEW QUESTION # 43
What does IaaS stand for?

  • A. Instances as a Service
  • B. Integration as a Service
  • C. Intelligence as a Service
  • D. Infrastructure as a Service
  • E. Information as a Service

Answer: D


NEW QUESTION # 44
Which of the following mechanisms are used by LXC and Docker to create containers? (Choose three.)

  • A. Kernel Namespaces
  • B. Linux Capabilities
  • C. File System Permissions
  • D. Control Groups
  • E. POSIXACLs

Answer: A,B,D

Explanation:
Explanation
LXC and Docker are both container technologies that use Linux kernel features to create isolated environments for running applications. The main mechanisms that they use are:
* Linux Capabilities: These are a set of privileges that can be assigned to processes to limit their access to certain system resources or operations. For example, a process with the CAP_NET_ADMIN capability can perform network administration tasks, such as creating or deleting network interfaces. Linux
* capabilities allow containers to run with reduced privileges, enhancing their security and isolation.
* Kernel Namespaces: These are a way of creating separate views of the system resources for different processes. For example, a process in a mount namespace can have a different file system layout than the host or other namespaces. Kernel namespaces allow containers to have their own network interfaces, process IDs, user IDs, and other resources, without interfering with the host or other containers.
* Control Groups: These are a way of grouping processes and applying resource limits and accounting to them. For example, a control group can limit the amount of CPU, memory, disk I/O, or network bandwidth that a process or a group of processes can use. Control groups allow containers to have a fair share of the system resources and prevent them from exhausting the host resources.
POSIX ACLs and file system permissions are not mechanisms used by LXC and Docker to create containers.
They are methods of controlling the access to files and directories on a file system, which can be applied to any process, not just containers.
References:
* LXC vs Docker: Which Container Platform Is Right for You?
* LXC vs Docker: Why Docker is Better in 2023 | UpGuard
* What is the Difference Between LXC, LXD and Docker Containers
* lxc - Which container implementation docker is using - Unix & Linux Stack Exchange


NEW QUESTION # 45
Which of the following resources can be limited by libvirt for a KVM domain? (Choose two.)

  • A. Number of available files
  • B. Amount of CPU lime
  • C. Number of running processes
  • D. File systems allowed in the domain
  • E. Size of available memory

Answer: B,E


NEW QUESTION # 46
Which command within virsh lists the virtual machines that are running on the current host?

  • A. list-vm
  • B. I view
  • C. list
  • D. list-all
  • E. show

Answer: C

Explanation:
Explanation
The command virsh list is used to list all running domains (VMs) on the current host. The command virsh list
--all can be used to list both active and inactive domains. The other options are not valid virsh commands. The command virsh list is a basic command that lists all running domains (VMs). You can also list all configured VMs by adding the --all option. This is useful if you want to see all VMs configured in the target hypervisor that you can use on subsequent commands1. References:
* 1: 8 Linux virsh subcommands for managing VMs on the command line | Enable Sysadmin.


NEW QUESTION # 47
FILL BLANK
What is the default path to the Docker daemon configuration file on Linux? (Specify the full name of the file,Including path.)

Answer:

Explanation:
/etc/docker/daemon.json
Explanation
The default path to the Docker daemon configuration file on Linux is /etc/docker/daemon.json. This file is a JSON file that contains the settings and options for the Docker daemon, which is the service that runs on the host operating system and manages the containers, images, networks, and other Docker resources. The
/etc/docker/daemon.json file does not exist by default, but it can be created by the user to customize the Docker daemon behavior. The file can also be specified by using the --config-file flag when starting the Docker daemon. The file must be a valid JSON object and follow the syntax and structure of the dockerd reference docs12. References:
* Docker daemon configuration file - Medium3
* Docker daemon configuration overview | Docker Docs4
* docker daemon | Docker Docs5


NEW QUESTION # 48
Which directory is used bycloud-initto store status information and configuration information retrieved from external sources?

  • A. /opt/cloud/var/
  • B. /proc/sys/cloud/
  • C. /tmp/.cloud/
  • D. /var/lib/cloud/
  • E. /etc/cloud-init/cache/

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 # 49
Which command within virsh lists the virtual machines that are running on the current host?

  • A. list-vm
  • B. I view
  • C. list
  • D. list-all
  • E. show

Answer: C


NEW QUESTION # 50
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. When a Pod fails, Kubernetes restarts the Pod on another node by default.
  • C. All containers of a Pod run on the same node.
  • D. Pods are always created automatically and cannot be explicitly configured.
  • E. systemd is used to manage individual Pods on the Kubernetes nodes.

Answer: A,C

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 # 51
Which of the following are true regarding the CPU of a QEMU virtual machine? (Choose two.)

  • A. QEMU uses the concept of virtual CPUs to map the virtual machines to physical CPUs.
  • B. QEMU virtual machines support multiple virtual CPUs in order to run SMP systems.
  • C. For each QEMU virtual machine, one dedicated physical CPU core must be reserved.
  • D. Each QEMU virtual machine can only have one CPU with one core.
  • E. The CPU architecture of a QEMU virtual machine is independent of the host system's architecture.

Answer: B,E

Explanation:
Explanation
The CPU architecture of a QEMU virtual machine is independent of the host system's architecture. QEMU can emulate many CPU architectures, including x86, ARM, Alpha, and SPARC, regardless of the host system's architecture1. This allows QEMU to run guest operating systems that are not compatible with the host system's hardware. Therefore, option A is correct. QEMU virtual machines support multiple virtual CPUs in order to run SMP systems. QEMU uses the concept of virtual CPUs (vCPUs) to map the virtual machines to physical CPUs. Each vCPU is a thread that runs on a physical CPU core. QEMU allows the user to specify the number of vCPUs and the CPU model for each virtual machine. QEMU can run SMP systems with multiple vCPUs, as well as single-processor systems with one vCPU2. Therefore, option E is also correct. The other options are incorrect because they do not describe the CPU of a QEMU virtual machine. Option B is wrong because QEMU virtual machines can have more than one CPU with more than one core. Option C is wrong because QEMU does not require a dedicated physical CPU core for each virtual machine. QEMU can share the physical CPU cores among multiple virtual machines, depending on the load and the scheduling policy.
Option D is wrong because QEMU does not use the term CPU, but vCPU, to refer to the virtual machines' processors. References:
* QEMU vs VirtualBox: What's the difference? - LinuxConfig.org
* QEMU / KVM CPU model configuration - QEMU documentation
* Introduction - QEMU documentation
* Qemu/KVM Virtual Machines - Proxmox Virtual Environment


NEW QUESTION # 52
Which of the following statements are true about sparse images in the context of virtual machine storage?
(Choose two.)

  • A. Sparse images allocate backend storage at the first usage of a block.
  • B. Sparse images may consume an amount of space different from their nominal size.
  • C. Sparse images are automatically resized when their maximum capacity is about to be exceeded.
  • D. Sparse images can only be used in conjunction with paravirtualization.
  • E. Sparse images are automatically shrunk when files within the image are deleted.

Answer: A,B


NEW QUESTION # 53
How can data be shared between several virtual machines running on the same Linux-based host system?

  • A. By mounting other virtual machines' file systems from /dev/virt-disks/remote/.
  • B. By writing data to the file system since all virtual machines on the same host system use the same file system.
  • C. By attaching the same virtual hard disk to all virtual machines and activating EXT4 sharing extensions on it.
  • D. By using a network file system or file transfer protocol.
  • E. By setting up a ramdisk in one virtual machine and mounting it using its UUID in the other VMs.

Answer: D

Explanation:
Explanation
The correct way to share data between several virtual machines running on the same Linux-based host system is by using a network file system or file transfer protocol. A network file system (NFS) is a distributed file system protocol that allows a user on a client computer to access files over a network in a manner similar to how local storage is accessed1. A file transfer protocol (FTP) is a standard network protocol used for the transfer of computer files between a client and server on a computer network2. Both methods allow data to be shared between virtual machines regardless of their underlying file systems or virtualization technologies. The other options are incorrect because they either do not work or are not feasible. Option A is wrong because each virtual machine has its own file system that is not directly accessible by other virtual machines. Option B is wrong because there is no such device as /dev/virt-disks/remote/ that can be used to mount other virtual machines' file systems. Option C is wrong because a ramdisk is a volatile storage device that is not suitable for sharing data between virtual machines. Option E is wrong because attaching the same virtual hard disk to multiple virtual machines can cause data corruption and conflicts, and EXT4 does not have any sharing extensions that can prevent this. References:https://kb.vmware.com/s/article/1012706
https://bing.com/search?q=data+sharing+between+virtual+machines


NEW QUESTION # 54
Which of the following statements is true regarding networking with libvirt?

  • A. Libvirt assiqns the same MAC address to all virtual machines and isolates their network interfaces at the link layer.
  • B. Libvirt's network functionality is limited to connecting virtual machines to a physical network interface of the host system.
  • C. Libvirt supports exactly one virtual network and connects all virtual machines to it.
  • D. Libvirt requires a dedicated network interface that may not be used by the host system.
  • E. Libvirt networks appear, by default, as standard Linux bridges in the host system.

Answer: E

Explanation:
Explanation
Libvirt supports creating and managing various types of virtual networks that can be used to connect virtual machines to each other or to the external network. One of the common types of virtual networks is the NAT-based network, which uses network address translation (NAT) to allow virtual machines to access the outside world through the host's network interface. By default, libvirt creates a NAT-based network called
'default' when it is installed and started. This network appears as a standard Linux bridge device on the host system, named virbr0. The bridge device has an IP address of 192.168.122.1/24 and acts as a gateway and a DHCP server for the virtual machines connected to it. The bridge device also has iptables rules to forward and masquerade the traffic from and to the virtual machines. The virtual machines connected to the 'default' network have their own IP addresses in the 192.168.122.0/24 range and their own MAC addresses generated by libvirt. The virtual machines can communicate with each other, with the host, and with the external network through the bridge device and the NAT mechanism12.
The other statements in the question are false regarding networking with libvirt. Libvirt's network functionality is not limited to connecting virtual machines to a physical network interface of the host system. Libvirt can also create isolated networks that do not have any connection to the outside world, or routed networks that use static routes to connect virtual machines to the external network without NAT3.
Libvirt does not assign the same MAC address to all virtual machines and isolate their network interfaces at the link layer. Libvirt assigns a unique MAC address to each virtual machine and allows them to communicate with each other at the network layer4. Libvirt does not require a dedicated network interface that may not be used by the host system. Libvirt can share the host's network interface with the virtual machines using NAT or bridging, or it can pass a physical network interface to a virtual machine exclusively using PCI passthrough5.
Libvirt does not support exactly one virtual network and connect all virtual machines to it. Libvirt supports creating and managing multiple virtual networks with different names and configurations, and connecting virtual machines to different networks according to their needs6. References:
* libvirt: Virtual Networking
* libvirt: NAT forwarding (aka "virtual networks")
* libvirt: Routed network
* libvirt: MAC address
* libvirt: PCI passthrough of host network devices
* [libvirt: Network XML format]


NEW QUESTION # 55
......

Start your 305-300 Exam Questions Preparation: https://dumpscertify.torrentexam.com/305-300-exam-latest-torrent.html