Question 150 of 527
Manage containershardMultiple ChoiceObjective-mapped

Quick Answer

The correct approach is to create a systemd service file using `podman generate systemd` on a running container, then enable the service with `systemctl enable --now container-myapp`, ensuring the container was started with `--restart=always` and appropriate volume and port mappings. This works because `podman generate systemd` produces a systemd unit file that integrates Podman’s container lifecycle with systemd’s process supervision, allowing automatic restart on crash through the `Restart=always` directive while persisting logs via `-v /var/log/app:/var/log` and exposing HTTPS with `-p 443:443`. On the Red Hat Certified System Administrator EX200 exam, this tests your understanding of Podman’s systemd integration for production containers—a common trap is manually writing a systemd unit instead of using `podman generate systemd`, which automatically handles user namespace, volume, and restart policies. Remember the mnemonic: **G.E.N.** — Generate, Enable, Never manually write the unit.

EX200 Manage containers Practice Question

This EX200 practice question tests your understanding of manage containers. This is a configuration task: choose the command set that satisfies every stated requirement. Small differences — like 'secret' vs 'password' or 'transport input ssh' vs 'all' — change whether the answer is correct. After answering, compare your reasoning against the explanation and wrong-answer breakdown below. Once you have made your selection, read the full explanation to reinforce the concept and understand why each distractor is designed to mislead on exam day.

An administrator is tasked with deploying a containerized application on a Red Hat Enterprise Linux 8 server that is part of a high-security environment. The application must run as a non-root user inside the container. The container image is based on Red Hat Universal Base Image (UBI) and exposes port 443 for HTTPS. The administrator needs to ensure that the container can be restarted automatically if it crashes and that the application logs are persisted on the host in /var/log/app. The application requires a configuration file that is generated dynamically at startup and must be accessible to the container. The administrator has created a systemd service file for the container but wants to use Podman's built-in features to manage the container. Which approach meets all requirements?

Question 1hardmultiple choice
Full question →

Answer choices

Why each option matters

Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.

Correct answer & explanation

Create a systemd service file using 'podman generate systemd' on a running container, then enable the service with 'systemctl enable --now container-myapp'. The container should be started with '--restart=always' and appropriate volume and port mappings.

Option A is correct because 'podman generate systemd' creates a systemd service unit file that integrates Podman containers with systemd's process management, enabling automatic restart on crash via systemd's restart behavior (e.g., Restart=always) and boot-start with 'systemctl enable --now'. The volume mount (-v /var/log/app:/var/log) persists logs on the host, and the port mapping (-p 443:443) exposes HTTPS. This approach meets all requirements: non-root user (specified in the container image or via --user), dynamic config file (generated at startup and mounted or injected), and systemd-managed restart.

Key principle: Answer the scenario, not the keyword: identify the specific constraint before choosing the most familiar-sounding option.

Answer analysis

Option-by-option breakdown

For each option: why learners choose it and why it is or isn't the right answer here.

  • Create a systemd service file using 'podman generate systemd' on a running container, then enable the service with 'systemctl enable --now container-myapp'. The container should be started with '--restart=always' and appropriate volume and port mappings.

    Why this is correct

    This integrates with systemd for boot-start and restart, and allows non-root user via '--user' in the container.

    Related concept

    Read the scenario before looking for a memorised answer.

  • Create a 'podman service' unit using 'podman service create' to manage the container with automatic restart and boot-start.

    Why it's wrong here

    'podman service create' is not a valid command; Podman does not have a built-in service manager.

  • Run the container with 'podman run --restart=always -v /var/log/app:/var/log -p 443:443 myapp' and rely on the container's restart policy.

    Why it's wrong here

    The '--restart=always' policy only works if the Podman process is running; it does not survive a system reboot without systemd.

  • Use 'podman create --restart=on-failure -v /var/log/app:/var/log -p 443:443 myapp' and then start it with 'podman start'.

    Why it's wrong here

    This does not ensure the container starts on boot.

