Bug 1835312

Summary: [netdev_add] cannot hotplug direct interface - invalid value for vhost
Product: Red Hat Enterprise Linux Advanced Virtualization Reporter: smitterl
Component: libvirtAssignee: Virtualization Maintenance <virt-maint>
Status: CLOSED DUPLICATE QA Contact: yalzhang <yalzhang>
Severity: high Docs Contact:
Priority: unspecified    
Version: 8.2CC: pkrempa, virt-maint, yalzhang
Target Milestone: rcKeywords: Automation, Regression, TestBlocker
Target Release: 8.3   
Hardware: All   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-05-14 14:48:57 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 smitterl 2020-05-13 15:15:40 UTC
Description of problem:
Can't hotplug direct network interface

Version-Release number of selected component (if applicable):
libvirt-daemon-6.3.0-1.module+el8.3.0+6478+69f490bb.x86_64
qemu-kvm-5.0.0-0.module+el8.3.0+6612+6b86f0c9.x86_64

How reproducible:
100%

Steps to Reproduce:
1. virsh start avocado-vt-vm1
2. virsh attach-interface --domain avocado-vt-vm1  --type 'direct' --source 'enp1s0' --mac '9a:cb:0c:26:ed:c0' --target 'test' --model 'virtio' --inbound '100,200,100' --outbound '200,300,200'

Actual results:
error: Failed to attach interface
error: internal error: unable to execute QEMU command 'netdev_add': Invalid parameter type for 'vhost', expected: boolean

Expected results:
Interface attached successfully

Additional info:
1. I believe Version should be 8.3 but wasn't available in drop-down.
2. Related commit in qemu https://github.com/qemu/qemu/commit/db2a380c84574d8c76d7193b8af8535234fe5156
3. libvirtd debug log
...
2020-05-13 14:49:03.768+0000: 12393: info : qemuMonitorSend:935 : QEMU_MONITOR_SEND_MSG: mon=0x7fef18033200 msg={"execute":"netdev_add","arguments":{"type":"tap","fd":"fd-net10","id":"hostnet1","vhost":"on","vhostfd":"vhostfd-net10"},"id":"libvirt-372"}^M
 fd=-1
2020-05-13 14:49:03.768+0000: 12536: info : qemuMonitorIOWrite:431 : QEMU_MONITOR_IO_WRITE: mon=0x7fef18033200 buf={"execute":"netdev_add","arguments":{"type":"tap","fd":"fd-net10","id":"hostnet1","vhost":"on","vhostfd":"vhostfd-net10"},"id":"libvirt-372"}^M
 len=143 ret=143 errno=0
2020-05-13 14:49:03.769+0000: 12536: debug : qemuMonitorJSONIOProcessLine:220 : Line [{"id": "libvirt-372", "error": {"class": "GenericError", "desc": "Invalid parameter type for 'vhost', expected: boolean"}}]
2020-05-13 14:49:03.769+0000: 12536: info : qemuMonitorJSONIOProcessLine:240 : QEMU_MONITOR_RECV_REPLY: mon=0x7fef18033200 reply={"id": "libvirt-372", "error": {"class": "GenericError", "desc": "Invalid parameter type for 'vhost', expected: boolean"}}
2020-05-13 14:49:03.769+0000: 12393: debug : qemuMonitorJSONCheckErrorFull:402 : unable to execute QEMU command {"execute":"netdev_add","arguments":{"type":"tap","fd":"fd-net10","id":"hostnet1","vhost":"on","vhostfd":"vhostfd-net10"},"id":"libvirt-372"}: {"id":"libvirt-372","error":{"class":"GenericError","desc":"Invalid parameter type for 'vhost', expected: boolean"}}
2020-05-13 14:49:03.769+0000: 12393: error : qemuMonitorJSONCheckErrorFull:416 : internal error: unable to execute QEMU command 'netdev_add': Invalid parameter
4. Reproduced with
libvirt-daemon-6.0.0-17.module+el8.3.0+6423+e4cb6418.s390x
qemu-kvm-4.2.0-19.module+el8.3.0+6473+93e27135.s390x
5. Not reproduced with
libvirt-daemon-6.0.0-17.module+el8.3.0+6423+e4cb6418.x86_64
qemu-kvm-4.2.0-19.module+el8.3.0+6473+93e27135.x86_64
6. Possibly related https://bugzilla.redhat.com/show_bug.cgi?id=1832710

Comment 2 Peter Krempa 2020-05-14 14:48:57 UTC

*** This bug has been marked as a duplicate of bug 1832710 ***