packer-plugin-hyperv
packer-plugin-hyperv copied to clipboard
Capslock on host causes Hyper-V provisioning to fail
This issue was originally opened by @voltagex in https://github.com/hashicorp/packer/issues/11793 and has been migrated to this repository. The original issue description is below.
Community Note
- Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
- Please do not leave "+1" or other comments that do not add relevant new information or questions, they generate extra noise for issue followers and do not help prioritize the request
- If you are interested in working on this issue or have submitted a pull request, please leave a comment
Overview of the Issue
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)