Uploaded image for project: 'RHEL'
  1. RHEL
  2. RHEL-24246

qcow2 images have broken network with Server-like package sets

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Undefined Undefined
    • None
    • None
    • osbuild
    • None
    • None
    • None
    • None
    • False
    • Hide

      None

      Show
      None
    • None
    • None
    • None
    • None
    • None

      What were you trying to do that didn't work?

      When creating an qcow2 image with the "Server" or "Server with GUI" package sets, the networking does not work when the image is imported via virt-install --import.

      This is caused by the Server package set containing this package:

      Name         : NetworkManager-config-server
      ...
      Description  : This adds a NetworkManager configuration file to make it behave more
                   : like the old "network" service. In particular, it stops NetworkManager
                   : from automatically running DHCP on unconfigured ethernet devices, and
                   : allows connections with static IP addresses to be brought up even on
                   : ethernet devices with no carrier.
                   : 
                   : This package is intended to be installed by default for server
                   : deployments.
      

      This is normally not a problem, because Anaconda pre-creates NetworkManager connections for the network interfaces it finds - I'm not sure how it does it, but Anaconda-installed systems have ie.

      /etc/NetworkManager/system-connections/enp1s0.nmconnection
      

      which contains something like

      id=enp1s0
      uuid=364abf78-9b61-4188-937c-095358788a0c
      type=ethernet
      interface-name=enp1s0
      
      [ethernet]
      
      [ipv4]
      method=auto
      
      [ipv6]
      addr-gen-mode=eui64
      method=ignore
      
      [proxy]
      

      It's possible this is a result of the network Anaconda Kickstart command, that I have configured to be

      network --onboot yes --bootproto dhcp
      

      where I don't see anything similar in https://osbuild.org/docs/user-guide/blueprint-reference/ .

      On an osbuild-made compose, the /etc/NetworkManager/system-connections directory is empty, causing the default virtio-net interface to appear as eth0 instead of enp1s0 (which is a name compliant with https://www.freedesktop.org/wiki/Software/systemd/PredictableNetworkInterfaceNames/), and also disabling DHCP by the virtue of NetworkManager-config-server blocking the fallback for when no connections are configured.

      Please generate valid /etc/NetworkManager/system-connections when creating the image.

      Please provide the package NVR for which bug is seen:

      osbuild-composer-dnf-json-99-1.el9.x86_64
      osbuild-composer-core-99-1.el9.x86_64
      osbuild-selinux-106-1.el9.noarch
      osbuild-106-1.el9.noarch
      osbuild-luks2-106-1.el9.noarch
      osbuild-lvm2-106-1.el9.noarch
      osbuild-ostree-106-1.el9.noarch
      osbuild-composer-worker-99-1.el9.x86_64
      osbuild-composer-99-1.el9.x86_64

      Steps to reproduce

      1. Add [groups] to a Blueprint, specifying a Server package group.
      2. Build a compose, export a qcow2 image from it.
      3. Import it via virt-install, boot the OS
      4. Log in via a serial console, observe ip addr show not having any routable addresses

              release-test-team Release Test Team
              jjaburek@redhat.com Jiri Jaburek
              Release Test Team Release Test Team
              Release Test Team Release Test Team
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated: