We are testing autoyast feature to ‘clone’ one of our servers with a SLES12 sp1 that has SSH as a service and it si automatically started when booting the system. We created the autoinst.xml from executing yast2 clone_system from the original server and then configured our TFTP server to use this file to install other servers. At this point, we manage to finish the stage 1 of the automated installation by autoyast rebooting the system to continue the configuration with the stage 2.
The main problem we are currently facing is that the system booted does not have the SSH service enabled nor running, so we can’t continue the installation/configuration of the system remotely by executing yast.ssh. We would like to know if this can’t be changed (nor SSH service possible after stage 1) or if it may be because of an error in our autoinst.xml
This is what we have in autoinst.xml related to services-manager:
Does some of you manage to get the SSH service enabled after the first installation with autoyast? If we connect locally to the installed machine we can check that the open-ssh packages are installed, but checking the service with systemctl status sshd returns it is disabled.
After the installation, the firewall is disabled, so we think it shouldn’t affect the SSH service. Anyway we have modified the control.xml of the installation image in order to have:
<enable_sshd config:type=“boolean”>true</enable_sshd>
After a new installation we have this configuration in ProductFeatures:
But the SSH service was not running. Executing yast service-manager showed that the SSH service was enabled but inactive (dead). Is there any other place where we could force SSH service to be started automatically after stage 1 of the autoyast installation? A post script does not help, as it is executed at the end of the stage 2.
–
Cheers Malcolm °¿° SUSE Knowledge Partner (Linux Counter #276890)
openSUSE Leap 42.1|GNOME 3.16.2|4.1.34-33-default
If you find this post helpful and are logged into the web interface,
please show your appreciation and click on the star below… Thanks!
–
Cheers Malcolm °¿° SUSE Knowledge Partner (Linux Counter #276890)
openSUSE Leap 42.1|GNOME 3.16.2|4.1.34-33-default
If you find this post helpful and are logged into the web interface,
please show your appreciation and click on the star below… Thanks!
As you pointed, the file 90-default-SLE.preset does not contain “enable sshd.service” and apparently Suse seems to have all services disabled except for those in this file.
We then created a chroot-script for autoyast (it is executed after the installation and before the first boot) and modified this file to add an extra line with “enable sshd.service” at the end of it. The script was executed correctly but the ssh service was still disabled at first boot:
It seems that modifying this file before the first boot is not enough, so we’ve tried something different now that we know how chroot-scripts work. We force a chroot after the first installation and before the first boot to manually enable and start the sshd service with the systemctl command. This has worked!!
We copy here our files, just in case someone else needed this too.
Our chroot-script (enablessh.sh)
In our autoinst.xml file:
Thanks malcolmlewis! We can now start an automatic installation of all our servers completly remote.