I'm working with Ubuntu 20.40, where I'm creating an ISO with the user-data/meta-data on the image, then booting a VMware VM off it. I watch the output, it seems to create the logical volumes and mount points; it installs software, the user I configured, updates etc., but every time I end up with a filesystem I didn't ask for. I've put this through YAML validators, validated it with cloud-init, compared it to other configs and I cannot figure out what the problem is.
I stripped it all down to just the basics and it still does the same thing. Here's the user-data (sanitized):
#cloud-config autoinstall: version: 1 # Reboot doesn't work shutdown: reboot apt:
geoip: true
preserve_sources_list: false
primary:
- arches: [amd64]
uri: http://mirror.domain.com/ubuntu
- arches: [default]
uri: http://mirror.domain.com/ubuntu-ports keyboard: {layout: us, toggle: null, variant: ''} locale: en_US user-data:
disable_root: false
users:
- default
- name: username
gecos: Gecos Name
ssh-authorized-keys:
- ssh-ed25519 OMITTED
passwd: OMITTED
lock_passwd: false
shell: /bin/bash
groups: adm, sudo, root
sudo: ALL=(ALL) NOPASSWD:ALL packages: [openssh-server, build-essential, htop, chrony, vim, clevis, clevis-luks,
dracut-network, oddjob, oddjob-mkhomedir, cups-client, yp-tools, postfix, libopenscap8,
aide, crypto-policies, firefox, perl, git, build-essential] ssh:
allow-pw: true
authorized-keys: []
install-server: true storage: grub:
reorder_uefi: false
config:
- {ptable: gpt, path: /dev/sda, wipe: superblock, preserve: false, name: '', grub_device: true,
type: disk, id: disk-sda}
- {device: disk-sda, size: 5M, flag: bios_grub, number: 1, preserve: false,
type: partition, id: partition-0}
- {device: disk-sda, size: 1G, flag: '', number: 2, preserve: false, type: partition, id: partition-1}
- {fstype: ext4, volume: partition-1, preserve: false, type: format, id: format-1}
- {device: disk-sda, size: -1, wipe: superblock, flag: '', number: 3, preserve: false, grub_device: false, type: partition, id:
partition-2 }
- {name: system, devices: [ partition-2 ], preserve: false, type: lvm_volgroup, id: lvm_volgroup-0 }
- {name: root, volgroup: lvm_volgroup-0, size: 70G, wipe: superblock, preserve: false, type: lvm_partition, id: lvm_partition-0}
- {fstype: ext4, volume: lvm_partition-0, preserve: false, type: format, id: format-2}
- {path: /, device: format-2, type: mount, id: mount-2}
- {name: tmp, volgroup: lvm_volgroup-0, size: 15G, wipe: superblock, preserve: false, type: lvm_partition, id: lvm_partition-1}
- {fstype: ext4, volume: lvm_partition-1, preserve: false, type: format, id: format-3}
- {path: /tmp, device: format-3, type: mount, id: mount-3}
- {name: var, volgroup: lvm_volgroup-0, size: 15G, wipe: superblock, preserve: false, type: lvm_partition, id: lvm_partition-2}
- {fstype: ext4, volume: lvm_partition-2, preserve: false, type: format, id: format-4}
- {path: /var, device: format-4, type: mount, id: mount-4}
- {name: varlogaudit, volgroup: lvm_volgroup-0, size: 15G, wipe: superblock, preserve: false, type: lvm_partition, id: lvm_partition-3}
- {fstype: ext4, volume: lvm_partition-3, preserve: false, type: format, id: format-5}
- {path: /var/log/audit, device: format-5, type: mount, id: mount-5}
When I'm done and I reboot the VM, the filesystem looks like this. There is plenty of disk space (250GB) and 10GB of RAM. Resources aren't the issue. The cloud-init logs don't say anything obvious to me (there's a lot in there):
Filesystem Size Used Avail Use% Mounted on
udev 4.9G 0 4.9G 0% /dev
tmpfs 995M 1.2M 994M 1% /run
/dev/mapper/ubuntu--vg-ubuntu--lv 122G 7.0G 109G 6% /
tmpfs 4.9G 0 4.9G 0% /dev/shm
tmpfs 5.0M 0 5.0M 0% /run/lock
tmpfs 4.9G 0 4.9G 0% /sys/fs/cgroup
/dev/sda2 974M 111M 796M 13% /boot
/dev/loop1 70M 70M 0 100% /snap/lxd/19188
/dev/loop2 32M 32M 0 100% /snap/snapd/10707
/dev/loop0 56M 56M 0 100% /snap/core18/1944
tmpfs 995M 0 995M 0% /run/user/1000
I can't see what's going wrong here.
Thanks!