Closed Youxu-Chen closed 1 year ago
Hi,@irudakov77: Please help to confirm whether it is a problem with the viosock driver. If not, it may be a problem with my demo code.
Hello, this problem also reproduces on my end with a similar test driver program. A client in the Windows guest can send messages to the Linux host. However after this tunnel is established the host cannot send anything in reply, recv(2)
on the guest side will block indefinitely.
Additionally, if I run the server in the Windows guest, the Linux host acting as a client cannot establish a connection. I get errno 54, Connection reset by peer
.
I'm running a Windows VM guest with:
Windows Server 21H2 (Build 20348.1249)
VirtIO socket driver: 7.16.3.100
Linux Host:
RHEL 8
Kernel 4.18.0-348.20.1.el8
QEMU emulator version 6.0.0 (qemu-kvm-6.0.0-33.el8)
Update: It seems my test driver had a few bugs. All is working on my side with this older version
Hi @Youxu-Chen
After doing some more investigation, I believe the latest version in master
has a commit that fixes this issue: https://github.com/virtio-win/kvm-guest-drivers-windows/pull/833
I was using an older version which did not have this specific problem, but the latest build available from https://fedorapeople.org/groups/virt/virtio-win/direct-downloads/upstream-virtio/ has this exact problem.
Unfortunately I can't find a new build with the fix. You'll have to build the drivers yourself.
Hello,
Unfortunately I can't find a new build with the fix. You'll have to build the drivers yourself.
No new build is available yet, however, we are working on it.
As of now, I can only make a test build of the viosock.sys` driver. This means you would need to turn on test signing and insert the test certificate into Trusted Root Certificate Authorities.
@tuxxi @MartinDrab Thanks! I've tested the newer driver, the client and the host can send and receive messages successfully. It works!!!
Your help is much appreciated!!
@Youxu-Chen
hello please help me!!,where can i download the driver? I am very very urgent ,please help me!!
Should be in the latest version, https://fedorapeople.org/groups/virt/virtio-win/direct-downloads/archive-virtio/virtio-win-0.1.240-1/
@YanVugenfirer but it not include viosock driver,i cann't find the avaiable driver package.
Describe the bug I try to establish a connection from a Linux host to a Windows guest via viosock. The viosock driver is installed in Windows guest successfully. The vsock server runs in Linux host and client runs in Windows guest. Messages can be sent normally from the client to the server. However, when I try to send a message from the server to the client, it fails and blocks in recv operation in the client side.
What's even more strange is that the first time a message is sent from the server to the client is normal, but the subsequent message is blocked, such as re-running the client program many times.
Demo code vsock server
vsock client
To Reproduce Steps to reproduce the behaviour:
The output of the client:
The output of the server:
Expected behavior Client can receive the reply message from server.
Host: