Packer Ubuntu 20.04 build: autoinstall never triggers, ds parameter ignored at grub prompt

Unattended Packer builds of Ubuntu 20.04 (vmware-iso, virtualbox-iso, hyperv-iso) broke because 20.04 dropped the alternate installer for subiquity, and autoinstall via bootcommand never triggered: the VM dropped to the grub prompt or the installer welcome screen and ignored the ds=nocloud-net parameter. Many documented bootcommand examples did not work. Quoting keeps the full ds=nocloud-net value together as one kernel parameter instead of letting grub split it.

At the grub prompt, the ds parameter must be quoted or subiquity ignores it. Use a bootcommand like: "[esc][esc][esc]", "set gfxpayload=keep[enter]", "linux /casper/vmlinuz ", "\"ds=nocloud-net;s=http://{{ .HTTPIP }}:{{ .HTTPPort }}/\" ", "quiet autoinstall ---[enter]", "initrd /casper/initrd[enter]", "boot[enter]". Multiple builders confirmed that quoting the ds value is what made autoinstall trigger; without the quotes the parameter is silently dropped. Also use a bootwait of a few seconds so Packer catches the grub timing. Source: https://github.com/hashicorp/packer/issues/9115

Source: https://github.com/hashicorp/packer/issues/9115