• Bare Metal Server

  1. Help Center
  2. Bare Metal Server
  3. Private Image Creation Guide (BMS)
  4. Creating a Linux Image
  5. Configuring Cloud-Init
  6. Configuring Cloud-Init 0.7.6

Configuring Cloud-Init 0.7.6

  1. Add the key-value pair no_ssh_fingerprints: true and ensure that it has a blank row before and after it.
    no_ssh_fingerprints: true
  2. Change the value of users to default.
         - default
  3. Modify the following content:
    disable_root: True
    preserve_hostname: false
    syslog_fix_perms: root:root
  4. Add parameter ssh_pwauth. This parameter specifies whether SSH password login is enabled. If it is set to false, SSH password login is disabled.
    ssh_pwauth: false
  5. Use the number sign (#) to comment out the following rows:
    mount_default_fields: [~, ~, 'auto', 'defaults', '0', '2']
    manual_cache_clean: true
  6. Add the following content:
      config: disabled
    datasource_list: [ OpenStack ]

    For SUSE 11 SP4, add the following information:

      mode: false

    For Debian 8.6, do not add the following information:

    datasource_list: [ OpenStack ]
  7. Add the following content after - final-message in cloud_final_modules:
    - power-state-change
  8. Modify the content under system info as follows:
       distro: sles
         name: linux   //Username for logging in to the OS
         lock_passwd: True   //True indicates that password login is disabled. In some OSs, 1 indicates that password login is disabled.
         gecos: redhat
         groups: [adm, audio, cdrom, dialout, dip, floppy, lxd, netdev, plugdev, sudo, video]   //(Optional) This parameter specifies the groups to which the user is added. The values must be groups that exist in the etc/group of the OS.
         sudo: ["ALL=(ALL) NOPASSWD:ALL"]   //The user has all permissions of user root.
         shell: /bin/bash   //The bash command is used to execute the shell script.
          cloud_dir: /var/lib/cloud/
          templates_dir: /etc/cloud/templates/
        ssh_svcname: sshd

    The value of distro varies depending on the OS and can be slesrhelubuntudebian, or fedora.

  9. Use the number sign (#) to comment out the following row:
    ssh_genkeytypes: ['rsa', 'dsa']
  10. (Optional) For Debian 8.6, perform the following operations:
    1. Run the following command to configure the OpenStack source:

      dpkg-reconf igure cloud-init

      Run the vim /etc/cloud/cloud.cfg.d/90_dpkg.cfg command to open the configuration file and check the configuration items.

      # to update this file, run dpkg-reconf igure cloud-init
      datasource_list: [ OpenStack ]

      If the preceding information is displayed, the configuration is successful.

  11. (Optional) For EulerOS 2.2 and Euler 2.3, perform the following operation:

    In the /etc/pam.d/su configuration file, check whether the line shown in the red box in the following figure has been commented out using the number sign (#). If yes, skip this step.