305-300リアルな試験問題305-300練習問題集 [Q14-Q38]

Share

305-300リアルな試験問題305-300練習問題集

厳密検証された305-300試験問題集と解答で無料提供の305-300問題と正解付き


LPI 305-300試験は、仮想化とコンテナ化に焦点を当てた認定テストです。この試験は、IT業界を急速に変革しているこれら2つの重要な技術で個人の知識とスキルをテストするように設計されています。この認定は、Linuxシステムをよく理解し、仮想化とコンテナ化の専門知識を獲得しようとしている経験豊富な専門家を対象としています。


LPIC-3試験305:仮想化およびコンテナ化認定試験は高度なレベルの試験であり、Linuxシステムの管理の概念と実践について強力な知識を持っている必要があります。また、候補者は、Linuxシステムで仮想化およびコンテナ化技術の管理において実践的な経験を持つ必要があります。認定試験は、仮想化とコンテナ化技術のスキルと知識を検証し、潜在的な雇用主に専門知識を実証したいITの専門家に最適です。

 

質問 # 14
Which of the following commands executes a command in a running LXC container?

  • A. lxc-batch
  • B. lxc-run
  • C. lxc-accach
  • D. lxc-enter
  • 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.


質問 # 15
Which of the following commands moves the libvirt domainweb1from the current host system to the host systemhost2?

  • A. virsh migrate web1 qemu+ssh://host2/system
  • B. virsh pool-add host2 web1
  • C. virsh node-update host1=-dom:web1 host2=+dom:web1
  • D. virsh patch web1 .Domain.Node=host2
  • E. virsh cp .:web1 host2:web1

正解:A

解説:
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


質問 # 16
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 garbage-collect
  • E. docker volume prune

正解:E

解説:
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.


質問 # 17
Which of the following statements are true about sparse images in the context of virtual machine storage?
(Choose two.)

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

正解:C、E

解説:
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").


質問 # 18
What is the purpose of capabilities in the context of container virtualization?

  • A. Prevent processes from performing actions which might infringe the container.
  • B. Restrict the disk space a container can consume.
  • C. Enable memory deduplication to cache files which exist in multiple containers.
  • D. Allow regular users to start containers with elevated permissions.
  • E. Map potentially dangerous system calls to an emulation layer provided by the container virtualization.

正解:A


質問 # 19
In an IaaS cloud, what is a common method for provisioning new computing instances with an operating system and software?

  • A. Each new instance contains a minimal live system running from a virtual CD as the basis from which the administrator deploys the target operating system.
  • B. Each new instance is connected to the installation media of a Linux distribution and provides access to the installer by logging in via SSH.
  • C. Each new instance is a clone of another currently running instance that includes all the software, data and state of the original instance.
  • D. Each new instance is connected via a VPN with the computer that started the provisioning and tries to PXE boot from that machine.
  • E. Each new instance is created based on an image file that contains the operating system as well as software and default configuration for a given purpose.

正解:E


質問 # 20
Which of the following commands executes a command in a running LXC container?

  • A. lxc-batch
  • B. lxc-run
  • C. lxc-accach
  • D. lxc-enter
  • E. lxc-eval

正解:C


質問 # 21
Which of the following statements are true regarding a Pod in Kubernetes? (Choose two.)

  • A. All containers of a Pod run on the same node.
  • B. A Pod is the smallest unit of workload Kubernetes can run.
  • C. Pods are always created automatically and cannot be explicitly configured.
  • D. When a Pod fails, Kubernetes restarts the Pod on another node by default.
  • E. systemd is used to manage individual Pods on the Kubernetes nodes.

正解:A、B

解説:
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


質問 # 22
Which of the following values are valid in the type attribute of a<domain>element in a libvirt domain definition? (Choose two.)

  • A. namespace
  • B. cgroup
  • C. proc
  • D. kvm
  • E. Ixc

正解:D、E


質問 # 23
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 is available for Linux only and requires the source code of the currently running Linux kernel to be available.
  • C. It requires dedicated shared storage, as it cannot store virtual machine disk images locally on block devices of the virtualization host.
  • 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.

正解:D


質問 # 24
Which of the following statements are true about sparse images in the context of virtual machine storage?
(Choose two.)

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

