hashicorp / packer

Packer is a tool for creating identical machine images for multiple platforms from a single source configuration.
http://www.packer.io
Other
15.08k stars 3.33k forks source link

Capslock on host causes Hyper-V provisioning to fail #11793

Closed voltagex closed 2 years ago

voltagex commented 2 years ago

Community Note

Overview of the Issue

image

If capslock is on on the host, the wrong characters are sent to Hyper-V.

A paragraph or two about the issue you're experiencing.

Reproduction Steps

#hit capslock
packer build my_file.pkr.hcl

Packer version

From packer version

Simplified Packer Template

source "hyperv-iso" "autogenerated_1" {
  boot_wait = "1s"
  boot_command = [
  "<esc><wait5><esc><esc><enter><wait>",
  "set gfxpayload=keep<enter>",
  "linux /casper/vmlinuz ",
  "debug autoinstall 'ds=nocloud-net;s=http://10.0.0.144:8000/' --- <enter>",
  "noprompt autoinstall 'ds=nocloud-net;s=http://10.0.0.144:8000/' --- <enter>",
  "initrd /casper/initrd<enter>",
  "boot<enter>"]

  communicator         = "ssh"
  cpus                 = "4"
  disk_size            = "20000"
  enable_secure_boot   = false
  generation           = 2
  guest_additions_mode = "disable"
  http_directory       = "./local-testing/"
  iso_checksum         = "file:https://mirror.aarnet.edu.au/pub/ubuntu/releases/20.04.4/SHA256SUMS"
  iso_url              = "http://mirror.aarnet.edu.au/pub/ubuntu/releases/20.04.4/ubuntu-20.04.4-live-server-amd64.iso"
  #iso_checksum = "file:https://mirror.aarnet.edu.au/pub/ubuntu/releases/22.04/SHA256SUMS"
  #iso_url = "http://mirror.aarnet.edu.au/pub/ubuntu/releases/22.04/ubuntu-22.04-live-server-amd64.iso"
  memory               = "4096"
  shutdown_command     = "echo 'packer' | sudo -S -E shutdown -P now"
  ssh_password         = "packer"
  ssh_timeout          = "4h"
  ssh_username         = "packer"
  vm_name              = "${var.vm_name}"
}

build {
  sources = ["source.hyperv-iso.autogenerated_1"]
}

Operating system and Environment details

Windows 11, Packer 1.7.8 (because 1.8.0 fails with another bug I'm about to raise)

github-actions[bot] commented 2 years ago

This issue has been migrated to https://github.com/hashicorp/packer-plugin-hyperv/issues/66 due to the Packer Plugin split.

Please follow the new issue for updates.

github-actions[bot] commented 2 years ago

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.