Courseiva

LPIC-3 Exam 305: Virtualization and Containerization (305-300) (305-300) (305-300) — Questions 76150

194 questions total · 3pages · All types, answers revealed

Page 1

Page 2 of 3

Page 3
76
MCQmedium

Which QEMU-KVM feature allows you to save the state of a VM to a file and resume it later?

A.virsh save
B.virsh snapshot
C.virsh checkpoint
D.virsh suspend
AnswerA

Saves the VM state to a file.

Why this answer

The 'virsh save' command creates a state file, which can be restored with 'virsh restore'.

77
MCQmedium

You need to attach a new block device to a running VM. What virsh command achieves this?

A.virsh attach-device-file vm_name /path/to/img
B.virsh add-device vm_name /path/to/img
C.virsh hotplug-disk vm_name /path/to/img
D.virsh attach-disk vm_name /path/to/img vda
AnswerD

Correct syntax for attaching a disk.

Why this answer

virsh attach-disk is the correct command to hot-plug a disk.

78
MCQmedium

You need to inspect the configuration of an LXC container named 'web'. Which command should you use?

A.lxc-info -n web
B.lxc-check
C.lxc-ls
D.lxc-config
AnswerA

Displays status and configuration info for 'web'.

Why this answer

'lxc-info -n web' displays information about the specified container.

79
MCQeasy

In the context of virtualization, what does 'ballooning' refer to?

A.Scaling network bandwidth for a VM
B.Increasing the number of virtual CPUs
C.Dynamically resizing guest memory
D.Compressing disk images on the fly
AnswerC

This is the definition of memory ballooning.

Why this answer

Memory ballooning allows the hypervisor to reclaim unused RAM from a guest VM and reallocate it to other VMs.

80
MCQmedium

You need to convert a raw disk image to QCOW2 format to enable snapshotting. Which command is correct?

A.qemu-img convert -i raw -o qcow2 source.img target.qcow2
B.virsh image-convert source.img target.qcow2
C.qemu-img change -f raw -t qcow2 source.img
D.qemu-img convert -f raw -O qcow2 source.img target.qcow2
AnswerD

Correct format and syntax for conversion.

Why this answer

qemu-img convert -f raw -O qcow2 source.img target.qcow2 is the standard syntax.

81
Multi-Selectmedium

Which TWO of the following commands can be used to manage virtual networks in libvirt?

Select 2 answers
A.virsh net-define
B.virsh net-config
C.virsh net-start-all
D.virsh net-status
E.virsh net-list
AnswersA, E

Defines a network from XML.

Why this answer

virsh net-list and virsh net-define are standard commands.

82
Multi-Selecthard

Which THREE items are typically included in an OpenVZ configuration file?

Select 3 answers
A.BIOS settings
B.User Beancounters (resource limits)
C.OS template reference
D.Networking parameters
E.Kernel source code
AnswersB, C, D

UBC define resource constraints for the container.

Why this answer

OpenVZ configs contain networking definitions, resource limits (UBC), and OS template references.

83
Multi-Selectmedium

Which TWO of the following are valid ways to trigger provisioning in Vagrant?

Select 2 answers
A.vagrant provision
B.vagrant start
C.vagrant reload --provision
D.vagrant apply
E.vagrant up --provision
AnswersA, E

Triggers provisioning on an active VM.

Why this answer

'vagrant up --provision' runs provisioners during startup, and 'vagrant provision' runs them on a running machine.

84
MCQeasy

Which command is used to list all defined virtual networks in Libvirt?

A.brctl show
B.virsh net-list --all
C.virsh domiflist
D.virsh list-networks
AnswerB

This is the correct command to list networks.

Why this answer

virsh net-list --all displays both active and inactive virtual networks.

85
MCQhard

You need to enable hugepages for a VM in libvirt to improve memory performance. What XML entry do you add?

A.<system-memory hugepages='true'/>
B.<memoryBacking><hugepages/></memoryBacking>
C.<memory mode='hugepages'/>
D.<hugepages enabled='yes'/>
AnswerB

Correct XML for hugepages.

Why this answer

The <memoryBacking> element with <hugepages/> is required.

86
MCQhard

