qemu does not send data between udp and virtserialport
Host environment
- Operating system: VoidLinux
- OS/kernel version: Linux rootkit 6.14.9_1 #1 SMP PREEMPT_DYNAMIC Fri May 30 23:17:54 UTC 2025 x86_64 GNU/Linux
- Architecture: x86_64
- QEMU flavor: qemu-system-x86_64
- QEMU version: QEMU emulator version 10.0.0
- QEMU command line:
qemu-system-x86_64 -hda debian.qcow2 -enable-kvm -m 8192 -usbdevice tablet -vga virtio -display gtk,gl=on -device virtio-net-pci,netdev=net0 -netdev user,id=net0,hostfwd=tcp::2222-:22 -device virtio-serial -chardev udp,id=wgchar,host=127.0.0.1,port=53861, -device virtserialport,chardev=wgchar,name=wgchar
Emulated/Virtualized environment
-
Operating system: Debian
-
OS/kernel version: Linux debian 6.1.0-37-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.140-1 (2025-05-22) x86_64 GNU/Linux
-
Architecture: x86_64
Description of problem
qemu does not send and/or receive any data when using chardev udp with device virtserialport
Steps to reproduce
- Boot a new VM with a configured serial interface:
qemu-system-x86_64 -hda debian.qcow2 -enable-kvm -m 8192 -usbdevice tablet -vga virtio -display gtk,gl=on -device virtio-net-pci,netdev=net0 -netdev user,id=net0,hostfwd=tcp::2222-:22 -device virtio-serial -chardev udp,id=wgchar,host=127.0.0.1,port=53861, -device virtserialport,chardev=wgchar,name=wgchar
- Start netcat:
gnetcat -u -l -p 53861 - Start
tcpdump -n lo port 53861 - In the VM
echo 123 > /dev/virtio-ports/wgchar
Expected:
- See output
123in the terminal running netcat - see packages flowing in tcpdump.
- command in the vm terminating
Actual:
No output from tcp and netcat command hangs in the vm.
Additional information
qemu-system-x86_64 --version QEMU emulator version 10.0.0 Copyright (c) 2003-2025 Fabrice Bellard and the QEMU Project developers
Edited by Enno Boland