Rockylinux8.5 - With KVM hypervisor and minimal iso ssh doesn't connect

Recently, we started exploring Rockylinux-8.5 for our sever application.
We have a openstack platform, for creating instance and loading our server application on to it for testing.
So, we got a Git repo and Jenkins job for creating the openstack image.
With python qemu building and rocky linux -8.5 minimal iso

[2022-05-12T14:54:05.935Z] ==> rockylinux85Minimal: https://download.rockylinux.org/pub/rocky/8/isos/x86_64/Rocky-8.5-x86_64-minimal.iso?checksum=sha256%3A4eb2ae6b06876205f2209e4504110fe4115b37540c21ecfbbc0ebc11084cb779 => /home/buildagent/jenkins/workspace/ly_openstack-image-creator_PR-32/packer_cache/8910a1d23f7ec7a7baa950c5620a67cac9e32e63.iso

[2022-05-12T14:54:05.935Z] ==> rockylinux85Minimal: Creating required virtual machine disks

[2022-05-12T14:54:06.193Z] ==> rockylinux85Minimal: Starting HTTP server on port 8515

[2022-05-12T14:54:06.194Z] ==> rockylinux85Minimal: Found port for communicator (SSH, WinRM, etc): 3398.

[2022-05-12T14:54:06.194Z] ==> rockylinux85Minimal: Looking for available port between 5900 and 6000 on 127.0.0.1

[2022-05-12T14:54:06.194Z] ==> rockylinux85Minimal: Starting VM, booting from CD-ROM

[2022-05-12T14:54:06.194Z]     rockylinux85Minimal: The VM will be run headless, without a GUI. If you want to

[2022-05-12T14:54:06.194Z]     rockylinux85Minimal: view the screen of the VM, connect via VNC without a password to

[2022-05-12T14:54:06.194Z]     rockylinux85Minimal: vnc://127.0.0.1:5998

[2022-05-12T14:54:06.194Z] ==> rockylinux85Minimal: Overriding defaults Qemu arguments with QemuArgs...

[2022-05-12T14:54:08.101Z] ==> rockylinux85Minimal: Waiting 5s for boot...

[2022-05-12T14:54:13.384Z] ==> rockylinux85Minimal: Connecting to VM via VNC (127.0.0.1:5998)

[2022-05-12T14:54:13.384Z] ==> rockylinux85Minimal: Typing the boot command over VNC...

[2022-05-12T14:54:23.357Z] ==> rockylinux85Minimal: Using ssh communicator to connect: 127.0.0.1

[2022-05-12T14:54:23.357Z] ==> rockylinux85Minimal: Waiting for SSH to become available...

[2022-05-12T15:25:15.911Z] Cannot contact kvm-dev-node-ansible: hudson.remoting.RequestAbortedException: java.io.IOException: Unexpected termination of the channel

[2022-05-12T15:54:32.014Z] ==> rockylinux85Minimal: Timeout waiting for SSH.

[2022-05-12T15:54:32.014Z] ==> rockylinux85Minimal: Deleting output directory...

[2022-05-12T15:54:32.014Z] Build 'rockylinux85Minimal' errored: Timeout waiting for SSH.

But same works and could able to ssh connect when using dvd iso

[2022-05-16T13:48:51.432Z] ==> rockylinux85Minimal: Connecting to VM via VNC (127.0.0.1:5935)

[2022-05-16T13:48:51.432Z] ==> rockylinux85Minimal: Typing the boot command over VNC...

[2022-05-16T13:49:01.397Z] ==> rockylinux85Minimal: Using ssh communicator to connect: 127.0.0.1

[2022-05-16T13:49:01.397Z] ==> rockylinux85Minimal: Waiting for SSH to become available...

[2022-05-16T14:00:23.141Z] ==> rockylinux85Minimal: Connected to SSH!

[2022-05-16T14:00:23.141Z] ==> rockylinux85Minimal: Pausing 10s before the next provisioner...

[2022-05-16T14:00:33.099Z] ==> rockylinux85Minimal: Provisioning with shell script: /tmp/packer-shell137273861

This is my first instance working with rockylinux and not sure what is wrong with minimal vs dvd.

I don’t know the exact reason, but there are many things that don’t work with the minimal iso.

Minimal ISO has only the ‘baseos’ repo. The DVD ISO has also ‘appstream’ content.

For example, the ‘rsyslog’ is in group ‘Core’, but is in appstream. When you install from Minimal ISO, all(?) enviroments, even the ‘Minimal Install’ has ‘Core’ as mandatory group and hence ‘rsyslog’ as mandatory package, but it is not a fatal error to lack packages of group. Hence: install “Minimal Install” from Minimal ISO and you will not have rsyslog; install “Minimal Install” from DVD ISO and you will have rsyslog. (Running dnf install @Core again after installation does add handful of packages.)

Similarly, I did just do dnf install @GNOME --exclude=gnome-classic-session and there was only note from dnf that package ‘gnome-classic-session’ cannot be found … but it did install rest of the group.

@jlehtone Thanks for the response, so does it mean, with minimal it doesn’t work?
Can you pls point to the exact reason, why is it so with minimal against dvd.

I expect your build process needs to be looked at.

The minimal can be installed perfectly fine under a normal KVM machine. The minimal can even be used with a kickstart to prepare a minimal installation. I have done it this way building Openstack images myself - of course it’s manual method, and later you need to sort out the cloud-utils side as well as sysprepping it. But once that is done the image can then be shrunk and used with Openstack.

The only difference being that you are automating it, so I guess something with your build process, but we would need to know much more information from you to help with that.

That aside, the DVD image does have much more on it like was already mentioned, so it could be basically that SSH is not included to run by default with the minimal image like the DVD - if this is what you are having an issue with. In that case, just use the DVD to build your image and make yourself a minimal install from that.

An issue with CentOS 7 Minimal ISO was that while it did define connections for NICs, it had them with connection.autoconnect no unless one did click on toggle switch on interactive installer or had appropriate kickstart statements. However, if VM would start with network down, then one could not connect with ssh at all. I can’t recall what the default in EL8 is.