Closed paginabianca closed 4 years ago
Hi @paginabianca,
The correct syntax would be shift-f10
, as there is no key state to turn on or off.
Sorry my bad, I followed the examples shows in the docs and thought that leftShift had the state to turn on and off same as for example leftCtrl.
I've tried switching out the leftShiftOn/Off
with shfit-f10
but it does not seem to work correctly.
When pressing shfit+f10
in the WinPE it should launch a cmd window where you can type out commands but when using the following boot command
"boot_command": [
"<shift-f10><wait2>setup /unattend:d:Unattend.xml<enter><wait>"
],
no cmd window is launched and thus the installation does not start.
I was, however, able to send shift+f10
to the VM by setting the Packer shorthand spacebar
to the qemu keycode shift-f10
inside the bootcommand_driver.go
file as such:
sMap := map[string]string{
"spacebar": "shift-f10",
"bs": "backspace",
"del": "delete",
"return": "ret",
"enter": "ret",
"pageUp": "pgup",
"pageDown": "pgdn",
}
and then use <spacebar>
inside the boot_command to launch the cmd window.
I had time to test your suggestion again, using the syntax <shift-f10>
or shirt-f10
sends the strings shift-f10 and shift+f10
.
I will take a closer look at the boot command and see if i can fix it.
Hi,
I had a look deeper into how Packer generates the key sequences, and it looks like I had missed a few pieces. So what I said above isn't correct. It looks like the Proxmox bootcommand driver should handle KeyAction
s, but doesn't. So from there we'd need to keep track of shift-states and so on.
I don't have time to look at this right away, but if you have some time, I believe that is where it needs to happen.
I've looked into that, but I'm not entirely sure how to keep track of what key is pressed. I added the missing packer shorthand keycodes. I'll open a WIP PR and try to figure out how to keep track of all key actions :+1:
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.
Overview of the Issue
When creating a Windows VM on Proxmox I wanted to use the
boot_command
to launch a cmd withshift+f10
. Packer/Qemu returns: invalid parameter leftshift when using<leftShiftOn>
or<leftShiftOff>
in theboot_command
.Reproduction Steps
Using the Proxmox builder try to send
<leftShiftOn>
or<leftShiftOff>
in the boot comand.Packer version
From
1.6.0
Simplified Packer Buildfile
The main issue lies in the boot command:
The complete simplified Packer Buildfile can be found here
Operating system and Environment details
Tested on the PVE host with kernel: 5.4.44-2-pve and on Arch Linux running the same kernel since it is a LXC on the PVE host.
Log Fragments
The important part is:
The complete log file can be found here