/srv/irclogs.ubuntu.com/2023/04/20/#cloud-init.txt

meenacan 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
meenathe cloud-init data I pass seems to be ignored09:41
aciba[m]mena: does this work? lxc launch ubuntu-daily:jammy --config=user.user-data="$(cat ./ud.yaml)" j12:15
aciba[m]meena ^12:15
meenaaciba[m]: i need a vm, but, still pretty poorly (I'll tell you in a second)12:16
meenalxc launch --vm bleeding:edge12:18
aciba[m]meena: if this is the first time you use lxd, run lxd init12:19
meenameena@76ix ~/s/cloud> ssh 10.248.101.19812:19
meenaReceived disconnect from 10.248.101.198 port 22:2: Too many authentication failures12:19
meenaDisconnected from 10.248.101.198 port 2212:19
meenaat least SSH is on!12:20
aciba[m]does `lxc shell <instance_name>` work ?12:20
meenaaciba[m]: i need a VM12:21
meenalxc 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/7111c1f4911d5d7fa30d600f1e710d3812:21
meenatrying  https://gist.github.com/igalic/c6c4a2bcdd3dc2c5bc80662f482b067f now12:23
aciba[m]If run lxc launch ubuntu-daily:jammy vj --vm, wait a bit, and lxc shell vj, then I am able to connect12:23
meena@_@12:25
meenai can just connect to the shell12:25
aciba[m]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
meenaaciba[m]: i just ran ubuntu:bionic12:25
meenaoh, my account is locked12:26
meenawtf12:26
aciba[m]that's okay then12:26
meenawhat about this: https://gist.github.com/igalic/c6c4a2bcdd3dc2c5bc80662f482b067f would cause my account to be locked? (it's got a ! in shadow)12:26
aciba[m]try su ubuntu12:26
meenathere is no ubuntu12:27
meenasee user-data12:27
aciba[m]aaah, there is no default user becasue your user-data overrides that config12:28
aciba[m]that looks like cloud-init is being executer12:28
aciba[m]executed*12:28
meenahere's what i was using: lxc launch --vm images:ubuntu/22.04 --config=user.user-data="$(cat cloud-init.user-data.yaml)" u220412:29
aciba[m]could you add a - default before your - name: meena, recreate the instance and login with ubuntu and check the logs?12:33
aciba[m]in the lines of Example 4 in: https://cloudinit.readthedocs.io/en/latest/reference/modules.html#users-and-groups12:34
meenaworks now12:36
meenawhy on earth is a user created by cloud-init locked by default??12:37
meenaalso, this is interesting: -rw------- 1 meena meena 0 Apr 20 12:36 /home/meena/.ssh/authorized_keys12:40
meenalet's try that again, with more sensible indentation12:41
aciba[m]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:43
aciba[m]the reason behind that is security12:46
meenaaciba[m]: that's a weird reason if there's literally only one user created12:47
meenabut I guess it's cuz it's not the default user or something12:48
minimalaccording to the c-i docs lock_passwd defaults to True, so ANY user created will be locked unless you specify otherwise13:14
minimalfor 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.13:15

Generated by irclog2html.py 2.7 by Marius Gedminas - find it at mg.pov.lt!