Member-only story

Troubleshooting “Make raw terminal failed: The handle is invalid?” error when running a binary command in Microsoft Windows

Bryant Jimin Son
1 min readJul 21, 2020

--

As I was working with virtctl, which is the Virtual Machine (VM) Command Line Interface (CLI) for Kubevirt, I was getting the following error when running virtctl console VM_NAME command in Microsoft Windows 10 through Cygwin/MingW64 terminal:

“Make raw terminal failed: The handle is invalid?”

I previously tried the same command from Mac Pro machine, and I did not encounter the issue before. Googling the error message, I found the some similar issues:

Reading through the threads and discussions, the issue is most likely due to ssh binary in Microsoft Windows 10 is trying to run the binary, most likely built in GO, as the Window command. The error seems to be fixed in the later version, but the work around is to prepend the command with a console emulator like winpty like this:

winpty virtctl console VM_NAME

Then, your command should work without an issue.

--

--

Bryant Jimin Son
Bryant Jimin Son

Written by Bryant Jimin Son

A cloud practitioner talking about technology, travels & career tips. But I will sometimes cover financial advises and some random stuffs.

No responses yet