Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SSHD not starting on CentOS 8 VM? #12

Closed
konstantinblaesi opened this issue Sep 29, 2019 · 3 comments
Closed

SSHD not starting on CentOS 8 VM? #12

konstantinblaesi opened this issue Sep 29, 2019 · 3 comments

Comments

@konstantinblaesi
Copy link

konstantinblaesi commented Sep 29, 2019

Description

I am booting a CentOS 8 via KVM / virt-manager with kernel options rd.neednet=1 ip=dhcp

Expected behavior

I can login via ssh to enter the password

Observed behavior

Connection on port 22 is refused
( implying that the network setup via dhcp works fine right? )

Additioal Information

If I add rd.break to the cmdline, enter the LUKS password using virt-manager I get dropped to the dracut rescue shell and I can connect via ssh. This is still the initramfs sshd right?

Do you have some tips how to debug this?

@konstantinblaesi
Copy link
Author

konstantinblaesi commented Sep 29, 2019

Is this some entropy issue? If I just start typing at the local LUKS password prompt without even submitting the password, the sshd server is availble shortly after. If I don't do anything even after 1m30s there's still no sshd server availble.
I am checking port 22 of my VM using while [ true ] ; do sudo nmap -sS -p 22 192.168.122.178 | grep "22/tcp"; done

@konstantinblaesi
Copy link
Author

Problem seems to be entropy related!
cat /proc/sys/kernel/random/entropy_avail prints

  • Host: 3795
  • Guest: 424 (after dropping emergency shell via rd.break)

After adding the RNG to the VM the sshd came up pretty instant :)

random

@konstantinblaesi konstantinblaesi changed the title SSHD not started early enough on CentOS 8? SSHD not started early enough on CentOS 8 VM? Sep 29, 2019
@konstantinblaesi konstantinblaesi changed the title SSHD not started early enough on CentOS 8 VM? SSHD not starting on CentOS 8 VM? Sep 29, 2019
@gsauthof
Copy link
Owner

Yeah, not having enough entropy is a common thing when testing such stuff in a VM.

This is also the reason why the qemu call in the test-suite has -device virtio-rng-pci set.

Depending on the host even the entropy of the host system might run out.

If this happens in a test environment I start haveged (on the VM host, not inside the VM).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants