[09:41] can somebody here please show me the magic incantation i need to perform to start an Ubuntu vm in lxd, and be able to login to it? [09:41] the cloud-init data I pass seems to be ignored [12:15] mena: does this work? lxc launch ubuntu-daily:jammy --config=user.user-data="$(cat ./ud.yaml)" j [12:15] meena ^ [12:16] aciba[m]: i need a vm, but, still pretty poorly (I'll tell you in a second) [12:18] lxc launch --vm bleeding:edge [12:19] meena: if this is the first time you use lxd, run lxd init [12:19] meena@76ix ~/s/cloud> ssh 10.248.101.198 [12:19] Received disconnect from 10.248.101.198 port 22:2: Too many authentication failures [12:19] Disconnected from 10.248.101.198 port 22 [12:20] at least SSH is on! [12:20] does `lxc shell ` work ? [12:21] aciba[m]: i need a VM [12:21] lxc console gives me a login console, but I can't login, need to create a password, my SSH key didn't work: https://gist.github.com/igalic/7111c1f4911d5d7fa30d600f1e710d38 [12:23] trying https://gist.github.com/igalic/c6c4a2bcdd3dc2c5bc80662f482b067f now [12:23] If run lxc launch ubuntu-daily:jammy vj --vm, wait a bit, and lxc shell vj, then I am able to connect [12:25] @_@ [12:25] i can just connect to the shell [12:25] are you using ubuntu-daily as the image pool? there are other image pools that do not contain ubuntu-server images (the ones that come with cloud-init preinstalled) [12:25] aciba[m]: i just ran ubuntu:bionic [12:26] oh, my account is locked [12:26] wtf [12:26] that's okay then [12:26] what about this: https://gist.github.com/igalic/c6c4a2bcdd3dc2c5bc80662f482b067f would cause my account to be locked? (it's got a ! in shadow) [12:26] try su ubuntu [12:27] there is no ubuntu [12:27] see user-data [12:28] aaah, there is no default user becasue your user-data overrides that config [12:28] that looks like cloud-init is being executer [12:28] executed* [12:29] here's what i was using: lxc launch --vm images:ubuntu/22.04 --config=user.user-data="$(cat cloud-init.user-data.yaml)" u2204 [12:33] could you add a - default before your - name: meena, recreate the instance and login with ubuntu and check the logs? [12:34] in the lines of Example 4 in: https://cloudinit.readthedocs.io/en/latest/reference/modules.html#users-and-groups [12:36] works now [12:37] why on earth is a user created by cloud-init locked by default?? [12:40] also, this is interesting: -rw------- 1 meena meena 0 Apr 20 12:36 /home/meena/.ssh/authorized_keys [12:41] let's try that again, with more sensible indentation [12:43] I think the issue is that lock_passwd's default is true. could you try adding a lock_passwd: false within your user's object ? [12:46] the reason behind that is security [12:47] aciba[m]: that's a weird reason if there's literally only one user created [12:48] but I guess it's cuz it's not the default user or something [13:14] according to the c-i docs lock_passwd defaults to True, so ANY user created will be locked unless you specify otherwise [13:15] for the default user that is controlled by /etc/cloud/cloud.cfg (created from cloud.cfg.tmpl) which, for Ubuntu, specifically specifies that the default user is to be locked.