url in this command is an HTTP address, for example, http://download.opensuse.org/repositories/home:garloff:OTC:cloudinit/SLE_11_SP4/home:garloff:OTC:cloudinit.repo
The dependent software packages vary depending on the Cloud-Init version. This section uses cloud-init-0.7.6-27.19.1.x86_64.rpm as an example. You can use the latest version.
Step 1: Install cloud-init-0.7.6-27.19.1.x86_64.rpm.
Visit the SUSE official website https://software.opensuse.org/package/cloud-init, locate SUSE SLE-11 SP4, and click Show unstable packages.
In the displayed Warning dialog box, click Continue.
Step 2: Install the dependent software packages.
Download dependent software packages from the zypper source. If some dependent software packages are not contained in the zypper source, download them from the SUSE official website https://software.opensuse.org/search and then upload them to the VM.
Visit the SUSE official website https://software.opensuse.org/search and search for python-six.
Click python-six in the search result, locate the SUSE 11 SP4 OS with OTC, and click 64 Bit.
Upload the package to the VM and run the rpm -ivh python-six-xxx command to install python-six. The methods of installing other dependent packages are similar to this.
Run the rpm -ivh Package name command to upload the package to the VM and install it.
linux-dann:/tmp # rpm -ivh python-six-1.10.0-5.1.x86_64.rpm warning: rpm -ivh python-six-1.10.0-5.1.x86_64.rpm: Header V3 DSA signa Preparing... 1:python-six
python-Cheetah-2.4.4
python-oauth-1.0.1
python-PyYAML-3.11
python-pyserial-3.0.1
growpart-0.29-7.1
Run the zypper install python-cheetah command to install the python-Cheetah package. The methods of downloading other dependent packages are the same.
python-configobj-4.7.2-1.10.32.x86_64.rpm
python-Jinja2-2.8-69.10.x86_64.rpm
python-jsonpatch-1.11-25.9.x86_64.rpm
python-jsonpointer-1.9-5.2.x86_64.rpm
python-MarkupSafe-0.23-36.14.x86_64.rpm
python-PrettyTable-0.7.2-11.14.x86_64.rpm
python-requests-2.12.4-1.2.x86_64.rpm
Step 3: Install the rpm package of Cloud-Init.
Run the rpm -ivh cloud-init-0.7.6-32.8.x86_64.rpm command to install Cloud-Init.
Step 4: Query the Cloud-Init version.
Run the cloud-init -v command to query the Cloud-Init version to check whether the installation is successful.
Modify the /etc/cloud/cloud.cfg configuration file to customize the function configuration during BMS initialization using Cloud-Init.
The following content is only for reference:
no_ssh_fingerprints: true
users: - default
disable_root: True ssh_pwauth: false preserve_hostname: false syslog_fix_perms: root:root
mount_default_fields: [~, ~, 'auto', 'defaults', '0', '2'] manual_cache_clean: true
network: config: disabled growpart: mode: false
- power-state-change
system_info: distro: sles default_user: name: linux lock_passwd: True gecos: redhat groups: [audio, cdrom, dialout, floppy, video] sudo: ["ALL=(ALL) NOPASSWD:ALL"] shell: /bin/bash paths: cloud_dir: /var/lib/cloud/ templates_dir: /etc/cloud/templates/ ssh_svcname: sshd
Change the value of distro based on the OS type, such as sles and rhel. In this section, SUSE 11 SP4 is used as an example. Change the value of distro to sles.
ssh_genkeytypes: ['rsa', 'dsa']