[SOLVED] Cloud-init problem in centos 7/8

I have problem with cloud-init, can someone clarify the problem as well? I have tested with a simple cloud-init yaml file but no changes on Centos7/8 distribution, same configuration works as expected in Ubuntu18.04. And also I havent seen any cloud-init log files as well on Centos vms.

Simple yaml.file

locale: en_EN.UTF-8
hostname: testcloud
  - htop
  - tree
  - cowsay
package_update: true
package_upgrade: true
  - name: testuser
    groups: wheel
    shell: /bin/bash

Here are the commands that executed.

lxc init images:centos/8 c1 -p zfs-default
lxc config set c1 user.user-data - < test.yaml
lxc config show c1

architecture: x86_64
  image.architecture: amd64
  image.description: Centos 8 amd64 (20200824_07:08)
  image.os: Centos
  image.release: "8"
  image.serial: "20200824_07:08"
  image.type: squashfs
  user.user-data: "#cloud-config\nlocale: en_EN.UTF-8\nhostname: testcloud\npackages: \n  - htop\n  - tree\n  - cowsay\npackage_update: true\npackage_upgrade: true\nusers:\n  - name: testuser\n    groups: wheel\n    shell: /bin/bash\n\n"
  volatile.apply_template: create
  volatile.base_image: 77273c7cd804e67b3d16c5d26d4019f4fe525c7510b663d7785c3b6fa1194ffa
  volatile.eth0.hwaddr: 00:16:3e:9f:72:03
  volatile.idmap.base: "0"
  volatile.idmap.next: '[{"Isuid":true,"Isgid":false,"Hostid":1000000,"Nsid":0,"Maprange":1000000000},{"Isuid":false,"Isgid":true,"Hostid":1000000,"Nsid":0,"Maprange":1000000000}]'
  volatile.last_state.idmap: '[]'
devices: {}
ephemeral: false
- zfs-default
stateful: false
description: ""
lxc start c1
lxc exec c1 -- rpm -qa | grep -i cowsay -- nothing displayed.

:thinking: You need to use the cloud variant of images:

centos/8/cloud instead of centos/8.

Thanks @toby63, it works with some minor errors.