正解:C、E


質問 # 25
Which of the following commands moves the libvirt domainweb1from the current host system to the host systemhost2?

  • A. virsh migrate web1 qemu+ssh://host2/system
  • B. virsh pool-add host2 web1
  • C. virsh node-update host1=-dom:web1 host2=+dom:web1
  • D. virsh patch web1 .Domain.Node=host2
  • E. virsh cp .:web1 host2:web1

正解:A


質問 # 26
How can data be shared between several virtual machines running on the same Linux-based host system?

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

正解:D

解説:
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


質問 # 27
Which of the following statements about the commandlxc-checkpointis correct?

  • A. It doubles the memory consumption of the container.
  • B. It writes the status of the container to a file.
  • C. It creates a clone of a container.
  • D. It only works on stopped containers.
  • E. It creates a container image based on an existing container.

正解:B

解説:
Explanation
The command lxc-checkpoint is used to checkpoint and restore containers. Checkpointing a container means saving the state of the container, including its memory, processes, file descriptors, and network connections, to a file or a directory. Restoring a container means resuming the container from the saved state, as if it was never stopped. Checkpointing and restoring containers can be useful for various purposes, such as live migration, backup, debugging, or snapshotting. The command lxc-checkpoint has the following syntax:
lxc-checkpoint {-n name} {-D path} [-r] [-s] [-v] [-d] [-F]
The options are:
* -n name: Specify the name of the container to checkpoint or restore.
* -D path: Specify the path to the file or directory where the checkpoint data is dumped or restored.
* -r, --restore: Restore the checkpoint for the container, instead of dumping it. This option is incompatible with -s.
* -s, --stop: Optionally stop the container after dumping. This option is incompatible with -r.
* -v, --verbose: Enable verbose criu logging. Only available when providing -r.
* -d, --daemon: Restore the container in the background (this is the default). Only available when providing -r.
* -F, --foreground: Restore the container in the foreground. Only available when providing -r.
The command lxc-checkpoint uses the CRIU (Checkpoint/Restore In Userspace) tool to perform the checkpoint and restore operations. CRIU is a software that can freeze a running application (or part of it) and checkpoint it to a hard drive as a collection of files. It can then use the files to restore and run the application from the point it was frozen at1.
The other statements about the command lxc-checkpoint are not correct. It does not create a clone or an image of a container, nor does it double the memory consumptionof the container. It can work on both running and stopped containers, depending on the options provided. References:
* Linux Containers - LXC - Manpages - lxc-checkpoint.12
* lxc-checkpoint(1) - Linux manual page - man7.org3
* CRIU4


質問 # 28
Which of the following services can QEMU provide in a user network? (Choose three.)

  • A. CIFS
  • B. TFTP
  • C. BGP
  • D. AppleTalk
  • E. DHCP

正解:A、B、E


質問 # 29
Which of the following devices exist by default in an LXC container? (Choose three.)

  • A. /dev/root
  • B. /dev/log
  • C. /dev/urandom
  • D. /dev/console
  • E. /dev/kmem

正解:B、C、D

解説:
Explanation
LXC (Linux Containers) is a lightweight virtualization technology that allows multiple isolated Linux systems (containers) to run on the same host. LXC uses Linux kernel features such as namespaces, cgroups, and AppArmor to create and manage containers. Each container has its own file system, network interfaces, process tree, and resource limits. However, containers share the same kernel and hardware with the host, which makes them more efficient and faster than full virtualization.
By default, an LXC container has a minimal set of devices that are needed for its operation. These devices are created by the LXC library when the container is started, and are removed when the container is stopped. The default devices are:
* /dev/log: This is a Unix domain socket that connects to the syslog daemon on the host. It allows the container to send log messages to the host's system log1.
* /dev/console: This is a character device that provides access to the container's console. It is usually connected to the host's terminal or a file. It allows the container to interact with the user or the host's init system12.
* /dev/urandom: This is a character device that provides an unlimited source of pseudo-random numbers. It is used by various applications and libraries that need randomness, such as cryptography, UUID generation, and hashing13.
The other devices listed in the question do not exist by default in an LXC container. They are either not needed, not allowed, or not supported by the container's namespace or cgroup configuration. These devices are:
* /dev/kmem: This is a character device that provides access to the kernel's virtual memory. It is not needed by the container, as it can access its own memory through the /proc filesystem. It isalso not allowed by the container, as it would expose the host's kernel memory and compromise its security4.
* /dev/root: This is a symbolic link that points to the root device of the system. It is not supported by the container, as it does not have a separate root device from the host. The container's root file system is mounted from a directory, an image file, or a loop device on the host5.
References:
* Linux Containers - LXC - Manpages - lxc.container.conf.5
* Linux Containers - LXC - Getting started
* Random number generation - Wikipedia
* /dev/kmem - Wikipedia
* Linux Containers - LXC - Manpages - lxc.container.conf.5