Common exam traps

Common exam trap: answer the scenario, not the keyword

The trap here is that candidates confuse Podman's '--restart' flag (which is not supported) with Docker's restart policies, or assume 'podman service create' is a valid command, when the correct approach is to generate a systemd unit file with 'podman generate systemd' and manage the container via systemd.

Trap categories for this question

  • Command / output trap

    'podman service create' is not a valid command; Podman does not have a built-in service manager.

Detailed technical explanation

How to think about this question

Podman's 'podman generate systemd' produces a systemd unit file that uses 'Type=forking' and 'ExecStart=/usr/bin/podman start ...' to manage the container as a systemd service, leveraging systemd's cgroup and restart logic (e.g., Restart=on-failure). The container's restart policy is enforced by systemd, not Podman, ensuring reliable crash recovery and boot-start in high-security environments. For dynamic configuration files, a common pattern is to use a startup script that generates the config and mounts it via a volume or tmpfs, or use Podman's '--env' or '--secret' features for sensitive data.

KKey Concepts to Remember

  • Read the scenario before looking for a memorised answer.
  • Find the constraint that changes the correct option.
  • Eliminate answers that are true in general but not in this case.

TExam Day Tips

  • Watch for words such as best, first, most likely and least administrative effort.
  • Review why wrong options are wrong, not only why the correct option is correct.

Key takeaway

Answer the scenario, not the keyword: identify the specific constraint before choosing the most familiar-sounding option.

Real-world example

How this comes up in practice

A practitioner preparing for the EX200 exam encounters this exact type of scenario on the job. The correct answer here is not the most general option — it is the best answer for the specific constraint described. Answer the scenario, not the keyword: identify the specific constraint before choosing the most familiar-sounding option. Real exam questions reward reading the full scenario before eliminating options, because the constraint defines which answer fits.

What to study next

Got this wrong? Here's your next step.

Identify which exam domain this question belongs to, review the core concept, then practise similar questions from the same domain.

Related practice questions

Related EX200 practice-question pages

Use these pages to review the topic behind this question. This is how one missed question becomes focused revision.

Practice this exam

Start a free EX200 practice session

Short sessions build daily habit. Longer sessions build exam-day stamina. Try a timed session to simulate real conditions.

FAQ

Questions learners often ask

What does this EX200 question test?

Manage containers — This question tests Manage containers — Read the scenario before looking for a memorised answer..

What is the correct answer to this question?

The correct answer is: Create a systemd service file using 'podman generate systemd' on a running container, then enable the service with 'systemctl enable --now container-myapp'. The container should be started with '--restart=always' and appropriate volume and port mappings. — Option A is correct because 'podman generate systemd' creates a systemd service unit file that integrates Podman containers with systemd's process management, enabling automatic restart on crash via systemd's restart behavior (e.g., Restart=always) and boot-start with 'systemctl enable --now'. The volume mount (-v /var/log/app:/var/log) persists logs on the host, and the port mapping (-p 443:443) exposes HTTPS. This approach meets all requirements: non-root user (specified in the container image or via --user), dynamic config file (generated at startup and mounted or injected), and systemd-managed restart.

What should I do if I get this EX200 question wrong?

Identify which exam domain this question belongs to, review the core concept, then practise similar questions from the same domain.

What is the key concept behind this question?

Read the scenario before looking for a memorised answer.

About these practice questions

Courseiva creates original exam-style practice questions with explanations and wrong-answer analysis. It does not publish real exam questions, exam dumps, or protected exam content. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

Last reviewed: Jun 11, 2026

Question Discussion

Share a tip, memory trick, or ask about the reasoning behind this question. Do not post real exam questions, leaked content, braindumps, or copyrighted exam material. Comments are moderated and may be removed without notice.

Loading comments…

Sign in to join the discussion.

This EX200 practice question is part of Courseiva's free Red Hat certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the EX200 exam.