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.

Bug 1455015

Summary: only the first virtio-vsock device works when guest includes multiple virtio-vsock devices
Product: Red Hat Enterprise Linux 7 Reporter: FuXiangChun <xfu>
Component: qemu-kvm-rhevAssignee: Stefan Hajnoczi <stefanha>
Status: CLOSED WONTFIX QA Contact: FuXiangChun <xfu>
Severity: high Docs Contact:
Priority: high    
Version: 7.4CC: chayang, drjones, juzhang, knoel, michen, qzhang, virt-maint, yhong
Target Milestone: rc   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-05-31 09:06:43 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description FuXiangChun 2017-05-24 03:28:48 UTC
Description of problem:
Boot RHEL7.4 guest with multiple virtio-vsock devices. Then execute script nc-vsock.c between host and guest. The first virtio-vsock works, But for the second virtio-vsock,nc-vsock script shows "Connection timed out" on host.  

Version-Release number of selected component (if applicable):
host and guest kernel version:
3.10.0-671.el7.x86_64

qemu version:
qemu-kvm-rhev-2.9.0-6.el7.x86_64


How reproducible:
100%

Steps to Reproduce:
1.Boot RHEL7.4 guest with multiple virtio-vsock devices

/usr/libexec/qemu-kvm -name guest=r7,debug-threads=on -enable-kvm -M pc -cpu SandyBridge -m 4096 -realtime mlock=off -smp 4,sockets=1,cores=4,threads=1 -boot strict=on -rtc base=localtime,clock=host,driftfix=slew -drive file=rhel74.qcow2,if=none,id=drive-system-disk,format=qcow2,cache=none,aio=native,werror=ignore,rerror=ignore,serial=QEMU-DISK1 -device virtio-scsi-pci,id=scsi0,bus=pci.0,ioeventfd=off -device scsi-hd,bus=scsi0.0,drive=drive-system-disk,id=system-disk,channel=0,scsi-id=0,lun=0,ver=mike,serial=ababab,bootindex=1 -device qxl-vga,id=video0,ram_size=67108864,vram_size=67108864,vram64_size_mb=0,vgamem_mb=16,bus=pci.0,addr=0x4 -vnc :2 -monitor stdio -netdev tap,id=hostnet0,script=/etc/qemu-ifup -device virtio-net-pci,netdev=hostnet0,id=net0,mac=12:54:00:5c:88:61 -qmp tcp:0:4444,server,nowait \


-device vhost-vsock-pci,id=vhost-vsock-pci5,guest-cid=5 -device vhost-vsock-pci,id=vhost-vsock-pci6,guest-cid=6 -device vhost-vsock-pci,id=vhost-vsock-pci7,guest-cid=7 -device vhost-vsock-pci,id=vhost-vsock-pci8,guest-cid=8 \

2. In guest:
#./nc-vsock -l 12345
#./nc-vsock -l 12346

3.On host:
# ./nc-vsock 5 12345
# ./nc-vsock 6 12346

Actual results:
# ./nc-vsock 5 12345
works

# ./nc-vsock 6 12346
connect: Connection timed out

Expected results:
multiple virtio-vsock work

Additional info:
Download and compile nc-vsock from this link: https://github.com/stefanha/nc-vsock/blob/master/nc-vsock.c
#gcc -o nc-vsock nc-vsock.c

Comment 2 Stefan Hajnoczi 2017-05-31 09:03:35 UTC
*** Bug 1455001 has been marked as a duplicate of this bug. ***

Comment 3 Stefan Hajnoczi 2017-05-31 09:06:43 UTC
The virtio-vsock guest drivers do not support multiple instances.  I'm not aware of a use case where a guest needs to use multiple virtio-vsock devices at the same time.