
Try 305-300 Free Now! Real Exam Question Answers Updated [Oct 21, 2024]
Get Ready to Pass the 305-300 exam with Lpi Latest Practice Exam
Lpi 305-300 (LPIC-3 Exam 305: Virtualization and Containerization) Certification Exam is a professional certification exam that is designed for IT professionals who want to validate their expertise in virtualization and containerization technologies. 305-300 exam covers a wide range of topics, including virtual machine management, container management, network virtualization, storage virtualization, and cloud computing. It is a vendor-neutral certification, which means that it is not specific to any particular virtualization or containerization technology.
The LPI 305-300 exam, also known as the LPIC-3 Exam 305: Virtualization and Containerization, is a certification exam that tests the knowledge and skills of IT professionals in the field of virtualization and containerization. 305-300 exam is designed to validate the ability of candidates to design, deploy, and manage virtualization and containerization technologies using open-source software and tools.
NEW QUESTION # 24
How does Packer interact with system images?
- A. 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.
- B. 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.
- 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: A
NEW QUESTION # 25
What happens when the following command is executed twice in succession?
docker run -tid -v data:/data debian bash
- A. Both containers share the contents of the data volume, have full permissions to alter its content and mutually see their respective changes.
- B. The original content of the container image data is available in both containers, although changes stay local within each container.
- C. Each container is equipped with its own independent data volume, available at /data/ in the respective container.
- D. The container resulting from the second invocation can only read the content of /data/ and cannot change it.
- E. The second command invocation fails with an error stating that the volume data is already associated with a running container.
Answer: A
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 # 26
Which of the following commands lists all differences between the disk images vm1-snap.img and vm1.img?
- A. virt-history -a vm1-snap.img -A vm1.img
- B. virt-cp-in -a vm1-snap.img -A vm1.img
- C. virt-cmp -a vm1-snap.img -A vm1.img
- D. virt-delta -a vm1-snap.img -A vm1.img
- E. virt-diff -a vm1-snap.img -A vm1.img
Answer: E
Explanation:
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 ...
NEW QUESTION # 27
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 shrunk when files within the image are deleted.
- C. Sparse images allocate backend storage at the first usage of a block.
- D. Sparse images may consume an amount of space different from their nominal size.
- E. Sparse images are automatically resized when their maximum capacity is about to be exceeded.
Answer: C,D
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 # 28
Which of the following commands moves the libvirt domainweb1from the current host system to the host systemhost2?
- A. virsh node-update host1=-dom:web1 host2=+dom:web1
- B. virsh migrate web1 qemu+ssh://host2/system
- C. virsh patch web1 .Domain.Node=host2
- D. virsh pool-add host2 web1
- E. virsh cp .:web1 host2:web1
Answer: B
NEW QUESTION # 29
FILL BLANK
What command is used to run a process in a new Linux namespace? (Specify ONLY the command without any path or parameters.)
Answer:
Explanation:
unshare
NEW QUESTION # 30
What is the purpose ofcloud-init?
- A. Standardize the configuration of infrastructure services, such as load balancers or virtual firewalls in a cloud.
- B. Prepare the generic image of an laaS instance to fit a specific instance's configuration.
- C. Orchestrate the creation and start of multiple related laaS instances.
- D. Replace commonLinux inic systems, such as systemd or SysV init.
- E. Assign an laaSinstance to a specific computingnode within a cloud.
Answer: B
NEW QUESTION # 31
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. Memory
- C. Host Bus Adapters
- D. Hard Disks
- E. Network Interfaces
Answer: B
Explanation:
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 ...
NEW QUESTION # 32
Which of the following commands executes a command in a running LXC container?
- A. lxc-run
- B. lxc-batch
- C. lxc-enter
- D. lxc-eval
- E. lxc-accach
Answer: E
Explanation:
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.
NEW QUESTION # 33
What is the purpose ofcloud-init?
- A. Replace common Linux inic systems, such as systemd or SysV init.
- B. Assign an laaS instance to a specific computing node within a cloud.
- C. Standardize the configuration of infrastructure services, such as load balancers or virtual firewalls in a cloud.
- D. Prepare the generic image of an laaS instance to fit a specific instance's configuration.
- E. Orchestrate the creation and start of multiple related laaS instances.
Answer: D
Explanation:
Explanation
Cloud-init is a tool that processes configurations and runs through five stages during the initial boot of Linux VMs in a cloud. It allows users to customize a Linux VM as it boots for the first time, by applying user data to the instance. User data can include scripts, commands, packages, files, users, groups, SSH keys, and more.
Cloud-init can also interact with various cloud platforms and services, such as Azure, AWS, OpenStack, and others. The purpose of cloud-init is to prepare the generic image of an laaS instance to fit a specific instance's configuration, such as hostname, network, security, and application settings. References:
* Cloud-init - The standard for customising cloud instances
* Understanding cloud-init - Azure Virtual Machines
* Tutorial - Customize a Linux VM with cloud-init in Azure - Azure Virtual Machines
NEW QUESTION # 34
What is the purpose of the packer inspect subcommand?
- A. Display an overview of the configuration contained in a Packer template.
- B. Show usage statistics of a Packer image.
- C. List the artifacts created during the build process of a Packer image.
- D. Execute commands within a running instance of a Packer image.
- E. Retrieve files from an existing Packer image.
Answer: A
Explanation:
* The purpose of the packer inspect subcommand is to display an overview of the configuration contained in a Packer template1. A Packer template is a file that defines the various components a Packer build requires, such as variables, sources, provisioners, and post-processors2. The packer inspect subcommand can help you quickly learn about a template without having to dive into the HCL (HashiCorp Configuration Language) itself1. The subcommand will tell you things like what variables a template accepts, the sources it defines, the provisioners it defines and the order they'll run, and more1.
* The other options are not correct because:
* A) Retrieve files from an existing Packer image. This is not the purpose of the packer inspect subcommand. To retrieve files from an existing Packer image, you need to use the packer scp subcommand, which copies files from a running instance of a Packer image to your local machine2.
* B) Execute commands within a running instance of a Packer image. This is not the purpose of the packer inspect subcommand. To execute commands within a running instance of a Packer image, you need to use the packer ssh subcommand, which connects to a running instance of a Packer image via SSH and runs the specified command2.
* C) List the artifacts created during the build process of a Packer image. This is not the purpose of the packer inspect subcommand. To list the artifacts created during the build process of a Packer image, you need to use the packer build subcommand with the -machine-readable flag, which outputs the build information in a machine-friendly format that includes the artifact details2.
* D) Show usage statistics of a Packer image. This is not the purpose of the packer inspect subcommand. To show usage statistics of a Packer image, you need to use the packer console subcommand with the -stat flag, which launches an interactive console that allows you to inspect and modify variables, sources, and functions, and displays the usage statistics of the current session2. References: 1: packer inspect - Commands | Packer | HashiCorp Developer 2:
Commands | Packer | HashiCorp Developer
NEW QUESTION # 35
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. --alias=isolated_nw
- C. --network=isolated_nw
- D. --eth0=isolated_nw
- E. --attach=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 # 36
In order to use the optiondom0_memto limit the amount of memory assigned to the Xen Domain-0, where must this option be specified?
- A. In the bootloader configuration, when Xen is booted.
- B. In the configuration file /etc/xen/Domain-0.cfg, when Xen starts.
- C. In its Makefile, when Xen is built.
- D. In its .config file, when the Domain-0 kernel is built.
- E. In any of Xen's global configuration files.
Answer: A
Explanation:
Explanation
The option dom0_mem is used to set the initial and maximum memory size of the Domain-0, which is the privileged domain that starts first and manages the unprivileged domains (DomU) in Xen. The option dom0_mem must be specified in the bootloader configuration, such as GRUB or GRUB2, when Xen is booted.
This ensures that the Domain-0 kernel can allocate memory for storing memory metadata and network related parameters based on the boot time amount of memory. If the option dom0_mem is not specified in the bootloader configuration, the Domain-0 will use all the available memory on the host system by default, which may cause performance and security issues. References:
* Managing Xen Dom0s CPU and Memory
* Xen Project Best Practices
* Dom0 Memory - Where It Has Not Gone
NEW QUESTION # 37
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. namespace
- C. cgroup
- D. Ixc
- E. proc
Answer: A,D
NEW QUESTION # 38
Which command within virsh lists the virtual machines that are running on the current host?
- A. I view
- B. show
- C. list-vm
- D. list
- E. list-all
Answer: D
Explanation:
Explanation
The command virsh list is used to list all running domains (VMs) on the current host. The command virsh list
--all can be used to list both active and inactive domains. The other options are not valid virsh commands. The command virsh list is a basic command that lists all running domains (VMs). You can also list all configured VMs by adding the --all option. This is useful if you want to see all VMs configured in the target hypervisor that you can use on subsequent commands1. References:
* 1: 8 Linux virsh subcommands for managing VMs on the command line | Enable Sysadmin.
NEW QUESTION # 39
Which of the following commands boots a QEMU virtual machine using hardware virtualization extensions?
- A. qemu-hw -create -drive file=debian.img -cdrom debian.iso -m 1024 -boot d
- B. qemu -accel kvm -drive file-debian.img -cdrom debian.iso -m 1024 -boot d
- C. qvm start -vmx -drive file=debian.img -cdrom debian.iso -m 1024 -boot d
- D. vm -kvm -drive file=debian.img -cdrom debian.iso -m 1024 -boot d
- E. qvirt -create -drive file=debian.img -cdrom debian.iso -m 1024 -boot d -driver hvm
Answer: B
NEW QUESTION # 40
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. touch /vms/.libvirtpool
- C. qemu-img pool vms:/vms
- D. libvirt-poolctl new --name=/vms --type=dir --path=/vms
- E. dd if=/dev/zero of=/vms bs=1 count=0 flags=name:vms
Answer: A
Explanation:
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
NEW QUESTION # 41
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 builds the images locally and copies them to only those Swarm nodes which run the service.
- B. docker stack transfers the image from its local Docker cache to each Swarm node.
- 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 passes the images to the Swarm master which distributes the images to all other Swarm nodes.
- E. docker stack triggers the build process for the images on all nodes of the Swarm.
Answer: C
Explanation:
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
NEW QUESTION # 42
......
The LPI 305-300 exam, also known as LPIC-3 Exam 305: Virtualization and Containerization, is designed to test the proficiency of IT professionals in virtualization and containerization technologies. 305-300 exam is one of the three exams required to earn the LPIC-3 certification, which is a highly sought-after certification in the IT industry. The LPIC-3 certification is designed for professionals who have an advanced level of Linux administration skills and want to demonstrate their mastery of Linux and open-source technologies.
Pass Your Next 305-300 Certification Exam Easily & Hassle Free: https://www.examdiscuss.com/Lpi/exam/305-300/
Get Prepared for Your 305-300 Exam With Actual Lpi Study Guide!: https://drive.google.com/open?id=1bmcJ-cxIKsvuIa037nBp3LeIUQ5rn3xH