
手に入れよう!は2024年最新の有効な実践問題であなたの305-300試験を合格させる(本日更新された62問)
LPIC-3 305-300試験実践テスト問題集解答豪華セットを使おう!
LPIC-3 Exam 305は、仮想化およびコンテナ化技術に深い理解が必要な包括的な試験です。候補者は、実際の仮想化およびコンテナ化技術の実務経験を持ち、Linuxオペレーティングシステム、ネットワーク、セキュリティに強い理解を持っていることが期待されています。この試験は、60問の多肢選択および穴埋め問題から構成され、候補者は120分間で試験を完了する必要があります。
質問 # 32
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. --attach=isolated_nw
- B. --eth0=isolated_nw
- C. --network=isolated_nw
- D. --ethernet=isolated_nw
- E. --alias=isolated_nw
正解:C
解説:
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
質問 # 33
Which of the following statements are true about sparse images in the context of virtual machine storage?
(Choose two.)
- A. Sparse images are automatically shrunk when files within the image are deleted.
- B. Sparse images are automatically resized when their maximum capacity is about to be exceeded.
- C. Sparse images can only be used in conjunction with paravirtualization.
- D. Sparse images may consume an amount of space different from their nominal size.
- E. Sparse images allocate backend storage at the first usage of a block.
正解:D、E
質問 # 34
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. virsh pool-create-as vms dir --target /vms
- C. touch /vms/.libvirtpool
- D. dd if=/dev/zero of=/vms bs=1 count=0 flags=name:vms
- E. libvirt-poolctl new --name=/vms --type=dir --path=/vms
正解:B
質問 # 35
Which file in acgroupdirectory contains the list of processes belonging to thiscgroup?
- A. casks
- B. subjects
- C. members
- D. pids
- E. procs
正解:E
質問 # 36
What is the purpose of capabilities in the context of container virtualization?
- A. Allow regular users to start containers with elevated permissions.
- B. Restrict the disk space a container can consume.
- C. Map potentially dangerous system calls to an emulation layer provided by the container virtualization.
- D. Prevent processes from performing actions which might infringe the container.
- E. Enable memory deduplication to cache files which exist in multiple containers.
正解:D
質問 # 37
Which file in acgroupdirectory contains the list of processes belonging to thiscgroup?
- A. casks
- B. subjects
- C. members
- D. pids
- E. procs
正解:E
解説:
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
質問 # 38
What kind of virtualization is implemented by LXC?
- A. Hardware containers
- B. System containers
- C. Paravirtualization
- D. Application containers
- E. CPU emulation
正解:B
解説:
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
質問 # 39
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 must be placed in the top level directory of volumes that Docker should never attach automatically to a container
- D. It lists files existing in a Docker image which should be excluded when building a derivative image.
- E. It specifies which parts of a Dockerfile should be ignored when building a Docker image.
正解:A
質問 # 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 instructs the Swarm nodes to pull the images from a registry, although it does not upload the images to the registry.
- B. docker stack transfers the image from its local Docker cache to each Swarm node.
- C. docker stack passes the images to the Swarm master which distributes the images to all other Swarm nodes.
- D. docker stack triggers the build process for the images on all nodes of the Swarm.
- E. docker stack builds the images locally and copies them to only those Swarm nodes which run the service.
正解:A
質問 # 41
Which of the following commands lists all differences between the disk images vm1-snap.img and vm1.img?
- A. virt-cmp -a vm1-snap.img -A vm1.img
- B. virt-history -a vm1-snap.img -A vm1.img
- C. virt-diff -a vm1-snap.img -A vm1.img
- D. virt-delta -a vm1-snap.img -A vm1.img
- E. virt-cp-in -a vm1-snap.img -A vm1.img
正解:C
解説:
Explanation
The virt-diff command-line tool can be used to list the differences between files in two virtual machines or disk images. The output shows the changes to a virtual machine's disk images after it has been running. The command can also be used to show the difference between overlays1. To specify two guests, you have to use the -a or -d option for the first guest, and the -A or -D option for the second guest. For example: virt-diff -a old.img -A new.img1. Therefore, the correct command to list all differences between the disk images vm1-snap.img and vm1.img is: virt-diff -a vm1-snap.img -A vm1.img. The other commands are not related to finding differences between disk images. virt-delta is a tool to create delta disks from two disk images2. virt-cp-in is a tool to copy files and directories into a virtual machine disk image3. virt-cmp is a tool to compare two files or directories in a virtual machine disk image4. virt-history is a tool to show the history of a virtual machine disk image5. References:
* 21.13. virt-diff: Listing the Differences between Virtual Machine Files ...
* 21.14. virt-delta: Creating Delta Disks from Two Disk Images ...
* 21.6. virt-cp-in: Copying Files and Directories into a Virtual Machine Disk Image ...
* 21.7. virt-cmp: Comparing Two Files or Directories in a Virtual Machine Disk Image ...
* 21.8. virt-history: Showing the History of a Virtual Machine Disk Image ...
質問 # 42
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*
正解:A、D
解説:
Explanation
The ENTRYPOINT instruction in a Dockerfile specifies the default command to run when a container is started from the image. The ENTRYPOINT instruction can be written in two forms: exec form and shell form.
The exec form uses a JSON array to specify the command and its arguments, such as [ "executable",
"param1", "param2" ]. The shell form uses a single string to specify the command and its arguments, such as
"executable param1 param2". The shell form is converted to the exec form by adding /bin/sh -c to the beginning of the command. Therefore, the following statements in a Dockerfile are equivalent and will lead to a container that outputs hello world:
ENTRYPOINT [ "echo hello world" ] ENTRYPOINT [ "/bin/sh", "-c", "echo hello world" ] ENTRYPOINT
"echo hello world" ENTRYPOINT [ "echo", "hello", "world" ] ENTRYPOINT [ "/bin/sh", "-c", "echo",
"hello", "world" ] ENTRYPOINT "echo hello world"
The other statements in the question are invalid or incorrect. The statement A. ENTRYPOINT "echo Hello World" is invalid because it uses double quotes to enclose the entire command, which is not allowed in the shell form. The statement D. ENTRYPOINT echo Hello World is incorrect because it does not use quotes to enclose the command, which is required in the shell form. The statement E. ENTRYPOINT "echo", "Hello",
"World" is invalid because it uses double quotes to separate the command and its arguments, which is not allowed in the exec form. References:
* Dockerfile reference | Docker Docs
* Using the Dockerfile ENTRYPOINT and CMD Instructions - ATA Learning
* Difference Between run, cmd and entrypoint in a Dockerfile
質問 # 43
Which functionality is provided by Vagrant as well as by Docker? (Choose three.)
- A. Both can share directories from the host file system to a guest.
- B. Both start system images as virtual machines instead of containers bv default.
- C. Both can apply changes to a base image.
- D. Both can download required base images.
- E. Both start system images as containers instead of virtual machines by default.
正解:A、C、D
解説:
* 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
質問 # 44
What happens when the following command is executed twice in succession?
docker run -tid -v data:/data debian bash
- A. The container resulting from the second invocation can only read the content of /data/ and cannot change it.
- B. The second command invocation fails with an error stating that the volume data is already associated with a running container.
- C. Each container is equipped with its own independent data volume, available at /data/ in the respective 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 original content of the container image data is available in both containers, although changes stay local within each container.
正解:D
質問 # 45
Which of the following services can QEMU provide in a user network? (Choose three.)
- A. BGP
- B. CIFS
- C. DHCP
- D. TFTP
- E. AppleTalk
正解:B、C、D
質問 # 46
What does IaaS stand for?
- A. Infrastructure as a Service
- B. Integration as a Service
- C. Instances as a Service
- D. Information as a Service
- E. Intelligence as a Service
正解:A
質問 # 47
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 transfers the image from its local Docker cache to each Swarm node.
- C. docker stack passes the images to the Swarm master which distributes the images to all other Swarm nodes.
- D. docker stack triggers the build process for the images on all nodes of the Swarm.
- E. docker stack builds the images locally and copies them to only those Swarm nodes which run the service.
正解:A
解説:
Explanation
Docker stack is a command that allows users to deploy and manage a stack of services on a Docker Swarm cluster. A stack is a group of interrelated services that share dependencies and can be orchestrated and scaled together. A stack is typically defined by a Compose file, which is a YAML file that describes the services, networks, volumes, and other resources of the stack. To use docker stack to run a Compose file on a Swarm, the user must first create and initialize a Swarm cluster, which is a group of machines (nodes) that are running the Docker Engine and are joined into a single entity. The Swarm cluster has one or more managers, which are responsible for maintaining the cluster state and orchestrating the services, and one or more workers, which are the nodes that run the services.
When the user runs docker stack deploy with a Compose file, the command parses the file and creates the services as specified. However, docker stack does not build or upload the images referenced in the Compose file to any registry. Instead, it instructs the Swarm nodes to pull the images from a registry, which can be the public Docker Hub or a private registry. The user must ensure that the images are available in the registry before deploying the stack, otherwise the deployment will fail. The user can use docker build and docker push commands to create and upload the images to the registry, or use an automated build service such as Docker Hub or GitHub Actions. The user must also make sure that the image names and tags in the Compose file match the ones in the registry, and that the Swarm nodes have access to the registry if it is private. By pulling the images from a registry, docker stack ensures that the Swarm nodes have the same and latest version of the images, and that the images are distributed across the cluster in an efficient way.
The other options are not correct. Docker stack does not build the images locally or on the Swarm nodes, nor does it copy or transfer the images to the Swarm nodes. Dockerstack also does not pass the images to the Swarm master, as this would create a bottleneck and a single point of failure. Docker stack relies on the registry as the source of truth for the images, and delegates the image pulling to the Swarm nodes. References:
* Deploy a stack to a swarm | Docker Docs1
* docker stack deploy | Docker Docs2
* docker build | Docker Docs3
* docker push | Docker Docs4
質問 # 48
Which of the following values would be valid in the FROM statement in aDockerfile?
- A. file:/tmp/ubuntu/Dockerfile
- B. registry:ubuntu:focal
- C. docker://ubuntu: focal
- D. http://docker.example.com/images/ubuntu-focal.iso
- E. ubuntu:focal
正解:E
質問 # 49
Which of the following statements are true regarding VirtualBox?
- A. It is a hypervisor designed as a special kernel that is booted before the first regular operating system starts.
- B. It only supports Linux as a guest operating system and cannot run Windows inside a virtual machine.
- C. It requires dedicated shared storage, as it cannot store virtual machine disk images locally on block devices of the virtualization host.
- D. It is available for Linux only and requires the source code of the currently running Linux kernel to be available.
- E. It provides both a graphical user interface and command line tools to administer virtual machines.
正解:E
質問 # 50
Which of the following statements are true about container-based virtualization? (Choose two.)
- A. Each container runs its own operating system kernel.
- B. Linux does not support container-based virtualization because of missingkernel APIs.
- C. Different containers may use different distributions of the same operating system.
- D. Container-based virtualization relies on hardware support from the host system's CPU.
- E. All containers run within the operating system kernel of the host system.
正解:C、E
質問 # 51
What is the default provider of Vagrant?
- A. hyperv
- B. vmware_workstation
- C. lxc
- D. docker
- E. virtualbox
正解:E
解説:
Explanation
Vagrant is a tool that allows users to create and configure lightweight, reproducible, and portable development environments. Vagrant supports multiple providers, which are the backends that Vagrant uses to create and manage the virtual machines. By default, VirtualBox is the default provider for Vagrant. VirtualBox is still the most accessible platform to use Vagrant: it is free, cross-platform, and has been supported by Vagrant for years. With VirtualBox as the default provider, it provides the lowest friction for new users to get started with Vagrant. However, users can also use other providers, such as VMware, Hyper-V, Docker, or LXC, depending on their preferences and needs. To use another provider, users must install it as a Vagrant plugin and specify it when running Vagrant commands. Users can also change the default provider by setting the VAGRANT_DEFAULT_PROVIDER environmental variable. References:
* Default Provider - Providers | Vagrant | HashiCorp Developer1
* Providers | Vagrant | HashiCorp Developer2
* How To Set Default Vagrant Provider to Virtualbox3
質問 # 52
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. virt-sparsi
- C. vire-wipe
- D. virt-rescue
- E. virt-svspre
- F. sysprep
正解:F
解説:
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
質問 # 53
Which statement is true regarding the Linux kernel module that must be loaded in order to use QEMU with hardware virtualization extensions?
- A. It must be loaded into the kernel of the host system only if the console of a virtual machine will be connected to a physical console of the host system
- B. It must be loaded into the kernel of the first virtual machine as it interacts with the QEMU bare metal hypervisor and is required to trigger the start of additional virtual machines
- C. It must be loaded into the Kernel of the host system in order to use the visualization extensions of the host system's CPU
- D. It must be loaded into the kernel of each virtual machine that will access files and directories from the host system's file system.
- E. It must be loaded into the kernel of each virtual machine to provide Para virtualization which is required by QEMU.
正解:C
質問 # 54
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. IO Cache
- B. Host Bus Adapters
- C. Memory
- D. Hard Disks
- E. Network Interfaces
正解:C
解説:
Explanation
Nested page table extensions, such as Intel Extended Page Table (EPT) or AMD Rapid Virtualization Indexing (RVI), are hardware features that facilitate the virtualization of memory. They allow the CPU to perform the translation of guest virtual addresses to host physical addresses in a single step, without the need for software-managed shadow page tables. This reduces the overhead and complexity of memory management for virtual machines, and improves their performance and isolation. Nested page table extensions do not directly affect the virtualization of other hardware components, such as network interfaces, host bus adapters, hard disks, or IO cache.
References:
* Second Level Address Translation - Wikipedia
* c - What is use of extended page table? - Stack Overflow
* Hypervisor From Scratch - Part 4: Address Translation Using Extended ...
質問 # 55
Which file format is used by libvirt to store configuration data?
- A. SQLite databases
- B. Java-like properties files
- C. XML files
- D. INI-style text files
- E. Text files containing key/value pairs
正解:C
解説:
Explanation
Libvirt uses XML files to store configuration data for objects in the libvirt API, such as domains, networks, storage, etc. This allows for ease of extension in future releases and validation of documents prior to usage.
Libvirt does not use any of the other file formats listed in the question. References:
* libvirt: XML Format
* LPIC-3 Virtualization and Containerization: Topic 305.1: Virtualization Concepts and Theory
質問 # 56
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. virt-sparsi
- C. sysprep
- D. vire-wipe
- E. virt-rescue
- F. virt-svspre
正解:F
質問 # 57
......
完全版最新の問題集PDFで最新305-300試験問題と解答:https://www.goshiken.com/Lpi/305-300-mondaishu.html
本日更新された最新の305-300のPDFは305-300無料お試し可能です:https://drive.google.com/open?id=14Xf9kdYlFVmmc6UgU3W_8-w_rjKRHJAz