• 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.9

Configuring Cloud-Init 0.7.9

  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. Set the value of ssh_pwauth to false.
    ssh_pwauth: false
  3. Add preserve_hostname: false.
    preserve_hostname: false
  4. Use the number sign (#) to comment out the following fields:
    mount_default_fields: [~, ~, 'auto', 'defaults,nofail', '0', '2']
    resize_rootfs_tmp: /dev
    ssh_deletekeys:   0
    ssh_genkeytypes: ~
    syslog_fix_perms: ~
  5. Change the value of ssh_genkeytypes to ['rsa', 'dsa'].
    ssh_genkeytypes: ['rsa', 'dsa']
  6. Change the value of syslog_fix_perms to root:root.
    syslog_fix_perms: root:root
  7. Add the following content:
       config: disabled
    datasource_list: [ OpenStack ]
  8. Add the following content after - final-message in cloud_final_modules:
    - power-state-change
  9. Modify the content under system info as follows:
         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.
       distro: rhel
          cloud_dir: /var/lib/cloud/
          templates_dir: /etc/cloud/templates/
          upstart_dir: /etc/init/
        ssh_svcname: sshd

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