質問 # 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. virsh pool-create-as vms dir --target /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. qemu-img pool vms:/vms
  • E. touch /vms/.libvirtpool

正解:A

解説:
Explanation
The command virsh pool-create-as vms dir --target /vms creates and starts a transient storage pool named vms of type dir with the target directory /vms12. This command resolves the issue of the storage pool not found error, as it makes the existing directory /vms visible to libvirt as a storage pool. The other commands are invalid because:
* dd if=/dev/zero of=/vms bs=1 count=0 flags=name:vms is not a valid command syntax. The dd command does not take a flags argument, and the output file /vms should be a regular file, not a directory3.
* libvirt-poolctl new --name=/vms --type=dir --path=/vms is not a valid command name. There is no such command as libvirt-poolctl in the libvirt package4.
* qemu-img pool vms:/vms is not a valid command syntax. The qemu-img command does not have a pool subcommand, and the vms:/vms argument is not a valid image specification5.
* touch /vms/.libvirtpool is not a valid command to create a storage pool. The touch command only creates an empty file, and the .libvirtpool file is not recognized by libvirt as a storage pool configuration file6.
References:
* 1: virsh - difference between pool-define-as and pool-create-as - Stack Overflow
* 2: dd(1) - Linux manual page - man7.org
* 3: 12.3.3. Creating a Directory-based Storage Pool with virsh - Red Hat Customer Portal
* 4: libvirt - Linux Man Pages (3)
* 5: qemu-img(1) - Linux manual page - man7.org
* 6: touch(1) - Linux manual page - man7.org


質問 # 31
Which of the following statements is true regarding networking with libvirt?

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

正解:D


質問 # 32
Which of the following statements about the commandlxc-checkpointis correct?

  • A. It doubles the memory consumption of the container.
  • B. It writes the status of the container to a file.
  • C. It creates a clone of a container.
  • D. It only works on stopped containers.
  • E. It creates a container image based on an existing container.

正解:B


質問 # 33
Which of the following statements are true regarding a Pod in Kubernetes? (Choose two.)

  • A. All containers of a Pod run on the same node.
  • B. A Pod is the smallest unit of workload Kubernetes can run.
  • C. Pods are always created automatically and cannot be explicitly configured.
  • D. When a Pod fails, Kubernetes restarts the Pod on another node by default.
  • E. systemd is used to manage individual Pods on the Kubernetes nodes.

正解:A、B


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

正解:B、E


質問 # 35
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. Both containers share the contents of the data volume, have full permissions to alter its content and mutually see their respective changes.
  • C. The original content of the container image data is available in both containers, although changes stay local within each container.
  • D. The second command invocation fails with an error stating that the volume data is already associated with a running container.
  • E. Each container is equipped with its own independent data volume, available at /data/ in the respective container.

正解:B

解説:
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.


質問 # 36
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"

正解:C、D


質問 # 37
What is the default provider of Vagrant?

  • A. hyperv
  • B. virtualbox
  • C. lxc
  • D. docker
  • E. vmware_workstation

正解:B

解説:
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


質問 # 38
......

無料でゲット!高評価Lpi 305-300試験問題集を今すぐダウンロード!:https://www.passtest.jp/Lpi/305-300-shiken.html

あなたを合格させる305-300無料最新問題集でLpi練習テストしよう:https://drive.google.com/open?id=13U1fx5R--GOBRfdwt1-w54K7uikCfUHC