You are troubleshooting a problem where an LXC container cannot access its own /dev/null. What is a common cause in a non-root container?

A.Missing mknod permission
B.Wrong kernel version
C.Host kernel panic
D.Insufficient RAM
AnswerA

Containers often need to be able to create nodes if they aren't provided by default.

Why this answer

Lack of device node creation in the container's /dev directory or improper cgroup permissions often causes this.

87
MCQeasy

What is the default behavior of Vagrant when a box is not found locally on the host machine?

A.It prompts for a path
B.It downloads it from the Vagrant Cloud
C.It creates an empty machine
D.It fails immediately
AnswerB

Vagrant tries to download it automatically.

Why this answer

Vagrant automatically attempts to download the specified box from HashiCorp's Vagrant Cloud (or configured registry).

88
MCQmedium

Which tool is commonly used alongside Packer to validate the configuration file for syntax errors before attempting a build?

A.packer fmt
B.packer lint
C.packer validate
D.packer check
AnswerC

This is the standard validation command.

Why this answer

'packer validate' is the built-in command to check for syntax and configuration errors in Packer files.

89
MCQmedium

You are configuring an LXC container and need to grant it access to a specific host character device without running the container in privileged mode. Which configuration option in the container's config file should you use?

A.lxc.cgroup2.devices.allow
B.lxc.cap.keep
C.lxc.mount.entry
D.lxc.hook.pre-start
AnswerA

This allows the container to access the specified device node.

Why this answer

The lxc.cgroup2.devices.allow directive is the standard way to whitelist specific hardware devices for a container in cgroup2-based environments.

90
MCQhard

In cloud-init, which syntax is required at the very beginning of the configuration file to ensure it is recognized as a cloud-config script?

A.#cloud-config
B.#!/bin/bash
C.#cloud-init
D.---
AnswerA

This is the required header.

Why this answer

Cloud-init scripts must start with the '#cloud-config' directive to be correctly parsed as YAML configuration.

91
MCQmedium

You are using a BSD Jail and want to limit the filesystem access of the jail to a specific directory tree. Which utility or configuration mechanism is primarily used to achieve this?

A.mount -t nullfs
B.jail_root_dir
C.chroot
D.jail.conf path parameter
AnswerD

This defines the directory tree the jail is restricted to.

Why this answer

The 'path' configuration parameter in the jail.conf file defines the root directory of the jail.

92
MCQhard

In a Docker swarm, which mode of service publishing allows incoming traffic to be load-balanced across all healthy container replicas?

A.macvlan
B.ingress
C.overlay
D.host
AnswerB

This enables the routing mesh for load balancing.

Why this answer

The 'ingress' network mode in Swarm allows external traffic to hit any node and be routed to a container via the routing mesh.

93
MCQeasy

Which command lists all Docker images currently on the host?

A.docker ps
B.docker show
C.docker images
D.docker list
AnswerC

This lists local images.

Why this answer

'docker images' or 'docker image ls' lists images.

94
Multi-Selectmedium

Which TWO of the following are valid network modes for a libvirt virtual network?

Select 2 answers
A.switch
B.bridge
C.peer
D.nat
E.router
AnswersB, D

Standard network mode.

Why this answer

NAT and bridge are standard libvirt network modes.

95
MCQhard

When cleaning up Docker resources, which command will remove all stopped containers, unused networks, and dangling images in one step?

A.docker container prune
B.docker volume prune
C.docker image prune -a
D.docker cleanup
E.docker system prune
AnswerE

This command cleans up the entire environment of unused resources.

Why this answer

docker system prune removes all unused data, which is the most efficient cleanup method.

96
MCQmedium

When using Vagrant with multiple machines in a single Vagrantfile, how do you define individual configurations?

A.config.vm.box_set
B.config.vm.define :name
C.config.vm.instance
D.config.vm.multi
AnswerB

This allows naming and configuring separate machines.

Why this answer

You use the 'config.vm.define' block to distinguish between multiple machines within one configuration file.

97
MCQhard

You are using an overlay network in Docker Swarm. What is the standard protocol used for the control plane and data plane communication between nodes?

A.BGP
B.IPsec
C.GRE
D.VXLAN
AnswerD

This is the encapsulation protocol for Docker overlay.

Why this answer

