如何将 curtin 存储配置转换为 cloud-init disk_setup

如何将 curtin 存储配置转换为 cloud-init disk_setup

我正在使用 Ubuntu 20.04 和 22.04 LTS 的云映像来配置模板映像以供进一步配置。

我之前尝试过使用实时服务器镜像,但是通过在文件下添加我的配置,autoinstall配置没有成功。user-datauser-dataautoinstall

我确实有一个curtin基于存储的配置,希望user-data使用 将其写入我的文件中cloud-init。配置如下:

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}

我不确定如何将autoinstall/curtin模式映射到disk_setupfs_setup的模式cloud-init

是否有一些工具可以帮助我将一种模式转换为另一种模式?

相关内容