Score:2

Ubuntu Cloud Image 20.04, cloud-init error

id flag

esxi 8.0, Ubuntu 20.04(focal). I've created cidata.ico with hdiutil makehybrid -o cidata.iso cidata -iso -joliet

user-data content:

#cloud-config
users:
  - name: demo
    groups: sudo
    shell: /bin/bash
    sudo: ALL=(ALL) NOPASSWD:ALL
    ssh-authorized-keys:
      - ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACA... 

getting

[    5.671765] cloud-init[680]: 2022-11-02 01:06:00,248 - schema.py[WARNING]: Invalid cloud-config provided: Please run 'sudo cloud-init schema --system' to see the schema errors.

Any way so I can see more details about this error? thanks!

user535733 avatar
cn flag
Did you follow the instructions provided in the error message?
David avatar
cn flag
After running the command as the error tells you then post the info in the question using edit.
Score:0
th flag
root@me:~# cloud-init schema --system
Cloud config schema deprecations: 
Error:
Cloud config schema errors: users.0: {'groups': 'sudo', 'name': 'demo', 'shell': '/bin/bash', 'ssh-authorized-keys': ['ssh-rsa AAAAB3NzaC1yc2EA'], 'sudo': 'ALL=(ALL) NOPASSWD:ALL'} is not valid under any of the given schemas

If you look at the cloud-init docs, you'll see that ssh-authorized-keys is not a valid key. It has been deprecated and replaced with ssh_authorized_keys.

Johny avatar
id flag
Thanks for your reply! That helped!
Johny avatar
id flag
Im trying to ssh to the host: ssh demo@192.168.50.159 getting: demo@192.168.50.159: Permission denied (publickey). Any ideas why? thanks and appreciate it.
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.