no_ssh_fingerprints: true
ssh_pwauth: false
preserve_hostname: false
mount_default_fields: [~, ~, 'auto', 'defaults,nofail', '0', '2'] resize_rootfs_tmp: /dev ssh_deletekeys: 0
ssh_genkeytypes: ['rsa', 'dsa']
syslog_fix_perms: root:root
network: config: disabled datasource_list: [ OpenStack ]
For Ubuntu 14.04, the following line does not need to be added:
datasource_list: [ OpenStack ]
- power-state-change
system_info: default_user: name: linux //Username for OS login lock_passwd: True //True indicates that login using a password is disabled. Note that some OSs use value 1 to disable the password login. gecos: redhat groups: [audio, cdrom, dialout, floppy] // (optional) Add the user to other groups that have been configured in etc/group. sudo: ["ALL=(ALL) NOPASSWD:ALL"] //Current user has all the root rights. shell: /bin/bash //Execute shell in bash mode. distro: sles paths: cloud_dir: /var/lib/cloud/ templates_dir: /etc/cloud/templates/ upstart_dir: /etc/init/ ssh_svcname: sshd
In the preceding command, change the value of distro based on the OS, such as distro: sles, distro: rhel, distro: ubuntu, distro: debian, and dustro: fedora.
# cloud-init - the initial cloud-init job # crawls metadata service, emits cloud-config start on mounted MOUNTPOINT=/ and mounted MOUNTPOINT=/run and stopped bms-network_config
Run the vim /etc/cloud/cloud.cfg.d/90_dpkg.cfg command to open the configuration file and check whether the items are correctly configured in the file.
# to update this file, run dpkg-reconfigure cloud-init datasource_list: [ OpenStack ] ~ ~ ~
If the configuration file content is consistent with the preceding command output, the configuration is successful.