meena | 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 |
---|---|---|
meena | the cloud-init data I pass seems to be ignored | 09:41 |
aciba[m] | mena: does this work? lxc launch ubuntu-daily:jammy --config=user.user-data="$(cat ./ud.yaml)" j | 12:15 |
aciba[m] | meena ^ | 12:15 |
meena | aciba[m]: i need a vm, but, still pretty poorly (I'll tell you in a second) | 12:16 |
meena | lxc launch --vm bleeding:edge | 12:18 |
aciba[m] | meena: if this is the first time you use lxd, run lxd init | 12:19 |
meena | meena@76ix ~/s/cloud> ssh 10.248.101.198 | 12:19 |
meena | Received disconnect from 10.248.101.198 port 22:2: Too many authentication failures | 12:19 |
meena | Disconnected from 10.248.101.198 port 22 | 12:19 |
meena | at least SSH is on! | 12:20 |
aciba[m] | does `lxc shell <instance_name>` work ? | 12:20 |
meena | aciba[m]: i need a VM | 12:21 |
meena | 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:21 |
meena | trying https://gist.github.com/igalic/c6c4a2bcdd3dc2c5bc80662f482b067f now | 12:23 |
aciba[m] | If run lxc launch ubuntu-daily:jammy vj --vm, wait a bit, and lxc shell vj, then I am able to connect | 12:23 |
meena | @_@ | 12:25 |
meena | i can just connect to the shell | 12: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 |
meena | aciba[m]: i just ran ubuntu:bionic | 12:25 |
meena | oh, my account is locked | 12:26 |
meena | wtf | 12:26 |
aciba[m] | that's okay then | 12:26 |
meena | what 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 ubuntu | 12:26 |
meena | there is no ubuntu | 12:27 |
meena | see user-data | 12:27 |
aciba[m] | aaah, there is no default user becasue your user-data overrides that config | 12:28 |
aciba[m] | that looks like cloud-init is being executer | 12:28 |
aciba[m] | executed* | 12:28 |
meena | 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: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-groups | 12:34 |
meena | works now | 12:36 |
meena | why on earth is a user created by cloud-init locked by default?? | 12:37 |
meena | also, this is interesting: -rw------- 1 meena meena 0 Apr 20 12:36 /home/meena/.ssh/authorized_keys | 12:40 |
meena | let's try that again, with more sensible indentation | 12: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 security | 12:46 |
meena | aciba[m]: that's a weird reason if there's literally only one user created | 12:47 |
meena | but I guess it's cuz it's not the default user or something | 12:48 |
minimal | according to the c-i docs lock_passwd defaults to True, so ANY user created will be locked unless you specify otherwise | 13:14 |
minimal | 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. | 13:15 |
Generated by irclog2html.py 2.7 by Marius Gedminas - find it at mg.pov.lt!