Providing the metadata
Cloud-init uses two files for its metadata.
The first file is called meta-data and contains the information about the network configuration. The following is an example of this file.
[root@kvm]# cat meta-data instance-id: NetBackup for OpenStack network-interfaces: | auto ens3 iface ens3 inet static address 158.69.170.20 netmask 255.255.255.0 gateway 158.69.170.30 dns-nameservers 11.11.0.51 local-hostname: nbos-controller.domain.org
Warning:
The instance-id has to match the virtual machine name in virsh.
The second file is called user-data and it contains little scripts and information for a setup. For example, the user passwords. The following is an example of this file.
[root@kvm]# cat user-data
#cloud-config
chpasswd:
list: |
root:password1
stack:password2
expire: False