LCA Virtualization & Container Management 3 — Questions and Answers
Question 1: In Podman, which command replaces 'docker-compose' for multi-container pod management?
- podman stack
- podman-compose or podman play kube (Correct answer)
- podman multi
- podman orchestrate
Correct answer: podman-compose or podman play kube
podman-compose and 'podman play kube' both handle multi-container workloads as Podman alternatives to docker-compose.
Question 2: What virtualization type does Xen use when running unmodified guest OS kernels?
- Paravirtualization
- Full virtualization (HVM) (Correct answer)
- OS-level virtualization
- Hardware partitioning
Correct answer: Full virtualization (HVM)
Xen HVM (Hardware Virtual Machine) mode uses CPU extensions (Intel VT-x/AMD-V) to run unmodified guest kernels.
Question 3: Which namespace type isolates process IDs between containers?
- net namespace
- pid namespace (Correct answer)
- mnt namespace
- uts namespace
Correct answer: pid namespace
PID namespaces give each container its own process ID numbering, so PIDs don't collide between containers.
Question 4: What does the Docker instruction 'ENTRYPOINT' define?
- The base image for the container
- The default executable run when the container starts (Correct answer)
- The working directory inside the container
- The network port exposed by the container
Correct answer: The default executable run when the container starts
ENTRYPOINT sets the main command that always runs when the container starts, making the container behave like an executable.
Question 5: Which virsh command lists all defined virtual machine domains, including inactive ones?
- virsh list
- virsh list --all (Correct answer)
- virsh domains -a
- virsh show --inactive
Correct answer: virsh list --all
'virsh list --all' shows both running (active) and stopped (inactive) domain definitions.
Question 6: What is a Docker volume bind mount used for?
- Creating a read-only container layer
- Mounting a host directory path into a container (Correct answer)
- Sharing volumes between Docker registries
- Encrypting container filesystem data
Correct answer: Mounting a host directory path into a container
A bind mount maps a specific host filesystem path into the container, allowing direct access to host files.
Question 7: In KVM, what command installs a new virtual machine from an ISO with specified RAM and disk?
- virsh define
- virt-install (Correct answer)
- qemu-kvm --create
- kvm-setup
Correct answer: virt-install
virt-install is the command-line tool for creating and provisioning new KVM virtual machines from ISOs or other sources.
In Podman, which command replaces 'docker-compose' for multi-container pod management?