Which of the following commands deletes all volumes which are not associated with a container?
Options:
A.
docker volume cleanup
B.
docker volume orphan -d
C.
docker volume prune
D.
docker volume vacuum
E.
docker volume garbage-collect
Answer:
C
Explanation:
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.
Question 17
Which CPU flag indicates the hardware virtualization capability on an AMD CPU?
Options:
A.
HVM
B.
VIRT
C.
SVM
D.
PVM
E.
VMX
Answer:
C
Explanation:
Explanation:
The CPU flag that indicates the hardware virtualization capability on an AMD CPU is SVM. SVM stands for Secure Virtual Machine, and it is a feature of AMD processors that enables the CPU to run virtual machines with hardware assistance. SVM is also known as AMD-V, which is AMD’s brand name for its virtualization technology. SVM allows the CPU to support a hypervisor, which is a software layer that creates and manages virtual machines. A hypervisor can run multiple virtual machines on a single physical machine, each with its own operating system and applications. SVM improves the performance and security of virtual machines by allowing the CPU to directly execute privileged instructions and handle memory access, instead of relying on software emulation or binary translation. SVM also provides nested virtualization, which is the ability to run avirtual machine inside another virtual machine. To use SVM, the CPU must support it and the BIOS must enable it. The user can check if the CPU supports SVM by looking for the svm flag in the /proc/cpuinfo file or by using the lscpu command. The user can also use the virt-host-validate command to verify if the CPU and the BIOS are properly configured for hardware virtualization123. References:
How to check if CPU supports hardware virtualization (VT technology)1
Processor support - KVM3
How to Enable Virtualization in BIOS for Intel and AMD4
Question 18
Which of the following values are valid in thefirmwareattribute of aelement in a libvirt domain definition?(Choose two.)
Options:
A.
scsi
B.
virtio
C.
efi
D.
bios
E.
pcie
Answer:
C, D
Explanation:
Explanation:
The firmware attribute of the element in a libvirt domain definition specifies the type of firmware used to boot the virtual machine. The valid values for this attribute are efi and bios, which correspond to the Extensible Firmware Interface (EFI) and the Basic Input/Output System (BIOS) respectively. EFI is a newer standard that supports more features and security than BIOS, such as Secure Boot and faster boot times. BIOS is an older standard that is widely compatible and supported by most hypervisors and operating systems. The other values, scsi, virtio, and pcie, are not related to firmware, but to different types of devices or drivers that can be used in a virtual machine. References: 1 (search for firmware enum)