diff --git a/CHANGELOG.md b/CHANGELOG.md index fb3d26c5c..027fc6fed 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -46,6 +46,8 @@ BUG FIXES: OS installers. [GH-1709] * builder/virtualbox: Remove the floppy controller in addition to the floppy disk. [GH-1879] + * builder/vmware: Add 100ms delay between keystrokes to avoid subtle + timing issues in most cases. [GH-1663] * builder/vmware: Bind HTTP server to IPv4, which is more compatible with OS installers. [GH-1709] * builder/vmware: Case-insensitive match of MAC address to find IP [GH-1989] diff --git a/builder/vmware/common/step_type_boot_command.go b/builder/vmware/common/step_type_boot_command.go index 49c579889..b23ede1da 100644 --- a/builder/vmware/common/step_type_boot_command.go +++ b/builder/vmware/common/step_type_boot_command.go @@ -200,10 +200,13 @@ func vncSendString(c *vnc.ClientConn, original string) { c.KeyEvent(KeyLeftShift, true) } + // Send the key events. We add a 100ms sleep after each key event + // to deal with network latency and the OS responding to the keystroke. + // It is kind of arbitrary but it is better than nothing. c.KeyEvent(keyCode, true) - time.Sleep(time.Second/10) + time.Sleep(100 * time.Millisecond) c.KeyEvent(keyCode, false) - time.Sleep(time.Second/10) + time.Sleep(100 * time.Millisecond) if keyShift { c.KeyEvent(KeyLeftShift, false)