[00:24] <clay> hey Im trying to use cloud init to setup a physical server, and am trying to use the dmi variable sub to specify metadata. I realized the cloud init thats running is v22.2, how can I make cloud init update before accessing the seedfrom url to have dmi variable substitution work?
[00:27] <claycovariant> hey im trying to use cloudinit to setup a physical server, how can i choose which cloud init version im running? Im trying to install jammy LTS
[00:31] <minimal> "how do I choose which cloud-init version"? What are you booting on the physical machine? Are you trying to add a cloud-init package AFTER booting the machine?
[00:33] <minimal> cloud-init is designed to run on 1st boot to do initial configuration
[00:33] <claycovariant> im using pxe boot to boot the physical machine passing in a command line with `vmlinuz autoinstall ip=dhcp auto=true cloud-config-url=/dev/null url=http://{PXE_SERVER}/isos/ubuntu22base.iso ds="nocloud-net;s=http://{PXE_SERVER}/cloudinit/__dmi.chassis-serial-number__/"`
[00:34] <claycovariant> yeah thats what im trying to do, use cloud-init to setup the machine, but I want to use cloud-init 23.1 to use dmi variable substitution to pass different metadata based on the machine
[00:34] <minimal> is this Subquity/Curtin installer?
[00:35] <claycovariant> right now its running 22.2
[00:35] <claycovariant> i believe so
[00:35] <dbungert> the version of cloud-init that will run will be the version built into the the install iso
[00:35] <minimal> I use cloud-init to setup physical machines but I use a disk image prepared with cloud-init installed
[00:36] <minimal> so from your command example above you're trying to pass "ds=" and "cloud-config-url" to the Ubuntu installer, not to cloud-init it seems
[00:37] <claycovariant> yeah, which from my understanding then calls cloud init at one point in the install
[00:37] <claycovariant> so i need to package cloud init into my iso?
[00:37] <minimal> that's Subquity/Curtin, a Ubuntu-specific way of installing that uses cloud-init, it's not cloud-init "proper"
[00:37] <dbungert> if you're using official Ubuntu ISOs cloud-init will already be present in there
[00:38] <minimal> dbungert: but that's via Subiquity/Curtin, right?
[00:38] <claycovariant> that ubuntu22base.iso is just an official ubuntu iso renamed
[00:39] <claycovariant> I was unclear on the differences of subiquity and cloud init, they seemed very similar looking at the repos
[00:39] <dbungert> subiquity is the installer, subquity interacts with cloud-init in two ways
[00:40] <dbungert> cloud-init is present in the install environment, which means you can send any cloud-config it knows how to process, to customize the installation environment
[00:40] <minimal> AFAIK there is a slight difference in the YAML used, subiquity has at least one additional "layer"
[00:40] <dbungert> cloud-init can be used to pass autoinstall to subiquity
[00:40] <dbungert> then finally, cloud-init runs in the target system on first boot
[00:43] <minimal> I don't think you can get the installer to update the cloud-init version so that it understands/uses the DMI-related url stuff you are passing the installer before the installer uses the url stuff you are passing in order for it to install the OS ;-)
[00:46] <dbungert> claycovariant: https://github.com/mwhudson/livefs-editor should let you put the newer cloud-init version into a modified version of the iso
[00:47] <claycovariant> thanks! ill give that a shot
[01:00] <blackboxsw> thx dbungert. claycovariant: I use something like the following locally to inject/upgrade cloud-init in isos for manual testing (leveraging livefs-editor) https://paste.ubuntu.com/p/9PVvsH69HM/ note it's pulling the version of cloud-init in from our daily build PPA so use at your own risk, but it's a good template on which to build different livefs-editor "actions" if you are rolling your own custom isos.
[01:11] <minimal> there seem to be quite a few Ubuntu Curtin/Subiquity related questions cropping up here recently, is there another Ubuntu channel that people should be referred to?
[01:25] <dbungert> there is significant overlap.  Some Subiquity questions could be redirected to an Ubuntu channel, but others will ultimately be cloud-init.  Or both.
[15:26] <holmanb> meeena: interesting, that is a bit surprising
[15:27]  * holmanb will read netbsd docs to be sure
[16:41] <meena> holmanb: i dunno. these systems diverged 30 years ago. and while there's a lot of cross pollination, something as low level as how do they boot their kernel will be fairly set in their own ways. c.f.: OpenBSD not having any loadable kernel modules
[20:09] <holmanb> meena: sysctl maybe? I see you can set / get kernel env vars, much like kenv on freebsd
[20:18] <meena> holmanb: i don't see anything relevant or useful https://man.netbsd.org/sysctl.7
[20:25] <holmanb> meena: there is an examlpe in https://man.netbsd.org/NetBSD-8.0/sysctl.8
[20:29] <meena> holmanb: which one??
[20:31] <holmanb> this part
[20:31] <holmanb> https://dpaste.org/QWuFY
[20:33] <meena> that's still something you'd have to write into the image tho, not an external mechanism 
[21:06] <holmanb> meena: true - isn't that how kenv works too? if not, then I misunderstood that
[21:09] <meena> kenv reads kernel_options. you can set them on the bootloader
[21:09] <meena> what I'm unclear about is how to chain that
[21:10] <meena> like, how do i tell virtio to pass those options to the FreeBSD bootloader
[21:11]  * meena asks in #qemu on OFTC
[21:12] <holmanb> I think you can use -append, but for that I think you need to also specify the kernel.
[21:19] <holmanb> meena: I will drop the netbsd changes from the PR, since I don't see a documented way to do this.
[21:21] <meena> 👍