kubernetes-sigs/image-builder

Add the datasource configuration when building Ubuntu 22.04 OVA's

DimpleRajaVamsi opened this issue · 1 comments

What steps did you take and what happened:
When creating clusters on the vSphere environment using Ubuntu 22.04 OVA the datasource for cloud-init is nocloud instead of vmware this is because ds-identify script checks if there is any data source present in the kernel command, this causes Cloud-Init to pick NoCloud datasource as we are using Auto Install from Ubuntu 22.04, so need to add the ds-identify.cfg in /etc/cloud/ with datasource: VMware to set the appropriate cloud data source.

  "boot_command_prefix": "c<wait>linux /casper/vmlinuz --- autoinstall ds='nocloud-net;s=http://{{ .HTTPIP }}:{{ .HTTPPort }}/22.04.efi/'<enter><wait>initrd /casper/initrd<enter><wait>boot<enter>",
dscheck_NoCloud() {
    local fslabel="cidata CIDATA" d=""
    case " ${DI_KERNEL_CMDLINE} " in
        *\ ds=nocloud*) return ${DS_FOUND};;
    esac
    case " ${DI_DMI_PRODUCT_SERIAL} " in
        *\ ds=nocloud*) return ${DS_FOUND};;
    esac

Along with this need to remove the below could init file as per this KB [Similar issue at #1080 ]

  • /etc/cloud/cloud.cfg.d/subiquity-disable-cloudinit-networking.cfg
  • /etc/cloud/cloud.cfg.d/99-installer.cfg

What did you expect to happen:
The cloud-Init data source should be VMware instead of NoCloud

Anything else you would like to add:

Environment:

Project (Image Builder for Cluster API):

Additional info for Image Builder for Cluster API related issues:

  • OS (e.g. from /etc/os-release, or cmd /c ver): Ubuntu 22.04

/kind bug
[One or more /area label. See https://github.com/kubernetes-sigs/cluster-api/labels?q=area for the list of labels]

/assign