How to change podman network_backend ?

Solution In Progress - Updated -

Environment

  • Red Hat Enterprise Linux 8
  • Red Hat Enterprise Linux 9
  • podman 4+

Resolution

Note:

  • This change will affect both root and rootless users
  • Existing containers will be stopped and it may need to be started back manually
  • Specify "netavark" or "CNI" as per requirement.
  1. If the /etc/containers/containers.conf file does not exist, copy the /usr/share/containers/containers.conf file to the /etc/containers/ directory:

    # cp /usr/share/containers/containers.conf /etc/containers/
    
  2. Edit the /etc/containers/containers.conf file, and add the following content to the [network] section:

    network_backend="netavark"
    
  3. If you have any containers or pods, reset the storage back to the initial state:

    # podman system reset
    
  4. Reboot the system:

    # reboot
    

Diagnostic Steps

  • network_backend can be checked from podman info
# podman info | grep networkBackend
  networkBackend: netavark

This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.

Comments