/srv/irclogs.ubuntu.com/2022/07/28/#cloud-init.txt

holmanbblackboxsw: I don't feel strongly about a bot, thanks for the reviews and feedback today!01:48
danboidI'm trying to write a simple cloud-init config that just creates 1 mbr ext4 partition on sda but I've had no luck yet. My target is a VirtualBox VM.15:16
danboidI have my reasons for it being VB15:16
danboidVMDK is the best disk format to use with LTSP15:16
danboidand qemu doesn't seem to support vmdk15:17
danboidI'm trying to automate the installation of Ubuntu server 22.04 via cloud-init. I can share my latest non working attempt if anyone wants to see it15:18
danboidI've had the default example work but I don't want LVM, don't want GPT and I only want 1 ext4 partition15:19
danboidIs there a working example of this anywhere?15:19
danboidMaybe I don't do it with cloud-init at all but curtin?15:21
blackboxswdanboid: share away with paste.opendev.org or paste.ubuntu.com or similar. walk us through what you are tring to do15:21
blackboxsw*trying15:22
danboidI'm basically following this guide:15:23
danboidhttps://ubuntu.com/server/docs/install/autoinstall-quickstart15:23
danboidbut I need different partitioning to what you get if you run that example as is15:24
danboidHere's my current effort, not working15:24
danboidhttps://pastebin.ubuntu.com/p/8V55ggRXPB/15:24
danboidI don't want LVM and I just want a mbr disk label15:25
danboidfor 1 ext4 partition filling sda15:25
danboidI've checked that VB calls it sda and not vda in my test VM15:26
danboidI'm using the method that uses cloud-localds to create a seed iso15:27
danboidThat seems to be my only option with VB15:28
danboidcloud-init schema -c user-data15:29
danboidsays the syntax is supposedly OK but its not doing what I want it to15:29
blackboxswdanboid: thanks.  ok, so that would be related to the ubuntu live-installer (desktop and/or server) which happens to drive both curtin for disk/partition setup and cloud-init  for users/packages/credentials etc. I'm processing your suggestion, but I also want to make sure we steer the conversation to the right channel so that curtin/live-installer folks can also participate15:29
danboidblackboxsw, OK, thanks!15:29
blackboxsw@danboid `sudo cloud-init query userdata` to see what cloud-init "got" from the installer15:30
danboidblackboxsw, The output of that command, when tun on my test vm, doesn't list any details relating to my partition creation attempt15:33
danboidI have tried to adapt the code from here, unsuccessfully of course:15:33
danboidhttps://cloudinit.readthedocs.io/en/latest/topics/examples.html15:34
blackboxswdanboid: ok at least that confirms that the storage portion of that config is being driven by curtin (not cloud-init) in this environment. I would have expected you to see at least "users:" key that represents your ubuntu user and password15:34
danboidThe Disk Setup section of that page15:35
danboidblackboxsw, Yes I see Users15:35
danboidblackboxsw, I also see15:35
danboidblackboxsw, growpart mode is off and resize_rootfs is false15:36
danboidThey're obviously disk related15:36
danboidbut nothing appear about ext4 or mbr15:37
blackboxswdanboid: the complexity here is that if you want something to be driven by cloud-init specifically (and you are using this installer's autoinstall, you want any passthrough config for cloud-init to be provided through  "autoinstall:user-data:{cloud-config-stuff here}".   So if you wanted to manipulate storage using cloud-config directives, you'd put supplemental config content under that autoinstall:user-data YAML path.15:38
danboidThe locale is getting set too15:38
blackboxswdanboid: that said, I think you want to drive storage config best using the autoinstall top-level storage directives that are passed to curtin. But,I'm trying to parse your use-case to understand how that'd align with existing  https://ubuntu.com/server/docs/install/autoinstall-reference15:40
danboidI'm writing a script that automates the process of creating a VB VM and then auto installing a bare bones Ubuntu server. I've got it all working now except the automation of the Ubuntu partitioning15:41
danboidThe default not being to my liking15:42
danboidSo whats the easiest way to get the partitions how I want them?15:42
danboidIt seems you know most of the solution now but I didn't quite undestand your response. Put the config where?15:43
blackboxswthis is a good use-case. I think we need to figure the best way to direct your config there. Sorry I'm context switching a bit in a meeting but I'd like to get back to you here on prefered suggestions. It may be a bit before I can dive into the solution/context here.15:44
danboidblackboxsw, OK thanks15:44
danboidhttps://bugs.launchpad.net/subiquity/+bug/198304116:13
ubottuLaunchpad bug 1983041 in subiquity "Add partitioning example to autoinstall-quickstart" [Undecided, New]16:14
blackboxswholmanb: nice catch on https://github.com/canonical/cloud-init/pull/1619 hotplug select_activators fix needed. I'll address that now20:14
ubottuPull 1619 in canonical/cloud-init "network: add system_info network activator cloud.cfg overrides" [Open]20:14
holmanbthanks :)20:16
=== th3machine is now known as t0day
=== EugenMayer9 is now known as EugenMayer

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