1

I am using the Cloud Images for Ubuntu 20.04 and 22.04 LTS to provision a template image for further provisioning.

I previously tried using the Live Server Images with autoinstall and had no sucess with the configuration by adding my user-data configuration under the user-data of the autoinstall file.

I do have a curtin based storage configuration that I wish to write in my user-data file using cloud-init. The configuration is as follows:

storage:
    config:
      - {ptable: gpt, path: /dev/vda, wipe: superblock-recursive,
         preserve: false, name: '', grub_device: false, type: disk,
         id: disk-sda}
      - {device: disk-sda, size: 512M, wipe: superblock, flag: boot,
         number: 1, preserve: false, grub_device: true, type: partition,
         id: partition-0}
      - {fstype: fat32, volume: partition-0, preserve: false, type: format,
         id: format-0, label: boot}
      - {device: disk-sda, size: 30%, wipe: superblock, flag: '',
         number: 2, preserve: false, type: partition, id: partition-2}
      - {fstype: ext4, volume: partition-2, preserve: false, type: format,
         id: format-1, label: root}
      - {device: format-1, path: /, type: mount, id: mount-1}
      - {device: disk-sda, size: -1, wipe: superblock, flag: '',
         number: 3, preserve: false, type: partition, id: partition-3}
      - {fstype: ext4, volume: partition-3, preserve: false, type: format,
         id: format-2, label: root}
      - {device: format-2, path: /home, type: mount, id: mount-2}
      - {device: format-0, path: /boot/efi, type: mount, id: mount-0}

I am not sure how to map the autoinstall / curtin schema to that of disk_setup and fs_setup of cloud-init.

Is there some tool that can help me convert one schema to the other?

Shan-Desai
  • 151
  • 7

0 Answers0