I can not get autoinstall to select keyboard and language-Packer 1.8.3, Ubuntu22.04

I have tried every combination of boot sequence in my pkr.hcl file. It always stops on the installer asking for keyboard layout. the file validates.

It finds the iso in vShpere, makes the http page for user-data and meta-data, interrupts grub and types in the kernel, and boots up off the Ubuntu22.04 iso.

“Reached target Cloud-init target” is the last console message before the UI asking for keyboard layout. Example of one of many many iterations of my boot string.

  iso_paths      = ["[Resources] ISOs/ubuntu-22.04-live-server-amd64.iso"]
  http_directory = "http"
  boot_wait      = "5s"
  boot_command = [
    "c<wait>",
    "linux /casper/vmlinuz --- ds=\"nocloud-net;seedfrom=http://{{.HTTPIP}}:{{.HTTPPort}}/\"",
    "<enter><wait>",
    "initrd /casper/initrd",
    "<enter><wait>",
    "boot",
    "<enter>"
  ]

perms on user-data are wide open. I have stripped it down to a bare minimum.

#cloud-config
autoinstall:
  user-data:
    version: 1
    locale: en_US
    keyboard:
      layout: fr
    ssh:
      install-server: true
      allow-pw: true

Thanks for the help.

I’m wondering if it has something to do with not getting a DHCP address, and the new VM not being able to access the url for user-data. I’m trying to get the right syntax for adding a static IP on the grub boot line.

It was grub2 static boot syntax. 7 fields separated by colons.
f1:f2:f3:f4:f5:f6:f7
It appears the last field is for name resolver, or you can have that as a separate entry. Both worked for me. Also, it was not necessary to include f5 and f6 (hostname and NIC), but didn’t hurt to include.

ex.
ip=10.10.10.11::10.10.10.1:255.255.255.0:myhostname:ens160:none nameserver=206.8.8.8

I got same issue for virtualbox or parallels-iso, what is your solution? thx

If you like a working example of building ubuntu 22.04 (vsphere-iso), with cloud-init/autoinstall, I have one here.

NOTE: One exception to note: I don’t use the http server (due to network restrictions), but create & mount an iso-image during the build (req. correct tool depending on OS; ref documentation)