Skip to content
Ladislav Slezák edited this page Jul 16, 2019 · 17 revisions

Creating Autoyast configuration

Using Autoyast UI

  • Start AutoYast module (Yast -> Miscellaneous -> Autoinstallation or yast2 autoyast from console)
  • Start the registration module (Support -> SUSE Customer Center Configuration)
  • Enter email address, registration code, select extensions,...
  • The available extensions can be downloaded if the machine running Autoyast is registered, or you can manually add the extension identifiers, see the available extensions document.
  • Finish the module
  • Save the created configuration to an XML file

Manually Editing an Autoyast Profile

  • Add the registration section to the XML file, commented example:
<suse_register>
    <!-- if set to "false" all other options are ignored and the system
         is not registered -->
    <do_registration config:type="boolean">true</do_registration>

    <!-- if you use SMT specify the server URL here -->
    <reg_server>https://smt.example.com</reg_server>

    <!-- optionally download the server SSL certificate from the specified
         URL (not recommended, see below) -->
    <reg_server_cert>http://smt.example.com/smt.crt</reg_server_cert>

    <!-- optional server SSL certificate fingerprint - the matching
         certificate will be automatically imported when the SSL
         communication fails because of verification error, the type can be
         either "SHA1" or "SHA256", write the appropriate checksum value
         into the "reg_server_cert_fingerprint" tag (this is more secure than
         using the "reg_server_cert" tag which does not check the
         authenticity of the downloaded SSL certificate at all) -->
    <reg_server_cert_fingerprint_type>SHA1</reg_server_cert_fingerprint_type>

    <!-- fingerprint value, use hexadecimal notation, separate the pairs
         by double colon (:), comparison is case insensitive (i.e. you can
         use both [a-f] and [A-F] characters in hexadecimal numbers) -->
    <reg_server_cert_fingerprint>01:AB...:EF</reg_server_cert_fingerprint>

    <!-- email matching the registration code -->
    <email>user@example.com</email>

    <!-- registration code, might be empty when a SMT server is used -->
    <reg_code>my_secret_SLES_regcode</reg_code>

    <!-- whether to install the updates from the Update channels -->
    <install_updates config:type="boolean">true</install_updates>

    <!-- obtain the registration server URL from SLP discovery,
         exactly **one** server is expected to be found, if there are
         more servers found Yast cannot automatically choose one of them
         and the installation fails (in that case use "reg_server"
         tag and hardcode the required registration server URL) -->
    <slp_discovery config:type="boolean">false</slp_discovery>

    <!-- optionally register an extension or module,
         in SLE15+ it is recommended to at least register the Basesystem Module
         to have access to the updates for the base system (the Linux kernel,
         the system libraries and services) -->
    <addons config:type="list">
      <addon>
        <!-- this is an internal product name (product identification),
             see "zypper products" output or the "Available SCC Extensions"
             wiki page -->
        <name>sle-module-basesystem</name>
        <version>15.1</version>
        <arch>x86_64</arch>
        <!-- a reg code is not needed for the Basesystem module -->
        <reg_code/>
      </addon>
    </addons>
</suse_register>

The XML schema is defined in registration.rnc file.

Semi Automatic Workflow

While Autoyast installation it is possible to start the registration UI. So the admin has the possibility to edit the registration key manually. For that case following entry (instead of <suse_register> entry) has to be added to autoinst.xml:

<general>
...
 <semi-automatic config:type="list">
   <semi-automatic_entry>scc</semi-automatic_entry>
 </semi-automatic>
...
</general>

Using Installed Network Environment

In some cases it is important to use the network environment which is defined in autoinst.xml and which will be installed on the target system.

You can run the <networking> configuration in Autoyast installation stage1 just before registration. You need to set the boolean <networking> <setup_before_proposal config:type="boolean">true</setup_before_proposal> to activate stage1 network configuration.