-
Notifications
You must be signed in to change notification settings - Fork 654
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
multipass.exe in Windows is not redirecting STDIN #3749
Comments
@lars18th |
Good news! 👍 |
Possible duplicate of #1170 |
Hi @ricab , I'm not sure, but I think it might be involuntarily fixed in #3735. And I can't test it personally because the Windows client source code is hidden. Perhaps you could compile one version with this patch and test it. |
Hi @ricab , Just comment that the latest version 1.15.0 suffers from the same bug in Windows. |
Describe the bug
multipass.exe
Windows version of the CLI tool, this binary is not supporting any STDIN redirection. Instead it attach directly to the terminal API (or something else, but you can read but not write with a PIPE connected to this binary).To Reproduce
You can test it trying to stablish a PuTTY session with the ssh-connection protocol:
psusan
tool withsudo apt install putty-tools
inside the virtual machine.plink.exe -ssh-connection -sshlog .\plink.log -proxycmd "D:\multipass.exe exec vmname -- psusan" dummy
How, and what happened?
multipass.exe
STDIN redirection.psusan
process is running inside the vmname doing anothermultipass shell vmname
andps -ae | grep psusan
.more plink.log
).plink.exe
with a CTRL+C, thepsusan
and the ssh connection continues running. You need to kill it inside the virtual machine.Expected behavior
The same command in a Linux host with identical configuration works like a charm:
Logs
Because this is pure command line, no
multipass_gui.log
exist.You can see the
plink.log
running with the Windows version:This indicates that the
multipass.exe
is writing to the STDOUT, because the line:Event Log: Remote version: [email protected]_Release_0.81
is writed from the other end (the psusan process) and it arrived to the plink tool that reads from the STDOUT connected to the multipass process. However, the STDIN is NEVER readed from the multipass process. Therefore, nothing arrives to the other end.
Additional info
OS
: Microsoft Windows [Version 10.0.22631.4317]multipass version
:multipass info
:multipass get local.driver
:Additional context
Similar effect appears if you try to run the tool from WSL. Nothing is readed from the STDIN pipe.
I hope you will fix this soon. To put the windows cli tool in pair with the linux version.
And additionally try to fix the closing of ssh connections to the virtual machine if the multipass process cannot establish the connection. With these tests I ended up with a lot of phantom multipass processes on the Windows workstation. All because the CTRL+C of the incomplete connection doesn't terminate the process.
The text was updated successfully, but these errors were encountered: