Packer Ubuntu 20.04 autoinstall via CD drive

After a long odyssee with try and error I finally found a solution that works for me.

For packer v1.6.6 / vsphere 7.0 / ubuntu-20.04.1-live-server-amd64.iso the boot_command does not need a datasource (ds=) and not seedfrom (s=). The following is enough:

  cd_files = [
    "./ubuntu-20.04/meta-data",
    "./ubuntu-20.04/user-data"]
  cd_label = "cidata"

  boot_wait = "2s"

  boot_command = [
    "<esc><esc><esc>",
    "<enter><wait>",
    "/casper/vmlinuz ",
    "initrd=/casper/initrd ",
    "autoinstall ",
    "<enter>"
  ]

I don’t know why there are blog post around using a datasource and the seedfrom in the boot_command stanza if it does more harm than good for ubuntu-20.04.1-live-server-amd64.iso

Hope this works for you too. Let us know
Best Roland

5 Likes