Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Special keys (<up> <down> <end> etc) being misinterpreted on Hyper-V #21

Open
ghost opened this issue Apr 22, 2021 · 0 comments
Open

Special keys (<up> <down> <end> etc) being misinterpreted on Hyper-V #21

ghost opened this issue Apr 22, 2021 · 0 comments

Comments

@ghost
Copy link

ghost commented Apr 22, 2021

This issue was originally opened by @robleady as hashicorp/packer#10882. It was migrated here as a result of the Packer plugin split. 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 hashicorp/packer#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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant