
Free Lpi (305-300) Certification Sample Questions with Online Practice Test
305-300 Certification Study Guide Pass 305-300 Fast
Candidates who wish to sit for the LPIC-3 Exam 305 are expected to have prior knowledge of virtualization and containerization. 305-300 exam measures the candidate's ability to configure, deploy, manage and troubleshoot virtualization and containerization technologies. In addition, it tests their ability to design and implement virtualization and containerization solutions that meet industry standards.
NEW QUESTION # 30
Which of the following are true regarding the CPU of a QEMU virtual machine? (Choose two.)
- A. For each QEMU virtual machine, one dedicated physical CPU core must be reserved.
- B. The CPU architecture of a QEMU virtual machine is independent of the host system's architecture.
- C. QEMU uses the concept of virtual CPUs to map the virtual machines to physical CPUs.
- D. Each QEMU virtual machine can only have one CPU with one core.
- E. QEMU virtual machines support multiple virtual CPUs in order to run SMP systems.
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 # 31
Which of the following network interface types are valid in an LXD container configuration? (Choose three.)
- A. ipsec
- B. wifi
- C. macvlan
- D. physical
- E. bridged
Answer: C,D,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 # 32
What is the purpose of the commandvagrant init?
- A. It creates a Vagrant configuration file.
- B. It installs Vagrant on a Linux host.
- C. It executes a provisioning tool in a running box.
- D. It starts a Vagrant box.
- E. It downloads a Vagrant box.
Answer: A
Explanation:
Explanation
The command vagrant init is used to initialize the current directory to be a Vagrant environment by creating an initial Vagrantfile if one does not already exist1. The Vagrantfile contains the configuration settings for the Vagrant box, such as the box name, box URL, network settings, synced folders, provisioners, etc. The command vagrant init does not execute any provisioning tool, start any box, install Vagrant on a Linux host, or download any box. Those actions are performed by other Vagrant commands, such as vagrant provision, vagrant up, vagrant install, and vagrant box add, respectively. References:
* 1: vagrant init - Command-Line Interface | Vagrant | HashiCorp Developer
NEW QUESTION # 33
How does Packer interact with system images?
- A. 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.
- B. 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.
- C. 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.
- D. Packer has to be installed within the target image and is executed during the image's first boot in order to execute preparation tasks.
- E. 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.
Answer: B
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 # 34
After creating a new Docker network using the following command:
docker network create --driver bridge isolated_nw
which parameter must be added todocker createin order to attach a container to the network?
- A. --ethernet=isolated_nw
- B. --attach=isolated_nw
- C. --network=isolated_nw
- D. --alias=isolated_nw
- E. --eth0=isolated_nw
Answer: C
Explanation:
Explanation
To attach a container to a network when creating it, the --network flag must be used with the name of the network as the argument. The --network flag specifies the network mode for the container. By default, the network mode is bridge, which means the container is connected to the default bridge network. However, if a custom network is created, such as isolated_nw in this case, the container must be explicitly attached to it using the --network flag. For example, to create a container named web1 and attach it to the isolated_nw network, the command would be:
docker create --name web1 --network isolated_nw nginx
The other options are not valid parameters for docker create. The --eth0, --ethernet, and --attach flags do not exist. The --alias flag is used to specify an additional network alias for the container on a user-defined network, but it does not attach the container to the network. References:
* docker network create | Docker Documentation1
* docker create | Docker Documentation
* Networking overview | Docker Docs2
NEW QUESTION # 35
Which of the following tasks are part of a hypervisor's responsibility? (Choose two.)
- A. Map the resources of virtual machines to the resources of the host system.
- B. Isolate the virtual machines and prevent unauthorized access to resources of other virtual machines.
- C. Manage authentication to network services running inside a virtual machine.
- D. Create filesystems during the installation of new virtual machine quest operating systems.
- E. Provide host-wide unique PIDs to the processes running inside the virtual machines in order to ease inter-process communication between virtual machines.
Answer: A,B
NEW QUESTION # 36
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 # 37
What kind of virtualization is implemented by LXC?
- A. Hardware containers
- B. CPU emulation
- C. System containers
- D. Application containers
- E. Paravirtualization
Answer: C
NEW QUESTION # 38
Which of the following statements are true regarding VirtualBox?
- A. It requires dedicated shared storage, as it cannot store virtual machine disk images locally on block devices of the virtualization host.
- B. It is available for Linux only and requires the source code of the currently running Linux kernel to be available.
- C. It is a hypervisor designed as a special kernel that is booted before the first regular operating system starts.
- D. It provides both a graphical user interface and command line tools to administer virtual machines.
- E. It only supports Linux as a guest operating system and cannot run Windows inside a virtual machine.
Answer: D
NEW QUESTION # 39
If aDockerfilecontains the following lines:
WORKDIR /
RUN cd /tmp
RUN echo test > test
where is the filetestlocated?
- A. test in the directory holding the Dockerf ile.
- B. /tmp/test on the system running docker build.
- C. /test within the container image.
- D. /root/tesc within the container image.
- E. /ting/test within the container image.
Answer: C
Explanation:
Explanation
The WORKDIR instruction sets the working directory for any subsequent RUN, CMD, ENTRYPOINT, COPY and ADD instructions that follow it in the Dockerfile1. The RUN instruction executes commands in a new layer on top of the current image and commits the results2. The RUN cd command does not change the working directory for the next RUN instruction, because each RUN command runs in a new shell and a new environment3. Therefore, the file test is created in the root directory (/) of the container image, not in the /tmp directory. References:
* Dockerfile reference: WORKDIR
* Dockerfile reference: RUN
* difference between RUN cd and WORKDIR in Dockerfile
NEW QUESTION # 40
Ifdocker stackis to be used to run a Docker Compose file on a Docker Swarm, how are the images referenced in the Docker Compose configuration made available on the Swarm nodes?
- A. docker stack passes the images to the Swarm master which distributes the images to all other Swarm nodes.
- B. docker stack triggers the build process for the images on all nodes of the Swarm.
- C. docker stack instructs the Swarm nodes to pull the images from a registry, although it does not upload the images to the registry.
- D. docker stack builds the images locally and copies them to only those Swarm nodes which run the service.
- E. docker stack transfers the image from its local Docker cache to each Swarm node.
Answer: C
NEW QUESTION # 41
Which of the following commands moves the libvirt domainweb1from the current host system to the host systemhost2?
- A. virsh cp .:web1 host2:web1
- B. virsh patch web1 .Domain.Node=host2
- C. virsh migrate web1 qemu+ssh://host2/system
- D. virsh node-update host1=-dom:web1 host2=+dom:web1
- E. virsh pool-add host2 web1
Answer: C
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 # 42
Which of the following commands deletes all volumes which are not associated with a container?
- A. docker volume cleanup
- B. docker volume garbage-collect
- C. docker volume orphan -d
- D. docker volume prune
- E. docker volume vacuum
Answer: D
NEW QUESTION # 43
Which of the following mechanisms are used by LXC and Docker to create containers? (Choose three.)
- A. Control Groups
- B. Linux Capabilities
- C. Kernel Namespaces
- D. File System Permissions
- E. POSIXACLs
Answer: A,B,C
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 # 44
Which functionality is provided by Vagrant as well as by Docker? (Choose three.)
- A. Both can download required base images.
- B. Both start system images as virtual machines instead of containers bv default.
- C. Both can share directories from the host file system to a guest.
- D. Both can apply changes to a base image.
- E. Both start system images as containers instead of virtual machines by default.
Answer: A,C,D
Explanation:
* Both Vagrant and Docker can share directories from the host file system to a guest. This allows the guest to access files and folders from the host without copying them. Vagrant uses the config.vm.synced_folder option in the Vagrantfile to specify the shared folders1. Docker uses the -v or --volume flag in the docker run command to mount a host directory as a data volume in the container2.
* Both Vagrant and Docker can download required base images. Base images are the starting point for creating a guest environment. Vagrant uses the config.vm.box option in the Vagrantfile to specify the base image to use1. Docker uses the FROM instruction in the Dockerfile to specify the base image to use2. Both Vagrant and Docker can download base images from public repositories or local sources.
* Both Vagrant and Docker can apply changes to a base image. Changes are modifications or additions to the base image that customize the guest environment. Vagrant uses provisioners to run scripts or commands on the guest after it is booted1. Docker uses instructions in the Dockerfile to execute commands on the baseimage and create a new image2. Both Vagrant and Docker can save the changes to a new image or discard them after the guest is destroyed.
* Vagrant and Docker differ in how they start system images. Vagrant starts system images as virtual machines by default, using a provider such as VirtualBox, VMware, or Hyper-V1. Docker starts system images as containers by default, using the native containerization functionality on macOS, Linux, and Windows2. Containers are generally more lightweight and faster than virtual machines, but less secure and flexible. References: 1: Vagrant vs. Docker | Vagrant | HashiCorp Developer 2: Vagrant vs Docker:
Which Is Right for You? (Could Be Both) - Kinsta Web Development Tools
NEW QUESTION # 45
The commandvirsh vol-list vmsreturns the following error:
error: failed to get pool 'vms'
error: Storage pool not found: no storage pool with matching name 'vms ' Given that the directory/vmsexists, which of the following commands resolves this issue?
- A. qemu-img pool vms:/vms
- B. dd if=/dev/zero of=/vms bs=1 count=0 flags=name:vms
- C. libvirt-poolctl new --name=/vms --type=dir --path=/vms
- D. virsh pool-create-as vms dir --target /vms
- E. touch /vms/.libvirtpool
Answer: D
NEW QUESTION # 46
What kind of virtualization is implemented by LXC?
- A. Hardware containers
- B. CPU emulation
- C. System containers
- D. Application containers
- E. Paravirtualization
Answer: C
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 # 47
Which of the following network interface types are valid in an LXD container configuration? (Choose three.)
- A. ipsec
- B. wifi
- C. macvlan
- D. physical
- E. bridged
Answer: C,D,E
NEW QUESTION # 48
......
Lpi 305-300 (LPIC-3 Exam 305: Virtualization and Containerization) is a professional certification exam that is designed for individuals who want to validate their skills and knowledge in virtualization and containerization technologies. It is intended for professionals who have experience in administering Linux-based systems and want to expand their knowledge and expertise in virtualization and containerization technologies. 305-300 exam covers a broad range of topics related to virtualization and containerization, including the installation, configuration, and management of virtualization and containerization technologies.
Get Perfect Results with Premium 305-300 Dumps Updated 62 Questions: https://braindumps.getvalidtest.com/305-300-brain-dumps.html