hashicorp / hashicorp/packer-plugin-hyperv
Special keys (<up> <down> <end> etc) being misinterpreted on Hyper-V
- Dominant language
- Go
- Stars
- 27
- Forks
- 28
- PR merge metrics
- No merged PRs in 30d
Description
_This issue was originally opened by @robleady as hashicorp/packer#10882. It was migrated here as a result of the [Packer plugin split](https://github.com/hashicorp/packer/issues/8610#issuecomment-770034737). The original body of the issue is below._
When using certain special keys in the boot_command of a VM with the Hyper-V builder, they are being interpreted as numbers rather than the required key.
When booting a Debian 10.x UEFI installation, I use the following boot_command to move into the Install menu and edit the linux boot parameters.
e
The and keys are being interpreted as the numbers 2 and 1 respectively, which are the corresponding numbers on a number pad keyboard - ie the keys that would be pressed were numlock turned on.
This looks to be the same issue mentioned in https://github.com/hashicorp/packer/issues/7315
As discussed in that previous issue, this can be worked around by surrounding each special key with and , however this is makes for a rather cumbersome build file.
Packer version 1.7.2
Snippet from build file:
source "hyperv-iso" "debian10-uefi" {
boot_command = ["e",
...
]
...
generation = 2
enable_secure_boot = "true"
secure_boot_template = "MicrosoftUEFICertificateAuthority"
}
Windows 10, x86_64, Hyper-V ISO builder.
Attempting to build a Debian 10.9 machine.
2021/04/07 15:55:55 packer.exe plugin: Special code 'Press' '' found, replacing with: &{[e0 50] [e0 d0]}
2021/04/07 15:55:56 packer.exe plugin: [INFO] Waiting 1s
2021/04/07 15:55:57 packer.exe plugin: Sending char 'e', code '1292', shift false
2021/04/07 15:55:58 packer.exe plugin: [INFO] Waiting 1s
2021/04/07 15:55:59 packer.exe plugin: Special code 'Press' '' found, replacing with: &{[e0 50] [e0 d0]}
2021/04/07 15:55:59 packer.exe plugin: Special code 'Press' '' found, replacing with: &{[e0 50] [e0 d0]}
2021/04/07 15:55:59 packer.exe plugin: Special code 'Press' '' found, replacing with: &{[e0 50] [e0 d0]}
2021/04/07 15:55:59 packer.exe plugin: Special code 'Press' '' found, replacing with: &{[e0 4f] [e0 cf]}
2021/04/07 15:56:00 packer.exe plugin: [INFO] Waiting 1s
Contributor guide
Assessment
This issue has not been assessed yet.