Xen/ XOA Cloud-init issues

Dear Forum.

I’m currently testing the cloud-init/ Cloud Config of Xen Orchestra on my XCP-NG 8.0 server.

But I’m having some trouble getting my VM’s to apply the changes in the Cloud Config box in XOA.

I have made a new VM from the default templates.
Installed Ubuntu 20.04 LTS server edition.
Run the apt-get install cloud-init cloud-initramfs-growfs
I have not made any changes to the /etc/cloud/cloud.cfg
I have run the dpkg-reconfigure cloud-init after installing cloud-init

when selecting with options to pick from I chose these:

Are these the correct boxes to check?

This is what I have in the XOA Cloud Config tab:

And this is the yaml, just in text :smiley:

growpart: {mode: 'on'}
locale: C.UTF-8
preserve_hostname: false
resize_rootfs: true
ssh_pwauth: false
- gecos: itvadmin
  groups: [sudo]
  lock-passwd: false
  name: itvadmin
  shell: /bin/bash
- gecos: sb
  groups: [sudo]
  lock-passwd: false
  name: sb
  shell: /bin/bash

any ideas why this is not just working?

I’m more than happy to send logs and other information if need’ ed

@LTS_Tom This might be up your ally with XCP-NG and XOA, any ideas?

Have you had any luck with this?

I managed to get my Ubuntu 18 Template working…

After a clean install of Ubuntu 18 on Xen Orchestra/XCP-ng, I did the following(could be unnecessary):

Purged all cloud-init applications:
sudo apt purge cloud-init cloud-initramfs-dyn-netconf cloud-initramfs-copymods

Prepared my server with all my apps and Tom’s dotfiles.

Installed XCP-ng tools:
mount guest-tools

mount /dev/cdrom /mnt
dpkg -i /mnt/Linux/xe-guest-utilities_X.X.X-XXXX_amd64.deb
umount /mnt

Installed cloud-init again:
apt-get install cloud-init cloud-initramfs-growroot

Choose cloud-init source: NoCloud only

dpkg-reconfigure cloud-init

systemctl enable cloud-init

shutdown server and converted to template. Once done, I created a cloud config file:
hostname: {name}
fqdn: {name}.domain.com
manage_etc_hosts: true
growpart: {mode: ‘on’}
preserve_hostname: false
resize_rootfs: true

and on the network side to remove ‘#’ from network: and version: 1

  version: 1
#  config:
#  - type: physical
#    name: eth0
#    subnets:
#      - type: dhcp

created a new VM and set the name, resources and disks and confirmed that it all worked.

I forgot to add that you need to remove the cloud-init files after the purge:
sudo rm -rf /etc/cloud/; sudo rm -rf /var/lib/cloud/

and then reboot