packer-plugin-xenserver
packer-plugin-xenserver copied to clipboard
Ubuntu needs its autoinstall config Typed twice
In the #7 (examples/ubuntu/ubuntu-2004.pkr.hcl) the boot command types the autoinstall config twice.
boot_command = [
"<esc><f6> autoinstall ds=nocloud-net;s=http://{{ .HTTPIP }}:{{ .HTTPPort }}/<enter><wait>",
"<f6><wait><esc><wait> autoinstall ds=nocloud-net;s=http://{{ .HTTPIP }}:{{ .HTTPPort }}/<enter><wait>"
]
I does not currently work otherwise.
I tested this and both boot commands are required to work. So ignore this comment. This should be a bug, but is definitely outside the scope updating these examples to use HCL. Originally posted by @ddelnano in https://github.com/ddelnano/packer-plugin-xenserver/pull/7#discussion_r616344596
Not really a major problem, but not pretty and possible source for future problems
Not quite sure what happened, but this is no longer working on the 20.04.3 iso.
Edit: yk-apparently the typing logic is just straight up broken. Currently trying to figure out why its omitting keys.
Thanks for reporting @theAeon. I'll follow the mentioned issue in addition to looking into this myself. As you saw, that logic was taken from the packer source so I never looked into it in detail.
Has anyone got autoinstall to work? I always get prompted with the "Add 'autoinstall' to your kernel command line to avoid this" Even on unmodified template example. Don't have this problem on my vsphere and proxmox builders with ubuntu hcl template. Any suggestion on what i'm doing wrong? If i select "yes" the rest of the installer goes trough.
For anyone with this issue the below boot commands are working for me on 20.04.5 server
// Boot Settings
clone_template = "Ubuntu Focal Fossa 20.04"
boot_wait = "5s"
boot_command = [
"<esc><wait10><esc>",
"<wait5><f6><wait5><esc>",
"autoinstall ds=nocloud-net;seedfrom=http://{{ .HTTPIP }}:{{ .HTTPPort }}/",
"<enter>"
]
install_timeout = "120m"
Here is my source ISO
// Source Media
iso_url = var.src_media_url
iso_checksum = var.src_media_checksum
iso_checksum_type = var.src_media_checksum_type
tools_iso_name = "guest-tools.iso"
// Source Media
src_media_url = "https://releases.ubuntu.com/focal/ubuntu-20.04.5-live-server-amd64.iso"
src_media_checksum = "5035be37a7e9abbdc09f0d257f3e33416c1a0fb322ba860d42d74aa75c3468d4"
src_media_checksum_type = "sha256"