VXLAN is the standard encapsulation protocol used by Docker overlay networks.

98
MCQeasy

What does the term 'KVM' stand for?

A.Kernel-based Virtual Machine
B.K-Hypervisor Virtual Machine
C.Kernel Virtual Module
D.Kilo-Virtual Machine
AnswerA

Official name for KVM.

Why this answer

Kernel-based Virtual Machine.

99
Multi-Selecthard

Which THREE of the following are required for a successful live migration between two KVM hosts using libvirt?

Select 3 answers
A.Shared storage
B.SSH connectivity between hosts
C.Identical network card models
D.Matching guest kernel versions
E.Identical CPU models or CPU pass-through
AnswersA, B, E

Essential for keeping the disk accessible.

Why this answer

Shared storage, SSH access, and matching CPU models are critical requirements for a smooth live migration.

100
MCQmedium

Which utility is best for creating a new libvirt storage pool?

A.virsh pool-create
B.virt-pool-builder
C.virsh pool-define-as
D.virsh add-pool
AnswerC

Command for creating pool XML.

Why this answer

virsh pool-define-as is the command to create a pool definition.

101
MCQmedium

You need to limit the amount of CPU shares a Docker container can utilize. Which flag should be used?

A.--cpu-limit
B.--cpus
C.--max-cpu
D.--cpu-shares
E.--cpu-weight
AnswerD

This allows setting a relative weight for CPU access.

Why this answer

The --cpu-shares flag sets the relative CPU weight of a container.

102
MCQeasy

Which Docker command is used to display the resource usage (CPU, memory) of running containers?

A.docker stats
B.docker top
C.docker usage
D.docker info
AnswerA

This displays the live resource consumption.

Why this answer

'docker stats' provides a real-time stream of container resource usage statistics.

103
MCQmedium

Which cloud-init module is responsible for setting the hostname of the instance during the initial boot process?

A.system_name
B.hostname
C.network_config
D.set_hostname
AnswerB

This is the correct module.

Why this answer

The 'hostname' module in cloud-init is designed to update the system hostname based on the provided configuration.

104
MCQhard

When configuring a Docker volume that needs to be shared between multiple containers, which storage driver storage path is recommended to ensure persistent data availability if the host reboots?

A.-v /host/path:/container/path
B.--link
C.--tmpfs
D.--volume-driver=none
E.--memory
AnswerA

Bind mounts provide persistent access to host filesystems.

Why this answer

Using a named volume or a bind mount to a host directory ensures persistence beyond the container lifecycle.

105
Multi-Selecthard

Which THREE configuration items can be managed by LXC cgroups?

Select 3 answers
A.CPU shares
B.User permissions
C.Device access
D.Memory limits
E.DNS settings
AnswersA, C, D

Controls CPU priority.

Why this answer

Cgroups manage memory, CPU, and device access.

106
Multi-Selectmedium

Which TWO of the following are valid ways to manage storage pools using virsh?

Select 2 answers
A.virsh pool-mount
B.virsh pool-resize
C.virsh pool-create-as
D.virsh pool-define-as
E.virsh pool-format
AnswersC, D

Creates and starts a pool immediately.

Why this answer

The 'virsh pool-create-as' and 'virsh pool-define-as' commands are the standard ways to manage pools.

107
MCQmedium

What is the default location for libvirt domain configuration XML files?

A./etc/libvirt/qemu/
B./var/lib/libvirt/domains/
C./etc/libvirt/networks/
D./usr/share/libvirt/
AnswerA

Directory containing domain XMLs.

Why this answer

/etc/libvirt/qemu/ contains the XML definitions for KVM/QEMU domains.

108
Multi-Selecthard

Which TWO components are defined in a Packer 'build' block?

Select 2 answers
A.builders
B.plugins
C.sources
D.variables
E.provisioners
AnswersC, E

Defines the builder(s) to use.

Why this answer

A build block contains the 'sources' (builders) and 'provisioners' to be executed on those sources.

109
Multi-Selecthard

You are optimizing a Dockerfile to reduce image size. Which THREE of the following practices are recommended?

