[08:34] I am using vmware and ubuntu 24.04. I am trying to create a user and set a clearetext password, but its failing at failed to set passwords with chpasswd for my_adm. Here is my vendor-data file https://pastebin.com/Lhe0vjRc [08:36] Hi Guest1337, can you log in with the default user? if so can you share the contents of /var/log/cloud-init.log ? [08:54] aciba thanks for quick response. I have one user defined in user-data, and one user defined in vendor-data, where I also use chpasswd. the user defined in user-data is created and I can login with it. The user in vendor-data is never created. Here is log: https://pastebin.com/adsdpqMH after I ran cloud-init clean, init and modules --mode-config [08:55] Mind you, this is the first time I am using cloud-init, so I dont know if I am doing stuff in the best practise way [09:27] I see, you are running on OVH. There is one error while the datasource is fetching the metadata from the cloud, I am not sure if related to your isse [09:27] * issue [09:27] then there is no mention to adding the my_adm user in the logs [09:28] the cc_users_groups module tries to add the olof user: [09:29] 2024-07-16 08:42:46,079 - distros[INFO]: User olof already exists, skipping. [09:29] it looks like your user-data is not correctly pulled by cloud-init [09:29] When I put all users in vendor-data or all users in user-data, I get the desired result. Maybe some errors with merging. [09:29] Guest1337: what's the output of cloud-init query userdata ? [09:30] I also tried to add merge_how: [09:30]   users: "list(append)" in the user-data file, that worked, but it broke other directives in user-data - eg it didnt add my hostname [09:32] `cloud-init query combined_cloud_config` gives you the fully merged cloud-config [09:32] and `cloud-init query vendordata` the vendor-data [09:32] is your users config within any of those? [09:40] I see, you can also add a `users:\n -default` followed by your new user to either userdata or vendordata [09:40] see https://docs.cloud-init.io/en/latest/reference/modules.html#users-and-groups [09:48] Guest1337: I mean using this: https://pastebin.ubuntu.com/p/MTXtMjNjy5/ as either vendor or user data. Does that solves your issue? [09:48] if I clean, init and query, then if I am using users both in vendor-data and user-data, there seem to be some merge conflict, and nothing from user-data is applied. It does not help to use merge_how. [09:48] If I put both users in user-data, or both users in vendor data, everything works as expected. [09:49] aciba: yes that will work. [09:52] About the merge_how, the merging strategies acts upon multiple configs of the same cathegory, that is, it specifies how to merge multiple instances of user-data or vendor-data together [09:52] example: merging user-data1 with user-data2 with merge_how x [09:53] but user-data + vendor-data will always be plainly merged [09:54] So if I called my user directive in both files something else, such as vendorusers and localusers, I could merge them as users? [09:54] it is not about the name, it's about if they are user or vendor data [09:57] Guest1337: this same issue happend here: https://github.com/canonical/cloud-init/issues/5112 [09:57] -ubottu:#cloud-init- Issue 5112 in canonical/cloud-init "merging user data sections not work" [Open] [09:57] 5112 is kept to improve the documentation regarding merge [10:28] Okay, Ill just use either one of them. [10:29] Now, my next problem is that my network configuration is never applied / read. https://pastebin.com/0a7KuTCX ens192 is the name of my only network card. [12:36] Guest1337: you're embedding network configuration in metadata file? only ENI (legacy) format is supported for this [12:38] minimal: yes. Is this the wrong approach? Whats the best approach to apply network config to an ubuntu vm? (using vcenter ova wizard) [12:39] I'm not familiar with OVA/VMware, normally I'd supply a separate network-config file in either v1 or v2 format (for NoCloud) [12:40] s/OVA/OVF/ [12:43] hmm, seems that v1/v2 *may* indeed be supported for VMware DataSource: https://vdc-repo.vmware.com/vmwb-repository/dcr-public/c9e49fd1-322b-4c80-97ce-9c2a4f51d5ea/f5135739-7dca-4c6b-bc4e-c926b3d11ae8/GUID-316F0C90-B206-45CF-A5CF-4B51746F3F66.html [12:44] Guest1337: BTW you have noticed that your logfile shows errors when cloud-init tries to run vmware-rpctool and vmtoolsd, right? [12:49] Im going to be honest and say that Im in deep waters here, as its first time I try to look into all of this :) Can you give me an example of how youre supplying an separate network-config file? [12:50] well I'm not using OVF datasource [12:51] how metadata, network config etc are provided is datasource-specific [16:26] holmanb I'm back! finally got around to trying a fake optional interface in network-config and amazingly it works. [18:51] Steve37: looks like you're gone again but maybe you'll see this in the logs [18:52] Steve37: thanks for reporting your results on the issue on github