Note: This bug is displayed in read-only format because
the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Description of problem:
boot guest with virtio serial though the UDP option, and try to transfer data between host and guest, but fail to transfer anythong.
BTW, tried it with tcp or unix socket that have no such issue, it can transfer samll or big size data.
QEMU man help doc:
-chardev udp ,id=id [,host=host] ,port=port [,localaddr=localaddr][,localport=localport] [,ipv4][,ipv6]
Sends all traffic from the guest to a remote host over UDP.
host specifies the remote host to connect to. If not specified it defaults to "localhost".
port specifies the port on the remote host to connect to. port is required.
Version-Release number of selected component (if applicable):
host info:
2.6.32-398.el6.x86_64
qemu-kvm-0.12.1.2-2.378.el6.x86_64
guest info:
2.6.32-398.el6.x86_64
How reproducible:
always
Steps to Reproduce:
1.boot guest with virtio serial though the UDP option.
e.g:...-device virtio-serial-pci,id=virtio-serial0,max_ports=16,vectors=0,bus=pci.0,addr=0x3 -chardev udp,id=channel1,host=localhost,port=12345,server,nowait -device virtserialport,chardev=channel1,name=com.redhat.rhevm.vdsm,bus=virtio-serial0.0,id=port1 -chardev udp,id=channel2,host=localhost,port=12346,server,nowait -device virtserialport,chardev=channel2,name=com.redhat.rhevm.vdsm,bus=virtio-serial0.0,id=port2
2.try to transfer data between host and guest.
Actual results:
after step 2, it fail to transfer anything.
guest---->host:
# echo "sibiaoluo" > /dev/vport0p1
# nc -u -l localhost 12345 <------none output
^C
# echo "sibiaoluo" > /dev/vport0p2
# nc -u -l localhost 12346 <------none output
^C
host----->guest:
# echo "sibiaoluo" | nc -u -l localhost 12345
# cat /dev/vport0p1
<------output nothing
Expected results:
It and transfer data between localhost/remotehost and guest over UDP.
Additional info:
I met anther issue that fail to login to guest via virtconsole through UDP option, it have no any response when press 'Enter' keyboard, Maybe it's the same issue to this one. Please let me know it if you check that not the same issue, i will separate a new one.
We have bug 985834 for virtconsole with Unix/TCP socket problem that cann't login to guest.
Best Regards,
sluo
From RHEL7 clone:
https://bugzilla.redhat.com/show_bug.cgi?id=987278#c3
udp chardev works for me.
Terminal #1:
nc -4 -u -l 12345
Terminal #2:
qemu-kvm -chardev udp,id=test,port=12345,localport=54321,ipv4 \
-device isa-debugcon,iobase=0x402,chardev=test
seabios log messages show up in Terminal #1 just fine.
Now and then there is a piece missing. But note that unlike TCP the UDP protocol doesn't make any guaranties whatsoever. In case buffers are full packets are simply dropped and lost. So this is normal behavior. Packets can also be reordered.
Note that both qemu+netcat are forced into ipv4 mode to make sure they speak the same protocol.
Also note that I'm explicitly setting localport to avoid a random port being picked. This allows to keep netcat in terminal #1 running while starting qemu multiple times even though netcat will only accept packets from a single peer address.
Final note: The UDP protocol is stateless. There is no "connected" and "disconnected" state. Consequently the UDP chardev backend doesn't send open/close chardev events. Which virtio-serial might depend on to work correctly. Amit?
Bottom line: Testing the udp chardev with anything which requires a reliable stream is bogus in the first place. The only remotely useful use case for the udp chardev backend I can think of is to send guest output to a remote syslog server (which traditionally listens on udp port 514).
Description of problem: boot guest with virtio serial though the UDP option, and try to transfer data between host and guest, but fail to transfer anythong. BTW, tried it with tcp or unix socket that have no such issue, it can transfer samll or big size data. QEMU man help doc: -chardev udp ,id=id [,host=host] ,port=port [,localaddr=localaddr][,localport=localport] [,ipv4][,ipv6] Sends all traffic from the guest to a remote host over UDP. host specifies the remote host to connect to. If not specified it defaults to "localhost". port specifies the port on the remote host to connect to. port is required. Version-Release number of selected component (if applicable): host info: 2.6.32-398.el6.x86_64 qemu-kvm-0.12.1.2-2.378.el6.x86_64 guest info: 2.6.32-398.el6.x86_64 How reproducible: always Steps to Reproduce: 1.boot guest with virtio serial though the UDP option. e.g:...-device virtio-serial-pci,id=virtio-serial0,max_ports=16,vectors=0,bus=pci.0,addr=0x3 -chardev udp,id=channel1,host=localhost,port=12345,server,nowait -device virtserialport,chardev=channel1,name=com.redhat.rhevm.vdsm,bus=virtio-serial0.0,id=port1 -chardev udp,id=channel2,host=localhost,port=12346,server,nowait -device virtserialport,chardev=channel2,name=com.redhat.rhevm.vdsm,bus=virtio-serial0.0,id=port2 2.try to transfer data between host and guest. Actual results: after step 2, it fail to transfer anything. guest---->host: # echo "sibiaoluo" > /dev/vport0p1 # nc -u -l localhost 12345 <------none output ^C # echo "sibiaoluo" > /dev/vport0p2 # nc -u -l localhost 12346 <------none output ^C host----->guest: # echo "sibiaoluo" | nc -u -l localhost 12345 # cat /dev/vport0p1 <------output nothing Expected results: It and transfer data between localhost/remotehost and guest over UDP. Additional info: