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

clayhey 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:24
=== clay is now known as claycovariant
claycovarianthey 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 LTS00:27
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:31
minimalcloud-init is designed to run on 1st boot to do initial configuration00:33
claycovariantim 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:33
claycovariantyeah 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 machine00:34
minimalis this Subquity/Curtin installer?00:34
claycovariantright now its running 22.200:35
claycovarianti believe so00:35
dbungertthe version of cloud-init that will run will be the version built into the the install iso00:35
minimalI use cloud-init to setup physical machines but I use a disk image prepared with cloud-init installed00:35
minimalso from your command example above you're trying to pass "ds=" and "cloud-config-url" to the Ubuntu installer, not to cloud-init it seems00:36
claycovariantyeah, which from my understanding then calls cloud init at one point in the install00:37
claycovariantso i need to package cloud init into my iso?00:37
minimalthat's Subquity/Curtin, a Ubuntu-specific way of installing that uses cloud-init, it's not cloud-init "proper"00:37
dbungertif you're using official Ubuntu ISOs cloud-init will already be present in there00:37
minimaldbungert: but that's via Subiquity/Curtin, right?00:38
claycovariantthat ubuntu22base.iso is just an official ubuntu iso renamed00:38
claycovariantI was unclear on the differences of subiquity and cloud init, they seemed very similar looking at the repos00:39
dbungertsubiquity is the installer, subquity interacts with cloud-init in two ways00:39
dbungertcloud-init is present in the install environment, which means you can send any cloud-config it knows how to process, to customize the installation environment00:40
minimalAFAIK there is a slight difference in the YAML used, subiquity has at least one additional "layer"00:40
dbungertcloud-init can be used to pass autoinstall to subiquity00:40
dbungertthen finally, cloud-init runs in the target system on first boot00:40
minimalI 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:43
dbungertclaycovariant: https://github.com/mwhudson/livefs-editor should let you put the newer cloud-init version into a modified version of the iso00:46
claycovariantthanks! ill give that a shot00:47
blackboxswthx 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:00
minimalthere 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:11
dbungertthere is significant overlap.  Some Subiquity questions could be redirected to an Ubuntu channel, but others will ultimately be cloud-init.  Or both.01:25
=== meeena is now known as meena
holmanbmeeena: interesting, that is a bit surprising15:26
* holmanb will read netbsd docs to be sure15:27
meenaholmanb: 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 modules16:41
holmanbmeena: sysctl maybe? I see you can set / get kernel env vars, much like kenv on freebsd20:09
meenaholmanb: i don't see anything relevant or useful https://man.netbsd.org/sysctl.720:18
holmanbmeena: there is an examlpe in https://man.netbsd.org/NetBSD-8.0/sysctl.820:25
meenaholmanb: which one??20:29
holmanbthis part20:31
holmanbhttps://dpaste.org/QWuFY20:31
meenathat's still something you'd have to write into the image tho, not an external mechanism 20:33
=== clay is now known as claycovariant
holmanbmeena: true - isn't that how kenv works too? if not, then I misunderstood that21:06
meenakenv reads kernel_options. you can set them on the bootloader21:09
meenawhat I'm unclear about is how to chain that21:09
meenalike, how do i tell virtio to pass those options to the FreeBSD bootloader21:10
* meena asks in #qemu on OFTC21:11
holmanbI think you can use -append, but for that I think you need to also specify the kernel.21:12
holmanbmeena: I will drop the netbsd changes from the PR, since I don't see a documented way to do this.21:19
meena👍21:21

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