Apr-2024 Free Lpi 305-300 Exam Question Practice Exams
Ace 305-300 Certification with 62 Actual Questions
The LPIC-3 Exam 305: Virtualization and Containerization is a professional certification exam designed for IT professionals who want to demonstrate their expertise in virtualization technologies and containerization. 305-300 exam is the third level of the Linux Professional Institute Certification (LPIC) program and is intended for experienced Linux professionals who already have LPIC-2 certification. Passing 305-300 exam will earn candidates the LPIC-3 certification, which is recognized globally as a mark of excellence in Linux system administration.
NEW QUESTION # 27
What happens when the following command is executed twice in succession?
docker run -tid -v data:/data debian bash
- A. Each container is equipped with its own independent data volume, available at /data/ in the respective container.
- B. The second command invocation fails with an error stating that the volume data is already associated with a running container.
- C. The original content of the container image data is available in both containers, although changes stay local within each container.
- D. Both containers share the contents of the data volume, have full permissions to alter its content and mutually see their respective changes.
- E. The container resulting from the second invocation can only read the content of /data/ and cannot change it.
Answer: D
NEW QUESTION # 28
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 instructs the Swarm nodes to pull the images from a registry, although it does not upload the images to the registry.
- B. docker stack triggers the build process for the images on all nodes of the Swarm.
- C. docker stack transfers the image from its local Docker cache to each Swarm node.
- D. docker stack passes the images to the Swarm master which distributes the images to all other Swarm nodes.
- E. docker stack builds the images locally and copies them to only those Swarm nodes which run the service.
Answer: A
NEW QUESTION # 29
What happens when the following command is executed twice in succession?
docker run -tid -v data:/data debian bash
- A. Each container is equipped with its own independent data volume, available at /data/ in the respective container.
- B. The second command invocation fails with an error stating that the volume data is already associated with a running container.
- C. The original content of the container image data is available in both containers, although changes stay local within each container.
- D. Both containers share the contents of the data volume, have full permissions to alter its content and mutually see their respective changes.
- E. The container resulting from the second invocation can only read the content of /data/ and cannot change it.
Answer: D
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 # 30
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. libvirt-poolctl new --name=/vms --type=dir --path=/vms
- B. virsh pool-create-as vms dir --target /vms
- C. dd if=/dev/zero of=/vms bs=1 count=0 flags=name:vms
- D. touch /vms/.libvirtpool
- E. qemu-img pool vms:/vms
Answer: B
NEW QUESTION # 31
How can data be shared between several virtual machines running on the same Linux-based host system?
- A. By using a network file system or file transfer protocol.
- B. By mounting other virtual machines' file systems from /dev/virt-disks/remote/.
- C. By writing data to the file system since all virtual machines on the same host system use the same file system.
- D. By setting up a ramdisk in one virtual machine and mounting it using its UUID in the other VMs.
- E. By attaching the same virtual hard disk to all virtual machines and activating EXT4 sharing extensions on it.
Answer: A
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 # 32
Which of the following statements is true regarding the following output ofxl list:
- A. The domain with ID 2 uses Para virtualization.
- B. Both Debian and Ubuntu require xl commands to start running.
- C. Ubuntu is idle or waiting for I/O.
- D. CentOS is the domain which has consumed the most CPU time.
- E. It is necessary to use the xl command to change Ubuntu's state to running.
Answer: C
Explanation:
Explanation
The output of xl list shows the state of the domains. The domain with ID 6, Ubuntu, has a state of "b-". This means that the domain is blocked, which means it is idle or waiting for I/O.
https://xenbits.xen.org/docs/unstable/man/xl.1.html
NEW QUESTION # 33
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. virc-reset
- B. sysprep
- C. virt-rescue
- D. vire-wipe
- E. virt-svspre
- F. virt-sparsi
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 # 34
Which of the following commands deletes all volumes which are not associated with a container?
- A. docker volume vacuum
- B. docker volume cleanup
- C. docker volume orphan -d
- D. docker volume prune
- E. docker volume garbage-collect
Answer: D
Explanation:
Explanation
The command that deletes all volumes which are not associated with a container is docker volume prune. This command removes all unused local volumes, which are those that are not referenced by any containers. By default, it only removes anonymous volumes, which are those that are not given a specific name when they are created. To remove both unused anonymous and named volumes, the --all or -a flag can be added to the command. The command will prompt for confirmation before deleting the volumes, unless the --force or -f flag is used to bypass the prompt. The command will also show the total reclaimed space after deleting the volumes12.
The other commands listed in the question are not valid or do not have the same functionality as docker volume prune. They are either made up, misspelled, or have a different purpose. These commands are:
* docker volume cleanup: This command does not exist in Docker. There is no cleanup subcommand for docker volume.
* docker volume orphan -d: This command does not exist in Docker. There is no orphan subcommand for docker volume, and the -d flag is not a valid option for any docker volume command.
* docker volume vacuum: This command does not exist in Docker. There is no vacuum subcommand for docker volume.
* docker volume garbage-collect: This command does not exist in Docker. There is no garbage-collect subcommand for docker volume.
References:
* docker volume prune | Docker Docs
* How to Remove all Docker Volumes - YallaLabs.
NEW QUESTION # 35
Which of the following statements are true about sparse images in the context of virtual machine storage?
(Choose two.)
- A. Sparse images can only be used in conjunction with paravirtualization.
- B. Sparse images are automatically resized when their maximum capacity is about to be exceeded.
- C. Sparse images are automatically shrunk when files within the image are deleted.
- D. Sparse images allocate backend storage at the first usage of a block.
- E. Sparse images may consume an amount of space different from their nominal size.
Answer: D,E
Explanation:
Explanation
Sparse images are a type of virtual disk images that grow in size as data is written to them, but do not shrink when data is deleted from them. Sparse images may consume an amount of space different from their nominal size, which is the maximum size that the image can grow to. For example, a sparse image with a nominal size of 100 GB may only take up 20 GB of physical storage if only 20 GB of data is written to it. Sparse images allocate backend storage at the first usage of a block, which means that the physical storage is only used when the virtual machine actually writes data to a block. This can save storage space and improve performance, as the image does not need to be pre-allocated or zeroed out.
Sparse images are not automatically shrunk when files within the image are deleted, because the virtual machine does not inform the host system about the freed blocks. To reclaim the unused space, a special tool such as virt-sparsify1 or qemu-img2 must be used to compact the image. Sparse images can be used with both full virtualization and paravirtualization, as the type of virtualization does not affect the format of the disk image. Sparse images are not automatically resized when their maximum capacity is about to be exceeded, because this would require changing the partition table and the filesystem of the image, which is not a trivial task. To resize a sparse image, a tool such as virt-resize3 or qemu-img2 must be used to increase the nominal size and the filesystem size of the image. References: 1 (search for "virt-sparsify"), 2 (search for
"qemu-img"), 3 (search for "virt-resize").
NEW QUESTION # 36
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 # 37
Which of the following types of guest systems does Xen support? (Choose two.)
- A. Emulated guests
- B. Paravirtualized quests (PVI
- C. Container virtualized guests
- D. Foreign architecture guests (FA)
- E. Fully virtualized guests
Answer: B,E
NEW QUESTION # 38
Virtualization of which hardware component is facilitated by CPUs supporting nested page table extensions, such as Intel Extended Page Table (EPT) or AMD Rapid Virtualization Indexing (RVI)?
- A. Memory
- B. Hard Disks
- C. Host Bus Adapters
- D. Network Interfaces
- E. IO Cache
Answer: A
NEW QUESTION # 39
Which of the following mechanisms are used by LXC and Docker to create containers? (Choose three.)
- A. Linux Capabilities
- B. Kernel Namespaces
- C. File System Permissions
- D. POSIXACLs
- E. Control Groups
Answer: A,B,E
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 # 40
Which of the following services can QEMU provide in a user network? (Choose three.)
- A. CIFS
- B. TFTP
- C. DHCP
- D. BGP
- E. AppleTalk
Answer: A,B,C
NEW QUESTION # 41
Which of the following values would be valid in the FROM statement in aDockerfile?
- A. docker://ubuntu: focal
- B. file:/tmp/ubuntu/Dockerfile
- C. http://docker.example.com/images/ubuntu-focal.iso
- D. registry:ubuntu:focal
- E. ubuntu:focal
Answer: E
Explanation:
Explanation
The FROM statement in a Dockerfile specifies the base image from which the subsequent instructions are executed1. The value of the FROM statement can be either an image name, an image name with a tag, or an image ID1. The image name can be either a repository name or a repository name with a registry prefix2. For example, ubuntu is a repository name, and docker.io/ubuntu is a repository name with a registry prefix2. The tag is an optional identifier that can be used to specify a particular version or variant of an image1. For example, ubuntu:focal refers to the image with the focal tag in the ubuntu repository2. The image ID is a unique identifier that is automatically generated when an image is built or pulled1. For example, sha256:9b0dafaadb1cd1d14e4db51bd0f4c0d56b6b551b2982b2b7c637ca143ad605d2 is an image ID3.
Therefore, the only valid value in the FROM statement among the given options is ubuntu:focal, which is an image name with a tag. The other options are invalid because:
* docker://ubuntu:focal is not a valid image name format. The docker:// prefix is used to specify a transport protocol, not a registry prefix4.
* registry:ubuntu:focal is not a valid image name format. The registry prefix should be a valid hostname or IP address, not a generic term2.
* file:/tmp/ubuntu/Dockerfile is not a valid image name format. The file: prefix is used to specify a local file path, not an image name5.
* http://docker.example.com/images/ubuntu-focal.iso
is not a valid image name format.
The
http:// prefix is used to specify a web URL, not an image name
5.
References:
* 1: Dockerfile reference | Docker Docs
* 2: docker - Using FROM statement in dockerfile - Stack Overflow
* 3: How to get the image id from a docker image - Stack Overflow
* 4: skopeo - Docker Registry v2 API tool - Linux Man Pages (1)
* 5: How to build a Docker image from a local Dockerfile? - Stack Overflow
NEW QUESTION # 42
......
305-300 Questions PDF [2024] Use Valid New dump to Clear Exam: https://www.validtorrent.com/305-300-valid-exam-torrent.html
PASS Lpi 305-300 EXAM WITH UPDATED DUMPS: https://drive.google.com/open?id=1kkguzsBReDgorWlxroFU16uBhkLWjno4