https://rancher.com/ logo
Title
b

best-city-49378

06/19/2022, 12:06 PM
b

best-accountant-68201

06/20/2022, 3:59 PM
Does qemu-system-x86_64.exe and ssh.exe support Unix sockets on (recent version of) Windows?
Especially
ssh -L
f

fast-garage-66093

06/20/2022, 4:11 PM
You mean between Linux distros running in different namespaces, or between Linux and Windows? The latter has been broken in WSL2 afaiu, and you have to tunnel data over vsock instead. https://github.com/microsoft/WSL/issues/5961
b

best-accountant-68201

06/20/2022, 4:12 PM
Just for between Linux and Windows (for porting Lima to Windows host)
(I mean non-WSL2 native Windows host)
f

fast-garage-66093

06/20/2022, 4:13 PM
Yeah, that is the part that only works for WSL1 but not WSL2 afaiu
But you are talking about qemu and windows, not wsl2 and windows, right? So this would be something that would have to be provided/supported by qemu, right?
b

best-accountant-68201

06/20/2022, 4:19 PM
yes, not WSL2
Just
limactl.exe
with
qemu-system-x86_64.exe
and
ssh.exe
on plain Windows
f

fast-garage-66093

06/20/2022, 4:19 PM
Yeah, then I don't know. It is broken in WSL2 because of the switch to hyper-v
b

best-accountant-68201

06/20/2022, 4:20 PM
I know Windows added support for AF_UNIX a few years ago, but I’m not sure whether QEMU and SSH are updated to support AF_UNIX on Windows
b

best-city-49378

06/20/2022, 4:57 PM
I think it needs to use fifo instead, but haven’t gotten so far just yet. Current ha sock returned an error code
b

best-accountant-68201

06/20/2022, 4:58 PM
Thanks, but it would be nice if we can patch QEMU to use AF_UNIX on WIndows
b

best-city-49378

06/20/2022, 4:58 PM
User needed more work, e.g. uid and home - similar to fallback user name
Can do an update later, not sure if the “last 20%” is worth the effort
I was only looking at the internal needs, like was required by the hostagent and qmp. Not so much docker legacy tunnels
👍 1
But only got as far as the path, somehow I always forgot how silly the DOS paths are until I wander into Windows by mistake
I don’t think I will bother with all paths. Can use a mix. https://www.msys2.org/docs/filesystem-paths/
I’m not sure whether QEMU and SSH are updated to support AF_UNIX on Windows
Nothing seems to support unix sockets, not qemu (serial, qmp) not ssh (ControlMaster, tunneling) So most likely it would have to used named pipes (fifo) for qemu and tcp sockets for the agents
There is a tool "cygpath" to translate the paths, and it is needed because e.g. go embed hardcodes "/"