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 = [
    "linux /casper/vmlinuz --- ds=\"nocloud-net;seedfrom=http://{{.HTTPIP}}:{{.HTTPPort}}/\"",
    "initrd /casper/initrd",

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

    version: 1
    locale: en_US
      layout: fr
      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.
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.

ip= nameserver=

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)