Skip to content

bcvk requires sshd enabled in container image to be able to install into a disk image #236

Open
cgwalters-forge/bcvk
#13

Description

@travier

As far as I could figure out so far, it looks like bcvk relies on sshd being enabled and started by default in the container image when trying to create disk images from it.

We should be able to dynamically enable the sshd service via a kernel parameter: https://www.freedesktop.org/software/systemd/man/latest/kernel-command-line.html

Likely systemd.wants=sshd.service.

Activity

  1. cgwalters commented on Mar 30, 2026

    @cgwalters
    Member

    Likely systemd.wants=sshd.service.

    Yeah makes sense.

    That said I think bigger picture we should get away from the ssh requirement anyways. Annoying thing here is systemd.extra-unit* aren't in RHEL9. I did some PoC patches to backfill that into the target initramfs. Once we have that it's easy to execute arbitrary code.

  2. prestist commented on Nov 5, 2026

    @prestist

    One more requirement for minimal images: sshd by itself is not sufficient.

    I reproduced this with a very minimal bootc image (systemd, kernel, dnf, bootc, no sshd).

    After adding openssh-server and openssh-clients, sshd came up and was listening:

    sshd.service: Server listening on 0.0.0.0 port 22.
    

    but bcvk still failed with Timeout waiting for readiness after 240s. The guest journal showed the interface came up as enp0s7 but there was no DHCP activity at all, because the image has no NetworkManager and no dhcp-client. qemu's hostfwd=tcp::2222-:22 accepted the connection and then hung at banner exchange, since the guest had no address.

    Once I added NetworkManager, readiness was achieved:

    dhcp4 (enp0s7): state changed new lease, address=10.0.2.15
    

    So the requirement is sshd plus a DHCP-capable network stack (NetworkManager, or systemd-networkd with DHCP enabled), plus the ssh client in the image, since bcvk execs ssh inside the ephemeral container.

    Separately, to-disk also needs --filesystem on images without a bootc install config:

    error: Installing to disk: Creating rootfs: No install configuration found, and no filesystem specified
    

    With all of that, both to-disk and libvirt run succeed on the minimal image.

    Assisted by AI tooling.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions