
最新のLpi 305-300のPDFと問題集で(2025)無料試験問題解答
あなたを合格させるLPIC-3 305-300試験問題集で2025年09月20日には62問あります
LPIC-3試験305:仮想化とコンテナ化認定試験では、KVM、Docker、LXC/LXDなどの仮想化およびコンテナ化技術に関する候補者の知識とスキルをテストします。この試験では、Linuxシステム上の仮想化およびコンテナ化ソリューションのインストール、構成、および管理もカバーしています。この試験は、60の複数選択と空白の質問で構成されており、候補者は試験に合格するために800のうち少なくとも500を獲得する必要があります。
質問 # 26
Which of the following values are valid in the type attribute of a<domain>element in a libvirt domain definition? (Choose two.)
- A. kvm
- B. Ixc
- C. cgroup
- D. namespace
- E. proc
正解:A、B
質問 # 27
Which of the following statements are true about container-based virtualization? (Choose two.)
- A. Different containers may use different distributions of the same operating system.
- B. All containers run within the operating system kernel of the host system.
- C. Linux does not support container-based virtualization because of missing kernel APIs.
- D. Container-based virtualization relies on hardware support from the host system's CPU.
- E. Each container runs its own operating system kernel.
正解:A、B
解説:
Explanation
Container-based virtualization is a method of operating system-level virtualization that allows multiple isolated user spaces (containers) to run on the same host system1. Each container shares the same operating system kernel as the host, but has its own file system, libraries, and processes2. Therefore, the statements A and C are false, as containers do not run their own kernels or rely on hardware support from the CPU. The statement E is also false, as Linux does support container-based virtualization through various technologies, such as cgroups, namespaces, LXC, Docker, etc12. The statement B is true, as different containers may use different distributions of the same operating system, such as Debian, Ubuntu, Fedora, etc., as long as they are compatible with the host kernel3. The statement D is also true, as all containers run within the operating system kernel of the host system, which provides isolation and resource management for them12. References:
* 1: Containerization (computing) - Wikipedia.
* 2: What are containers? | Google Cloud.
* 3: What is Container-Based Virtualization? - StackHowTo.
質問 # 28
Which of the following values are valid in thefirmwareattribute of a<os>element in a libvirt domain definition? (Choose two.)
- A. efi
- B. scsi
- C. pcie
- D. virtio
- E. bios
正解:A、E
質問 # 29
What is the purpose of a .dockerignore file?
- A. It must be placed in the top level directory of volumes that Docker should never attach automatically to a container
- B. It specifies files that Docker does not submit to the Docker daemon when building a Docker image
- 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 exists in the root file system of containers that should ignore volumes and ports provided by Docker.
正解:B
解説:
Explanation
The purpose of a .dockerignore file is to specify files that Docker does not submit to the Docker daemon when building a Docker image. A .dockerignore file is a text file that contains a list of files or directories that should be excluded from the build context, which is the set of files and folders that are available for use in a Dockerfile. By using a .dockerignore file, you can avoid sending files or directories that are large, contain sensitive information, or are irrelevant to the Docker image to the daemon, which can improve the efficiency and security of the build process. The other options are incorrect because they do not describe the function of a
.dockerignore file. Option A is wrong because a .dockerignore file does not affect the files existing in a Docker image, but only the files sent to the daemon during the build. Option C is wrong because a .dockerignore file does not exist in the root file system of containers, but in the same directory as the Dockerfile. Option D is wrong because a .dockerignore file does not affect the volumes that Docker attaches to a container, but only the files included in the build context. Option E is wrong because a .dockerignore file does not affect the parts of a Dockerfile that are executed, but only the files available for use in a Dockerfile. References:
* What are .dockerignore files, and why you should use them?
* Dockerfile reference | Docker Docs
* How to use .dockerignore and its importance - Shisho Cloud
質問 # 30
Which CPU flag indicates the hardware virtualization capability on an AMD CPU?
- A. SVM
- B. HVM
- C. PVM
- D. VIRT
- E. VMX
正解:A
質問 # 31
What happens when the following command is executed twice in succession?
docker run -tid -v data:/data debian bash
- A. The second command invocation fails with an error stating that the volume data is already associated with a running container.
- B. The container resulting from the second invocation can only read the content of /data/ and cannot change it.
- C. Each container is equipped with its own independent data volume, available at /data/ in the respective container.
- D. The original content of the container image data is available in both containers, although changes stay local within each container.
- E. Both containers share the contents of the data volume, have full permissions to alter its content and mutually see their respective changes.
正解:E
解説:
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.
質問 # 32
What happens when the following command is executed twice in succession?
docker run -tid -v data:/data debian bash
- A. The second command invocation fails with an error stating that the volume data is already associated with a running container.
- B. The container resulting from the second invocation can only read the content of /data/ and cannot change it.
- C. Each container is equipped with its own independent data volume, available at /data/ in the respective container.
- D. The original content of the container image data is available in both containers, although changes stay local within each container.
- E. Both containers share the contents of the data volume, have full permissions to alter its content and mutually see their respective changes.
正解:E
質問 # 33
What is the purpose of the packer inspect subcommand?
- A. Show usage statistics of a Packer image.
- B. Display an overview of the configuration contained in a Packer template.
- C. Execute commands within a running instance of a Packer image.
- D. Retrieve files from an existing Packer image.
- E. List the artifacts created during the build process of a Packer image.
正解:B
質問 # 34
Which of the following values would be valid in the FROM statement in aDockerfile?
- A. registry:ubuntu:focal
- B. docker://ubuntu: focal
- C. ubuntu:focal
- D. http://docker.example.com/images/ubuntu-focal.iso
- E. file:/tmp/ubuntu/Dockerfile
正解:C
質問 # 35
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. For each QEMU virtual machine, one dedicated physical CPU core must be reserved.
- C. QEMU uses the concept of virtual CPUs to map the virtual machines to physical CPUs.
- 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.
正解:D、E
質問 # 36
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. virsh pool-create-as vms dir --target /vms
- B. dd if=/dev/zero of=/vms bs=1 count=0 flags=name:vms
- C. touch /vms/.libvirtpool
- D. libvirt-poolctl new --name=/vms --type=dir --path=/vms
- E. qemu-img pool vms:/vms
正解:A
質問 # 37
If aDockerfilecontains the following lines:
WORKDIR /
RUN cd /tmp
RUN echo test > test
where is the filetestlocated?
- A. /test within the container image.
- B. /root/tesc within the container image.
- C. /tmp/test on the system running docker build.
- D. /ting/test within the container image.
- E. test in the directory holding the Dockerf ile.
正解:A
質問 # 38
Which of the following statements about the commandlxc-checkpointis correct?
- A. It writes the status of the container to a file.
- B. It creates a container image based on an existing container.
- C. It only works on stopped containers.
- D. It creates a clone of a container.
- E. It doubles the memory consumption of the container.
正解:A
質問 # 39
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. /var/lib/cloud/
- D. /opt/cloud/var/
- E. /tmp/.cloud/
正解:C
解説:
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 ...
質問 # 40
Which of the following commands executes a command in a running LXC container?
- A. lxc-enter
- B. lxc-batch
- C. lxc-accach
- D. lxc-run
- E. lxc-eval
正解:C
解説:
Explanation
The command lxc-attach is used to execute a command in a running LXC container. It allows the user to start a process inside the container and attach to its standard input, output, and error streams1. For example, the command lxc-attach -n mycontainer -- ls -lh /home will list all the files and directories in the /home directory of the container named mycontainer1. The other options are not valid LXC commands. The command lxc-batch does not exist. The command lxc-run is an alias for lxc-start, which is used to start a container, not to execute a command in it2. The command lxc-enter is also an alias for lxc-attach, but it is deprecated and should not be used3. The command lxc-eval is also not a valid LXC command. References:
* 1: Executing a command inside a running LXC - Unix & Linux Stack Exchange.
* 2: lxc-start: start a container. - SysTutorials.
* 3: lxc-attach: start a process inside a running container. - SysTutorials.
質問 # 41
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 -v datastore:/data --name service debian bash
- B. docker run --volumes-from datastore --name service debian bash
- C. docker run -v /data --name service debian bash
- D. docker run --share-with datastore --name service debian bash
- E. docker run --volume-backend datastore -v /data --name service debian bash
正解:B
質問 # 42
Which of the following commands deletes all volumes which are not associated with a container?
- A. docker volume cleanup
- B. docker volume orphan -d
- C. docker volume garbage-collect
- D. docker volume prune
- E. docker volume vacuum
正解:D
解説:
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.
質問 # 43
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.)
正解:
解説:
lxc-top
質問 # 44
Which of the following statements is true regarding networking with libvirt?
- A. Libvirt networks appear, by default, as standard Linux bridges in the host system.
- B. Libvirt assiqns the same MAC address to all virtual machines and isolates their network interfaces at the link layer.
- C. Libvirt requires a dedicated network interface that may not be used by the host system.
- D. Libvirt's network functionality is limited to connecting virtual machines to a physical network interface of the host system.
- E. Libvirt supports exactly one virtual network and connects all virtual machines to it.
正解:A
解説:
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]
質問 # 45
Which of the following values are valid in the type attribute of a<domain>element in a libvirt domain definition? (Choose two.)
- A. kvm
- B. Ixc
- C. cgroup
- D. namespace
- E. proc
正解:A、B
解説:
Explanation
The type attribute of a <domain> element in a libvirt domain definition specifies the hypervisor used for running the domain. The allowed values are driver specific, but include "xen", "kvm", "hvf" (since 8.1.0 and QEMU 2.12), "qemu" and "lxc"1. Therefore, the valid values among the options are C. kvm and E. lxc. KVM stands for Kernel-based Virtual Machine, which is a full virtualization solution for Linux on x86 hardware containing virtualization extensions (Intel VT or AMD-V)2. LXC stands for Linux Containers, which is an operating system-level virtualization method for running multiple isolated Linux systems (containers) on a single control host3. The other options are not valid values for the type attribute, asthey are either not hypervisors or not supported by libvirt. References:http://libvirt.org/formatdomain.html
https://libvirt.org/formatcaps.html
質問 # 46
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. Network Interfaces
- B. Memory
- C. IO Cache
- D. Hard Disks
- E. Host Bus Adapters
正解:B
質問 # 47
......
305-300問題集はLPIC-3認証済み試験問題と解答:https://jp.fast2test.com/305-300-premium-file.html
305-300無料試験学習ガイド!(更新された62問あります):https://drive.google.com/open?id=1RKOl6pYJIs1vJ2GWeRlHTthfziltuxPf