#cloud-config autoinstall: version: 1 early-commands: - systemctl stop ssh locale: en_US.UTF-8 keyboard: layout: us variant: "" storage: layout: name: lvm identity: hostname: ubuntu username: ubuntu password: "$6$R9142dko7PYoTTJP$o19g/Av.dsI/fVEF4SJ8v0XqRcG6YdhQRGYLFrW2X4BG4gO2z3dWyOwio3pRrFXBMHNZHJlZPUp9yvR7elRKs0" ssh: allow-pw: true install-server: true user-data: disable_root: false runcmd: - 'echo "root:root" | chpasswd' late-commands: - rm -rf /target/etc/apt/preferences.d/90curtin.pref - curtin in-target --target=/target -- lvextend --extents +100%FREE /dev/mapper/ubuntu--vg-ubuntu--lv - curtin in-target --target=/target -- resize2fs /dev/mapper/ubuntu--vg-ubuntu--lv - echo 'PermitRootLogin yes' >> /target/etc/ssh/sshd_config - chmod -x /target/etc/update-motd.d/* - | cat << EOF > /target/etc/netplan/99-dhcp-any-interface.yaml network: ethernets: any_interface: match: name: "e*" dhcp4: true version: 2 EOF