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. 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 VM name in virsh.
The second file is called user-data and contains little scripts and information to set up for example the user passwords. Following is an example of this file.
[root@kvm]# cat user-data
#cloud-config
chpasswd:
list: |
root:password1
stack:password2
expire: False