Select 3 answers
A.Use the FROM latest tag for all base images
B.Always install recommended packages for security
C.Remove /var/lib/apt/lists/* after installing packages
D.Use multi-stage builds to discard build-time dependencies
E.Use a single RUN command to chain multiple commands with &&
AnswersC, D, E

Cleaning the package cache reduces image size significantly.

Why this answer

Multi-stage builds, minimizing layers, and cleaning up caches are standard practices.

110
MCQeasy

Which file system structure is typically used for QEMU virtual disk images when using LVM?

A./mnt/storage/disk.qcow2
B./dev/vg_name/lv_name
C./dev/sda1
D./var/lib/libvirt/images/disk.img
AnswerB

Path to an LVM logical volume.

Why this answer

LVM logical volumes (LV) can be used directly as backing storage for VM disks.

111
MCQhard

You are troubleshooting a performance issue and want to pin a VM process to specific physical CPU cores. Which XML element is used?

A.<pinning vcpu='0' cores='0'/>
B.<cpu-pinning vcpu='0' cpu='0'/>
C.<cputune><vcpupin vcpu='0' cpuset='0-1'/></cputune>
D.<affinity vcpu='0' host-cpu='0'/>
AnswerC

Correct syntax for CPU pinning.

Why this answer

The <cputune> and <vcpupin> elements are used for CPU pinning.

112
MCQmedium

Which command is used to list all active running domains?

A.virsh domlist
B.virsh status
C.virsh list --all
D.virsh list
AnswerD

Lists active domains.

Why this answer

virsh list lists active domains by default.

113
MCQmedium

In the context of container orchestration, what is the role of a 'sidecar' container?

A.To provide auxiliary services like logging or monitoring for the main container
B.To act as a load balancer for the cluster
C.To store persistent data for the primary container
D.To run in a separate network namespace
E.To replace the main container when it crashes
AnswerA

Sidecars are commonly used for logging, proxies, or configuration synchronization.

Why this answer

A sidecar container runs alongside the main application container within the same pod to extend or enhance its functionality.

114
MCQhard

When using Packer with the QEMU builder, what does the 'format' option in the 'qemu' builder define?

A.The output image format
B.The filesystem type
C.The hypervisor type
D.The guest OS type
AnswerA

This sets the resulting disk image format.

Why this answer

The 'format' parameter specifies the image format to be produced, such as 'qcow2' or 'raw'.

115
Multi-Selectmedium

Which THREE of the following are valid Libvirt storage pool types?

Select 3 answers
A.ram
B.iscsi
C.lvm
D.usb
E.dir
AnswersB, C, E

iSCSI targets are supported as storage backends.

Why this answer

Libvirt supports various backends for storage including directories, LVM volume groups, and iSCSI targets.

116
MCQhard

You are troubleshooting a libvirt network issue where the virtual machines cannot reach the external gateway. The virtual network uses a NAT configuration. Which file would you inspect to verify the iptables rules generated by libvirt for this network?

A./var/lib/libvirt/network/default.xml
B./etc/sysconfig/network-scripts/ifcfg-virbr0
C./etc/libvirt/qemu/networks/default.xml
D./etc/iptables/rules.v4
AnswerC

The XML file defines the network and triggers the iptables rule generation.

Why this answer

Libvirt manages iptables rules dynamically, but the configuration is stored in the libvirt network XML files in /etc/libvirt/qemu/networks/ and the resulting rules appear in the NAT table.

117
MCQhard

You are debugging a Docker network issue where containers on different hosts cannot communicate. Which network driver is specifically designed to support multi-host overlay networking?

A.bridge
B.macvlan
C.ipvlan
D.host
E.overlay
AnswerE

The overlay driver enables multi-host container connectivity.

Why this answer

The 'overlay' driver in Docker creates a distributed network among multiple Docker daemon hosts.

118
MCQmedium

You want to optimize disk I/O performance for a KVM guest. Which bus type should you configure in the libvirt domain XML for the virtual disk?

A.scsi
B.usb
C.ide
D.virtio
AnswerD

virtio provides optimal I/O performance via paravirtualization.

Why this answer

virtio is the paravirtualized driver set that provides the highest performance for KVM guests.

119
MCQeasy

Which command-line tool is primarily used to inspect the metadata and configuration of a running Docker container?

A.docker ps
B.docker stats
C.docker info
D.docker inspect
E.docker describe
AnswerD

This command returns the configuration and state of the object.

Why this answer

docker inspect provides detailed information on containers and images in JSON format.

120
MCQhard

When migrating a Libvirt domain using 'virsh migrate --live', which option must be specified to ensure the guest's memory state is copied over the network?

A.--copy-storage-all
B.--shared-storage
C.--migrate-disk
D.--memory-copy
AnswerA

This flag forces the migration of non-shared disk images.

Why this answer

The --live option manages the memory transfer, but the --copy-storage-all or --block-incremental option is required if the disks are not on shared storage.

121
MCQhard

In a Xen environment, which command would you use to change the number of VCPUs allocated to a running domain 'dom1' to 4?

A.virsh setvcpus dom1 4
B.xl mem-set dom1 4
C.xl vcpu-set dom1 4
D.xm set-vcpu dom1 4
AnswerC

Correct command syntax to change active VCPUs.

Why this answer

xl vcpu-set is the standard command in modern Xen (xl toolstack) to adjust vCPUs.

122
Multi-Selectmedium

Which THREE of the following are components of the Docker architecture?

Select 3 answers
A.Docker Daemon
B.Docker Kernel
C.Docker Client
D.Docker GUI
E.Docker Registry
AnswersA, C, E

The core engine managing objects.

Why this answer

Docker client, daemon, and registry are the three core components.

123
MCQhard

You need to migrate a running QEMU VM to a remote host using live migration. Which command-line argument for QEMU-KVM initiates a migration to a target host at 192.168.1.50 on port 4444?

A.-remote 192.168.1.50:4444
B.-migrate tcp:192.168.1.50:4444
C.-live-migrate 192.168.1.50:4444
D.-incoming tcp:192.168.1.50:4444
AnswerB

Correct syntax for initiating migration via CLI.

Why this answer

The -migrate command or the migrate QMP command is used, but for the CLI argument, the migration URI must be defined.

124
MCQmedium

You need to create a snapshot of a QCOW2 disk image without stopping the virtual machine. Which qemu-img sub-command should be used?

A.qemu-img create -f qcow2 -b image.qcow2 snapshot.qcow2
B.qemu-img snapshot -c snapshot_name image.qcow2
C.virsh snapshot-create-as --domain vm_name --name snap1 --disk-only
D.virsh checkpoint-create vm_name
AnswerC

virsh is the correct tool for live snapshots of libvirt domains.

Why this answer

qemu-img snapshot -c creates a snapshot, but it should only be done on offline images. For live snapshots, virsh snapshot-create is required.

125
MCQhard

You are using QEMU to emulate an ARM architecture on an x86 host. Which binary would you typically use to execute this?

A.qemu-x86_64-arm
B.qemu-system-arm
C.qemu-arm
D.qemu-system-x86_64
AnswerB

Correct binary for ARM system emulation.

Why this answer

qemu-system-arm is the specific binary for ARM system emulation.

126
MCQmedium

Which command allows you to enter an existing running container and execute a new command inside it?

A.docker exec
B.docker commit
C.docker attach
D.docker run
AnswerA

This starts a new process in the target container.

Why this answer

'docker exec' is the standard command to run a new process in a running container.

127
Multi-Selecthard

Which THREE of the following are legitimate security concerns when managing a virtualization host?

Select 3 answers
A.Unencrypted VNC connections
B.Unauthorized access to the libvirt socket
C.Network interface speed
D.Guest-to-host breakout exploits
E.Hard drive fragmentation
AnswersA, B, D

Can expose guest screen data.

Why this answer

Insecure VNC access, unauthorized host access, and guest-to-host escapes are all major concerns.

128
MCQhard

Which option for 'qemu-img create' allows you to create a preallocated image?

A.-o preallocation=full
B.--prealloc=true
C.-p full
D.-f preallocated
AnswerA

Specifies full preallocation.

Why this answer

-o preallocation=full creates a fully preallocated file.

129
Multi-Selecthard

Which TWO pieces of information does Packer require to build an image for an existing cloud environment?

Select 2 answers
A.API credentials
B.Local disk path
C.BIOS password
D.Region
E.Host OS version
AnswersA, D

Required for authentication.

Why this answer

Packer needs credentials (like API keys) and region/availability zone information to interact with cloud APIs.

130
MCQhard

You are configuring cloud-init to inject an SSH key into a new VM. Which directive in the configuration metadata ensures the key is added to the correct user's authorized_keys file?

A.users.ssh_key
B.ssh_keys
C.ssh_authorized_keys
D.authorized_keys_file
AnswerC

This is the correct key under the user definition.

Why this answer

The 'ssh_authorized_keys' directive within the user object specifies which public keys should be injected into the ~/.ssh/authorized_keys file for that user.

131
Multi-Selectmedium

Which TWO types of namespaces are commonly used to achieve container isolation in Linux?

Select 2 answers
A.GPU
B.Network
C.CPU
D.PID
E.Kernel
AnswersB, D

Network namespaces isolate the network stack.

Why this answer

Network and PID namespaces are fundamental for containerization.

132
Multi-Selecthard

Which THREE of the following are necessary to enable QEMU guest agent integration?

Select 3 answers
A.Installing qemu-guest-agent inside the guest
B.Adding a channel device for the agent to the XML
C.Adding a network bridge
D.Restarting the VM to apply the channel configuration
E.Enabling VNC password
AnswersA, B, D

Guest component.

Why this answer

Installing the guest agent, adding the channel to the XML, and restarting the VM are the required steps.

133
MCQeasy

What is a 'snapshot' in virtualization?

A.A virtual hardware configuration
B.A log file of guest activity
C.A backup of the entire host system
D.A saved state of a virtual machine at a point in time
AnswerD

Describes a snapshot.

Why this answer

A snapshot captures the state of a VM's disk (and optionally memory) at a point in time.

134
MCQhard

You are building a multi-stage Dockerfile and want to copy a binary from the 'builder' stage to the final stage. Which syntax is correct?

A.ADD --from=builder /bin/app /bin/app
B.COPY --from=builder /bin/app /bin/app
C.COPY builder:/bin/app /bin/app
D.COPY --stage=builder /bin/app /bin/app
AnswerB

This correctly copies the file from the named builder stage.

Why this answer

'COPY --from=stage_name source destination' is the syntax for multi-stage copying.

135
MCQmedium

You are migrating a legacy application to an LXC container and need to ensure the container has access to the host's /dev/sda block device. Which configuration key must be added to the container's configuration file?

A.lxc.mount.device = /dev/sda
B.lxc.cap.sys_admin = 1
C.lxc.cgroup.devices.allow = b 8:0 rwm
D.lxc.dev.access = /dev/sda
AnswerC

This allows the container to access block device 8:0, which corresponds to /dev/sda.

Why this answer

To allow a container to access host devices, the lxc.cgroup.devices.allow and lxc.mount.entry must be configured properly in the container config.

136
MCQeasy

Which component is responsible for the actual hardware-assisted virtualization in KVM?

A.Virt-manager GUI
B.KVM kernel module
C.Libvirtd daemon
D.QEMU user-mode binary
AnswerB

The kernel module enables hardware virtualization.

Why this answer

The Linux kernel, specifically the KVM module, provides the interface to the hardware.

137
MCQhard

You are using Packer to automate a build. You notice the build fails because the 'communicator' cannot connect. Which type of communicator is most suitable for a KVM-based build where SSH is not yet configured?

A.ssh
B.http
C.winrm
D.none
AnswerD

This is used when external orchestration is not required.

Why this answer

The 'none' communicator is used when the builder handles the image creation without needing remote access, or 'ssh' if the guest OS supports it. However, if the build relies on console output/keystrokes, the 'none' communicator is often used alongside the boot command.

138
Multi-Selecthard

Which THREE of the following are valid storage driver options for Docker on Linux?

Select 3 answers
A.overlay2
B.ext4-driver
C.vfs
D.zfs
E.btrfs
AnswersA, D, E

The recommended storage driver for most Linux distributions.

Why this answer

Docker supports multiple storage drivers including overlay2, btrfs, and zfs, depending on the underlying filesystem.

139
Multi-Selecthard

Which THREE of the following are valid elements inside the <interface type='bridge'> block?

Select 3 answers
A.<source bridge='br0'/>
B.<ip address='...'/>
C.<gateway address='...'/>
D.<model type='virtio'/>
E.<mac address='...'/>
AnswersA, D, E

Defines the bridge.

Why this answer

<source>, <mac>, and <model> are valid sub-elements for a bridged interface.

140
MCQeasy

Which command-line option is used to run a Docker container in the background (detached mode)?

A.-i
B.--bg
C.-d
D.-b
E.-t
AnswerC

The -d flag enables detached mode.

Why this answer

The -d flag specifies that the container should run in the background.

141
MCQmedium

You are managing an LXC container and need to create a snapshot of the container's root file system. Which command achieves this?

A.lxc-snapshot -n container_name
B.lxc-checkpoint -n container_name
C.lxc-copy -s container_name
D.lxc-backup
E.lxc-clone --snapshot
AnswerA

This creates a snapshot for the specified container.

Why this answer

The lxc-snapshot tool is the standard method for managing LXC container snapshots.

142
MCQhard

In an OpenVZ environment, you need to limit the number of processes a container can create. Which parameter in the container configuration file should be modified?

A.PHYSPAGES
B.NUMPROC
C.KMEMSIZE
D.PRIVVMPAGES
AnswerB

This specifically limits the number of processes.

Why this answer

The 'nproc' (or numproc) parameter in the OpenVZ configuration limits the total number of processes a container is allowed to hold.

143
MCQeasy

Which of these is a valid virtualization storage pool type supported by libvirt?

A.cpu
B.interface
C.network
D.dir
AnswerD

Directory-based storage pool.

Why this answer

'dir' is a common storage pool type that uses a directory in the host filesystem.

144
MCQhard

In systemd-nspawn, how do you specify a different root directory for the container?

A.--path
B.--root
C.-D
D.-r
AnswerC

Specifies the root directory.

Why this answer

The -D or --directory flag specifies the root path.

145
MCQeasy

What is the primary difference between a container image and a container instance?

A.Images are stored in RAM, instances are on disk
B.The image is the template; the instance is the running process
C.Instances cannot be stopped
D.The instance is the template; the image is the running process
E.They are the same thing
AnswerB

Images are immutable blueprints; containers are the operational runtime.

Why this answer

A container image is a read-only template, whereas a container instance is a writable, running version of that image.

146
Multi-Selectmedium

Which THREE commands are used to manage the lifecycle of an LXC container?

Select 3 answers
A.lxc-start
B.lxc-destroy
C.lxc-pause
D.lxc-reboot
E.lxc-stop
AnswersA, B, E

Starts the container.

Why this answer

lxc-start, lxc-stop, and lxc-destroy are standard commands for managing container states.

147
MCQeasy

What is the primary function of the ENTRYPOINT instruction in a Dockerfile?

A.Setting environment variables
B.Defining volume mount points
C.Configuring the executable that runs when the container starts
D.Specifying metadata
E.Installing software packages
AnswerC

ENTRYPOINT is designed to make the container behave like an executable.

Why this answer

ENTRYPOINT sets the main command that will execute when the container starts.

148
Multi-Selectmedium

Which THREE of the following are necessary components for a successful KVM virtualization environment on Linux?

Select 3 answers
A.The kvm kernel module
B.QEMU userspace tools
C.Hardware support for Intel VT-x or AMD-V
D.A dedicated storage network switch
E.A full Xen hypervisor installed
AnswersA, B, C

The kernel module provides the interface to the hardware virtualization features.

Why this answer

KVM requires hardware virtualization support, the kernel module, and the QEMU userspace interface.

149
Multi-Selectmedium

Which TWO items are typically included in a Docker context?

Select 2 answers
A.The host kernel
B.Remote images
C.Running containers
D.Local files in the build directory
E.Dockerfile
AnswersD, E

Source code and artifacts to be copied into the image.

Why this answer

The Docker context includes the Dockerfile and the build directory contents.

150
MCQeasy

How do you view the logs of a running container?

A.docker logs [container]
B.docker show-logs
C.cat /var/lib/docker/logs
D.docker log
AnswerA

This retrieves the container's stdout/stderr.

Why this answer

'docker logs' is the command to retrieve logs.

Page 1

Page 2 of 3

Page 3

All pages