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 1517107 - [q35] guest NIC interface still exists after hotunplug virtio-net-pci device
Summary: [q35] guest NIC interface still exists after hotunplug virtio-net-pci device
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 8
Classification: Red Hat
Component: virtio-win
Version: 8.0
Hardware: x86_64
OS: Linux
low
low
Target Milestone: rc
: ---
Assignee: ybendito
QA Contact: Virtualization Bugs
URL:
Whiteboard:
Depends On:
Blocks: 1721246 1725380 1744438
TreeView+ depends on / blocked
 
Reported: 2017-11-24 08:37 UTC by Yiqian Wei
Modified: 2021-02-08 11:33 UTC (History)
12 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
: 1721246 (view as bug list)
Environment:
Last Closed: 2019-07-30 14:22:06 UTC
Type: Bug
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
Batch to start netkvm logging (1.21 KB, text/plain)
2021-02-08 11:33 UTC, ybendito
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Red Hat Bugzilla 1523017 0 high CLOSED [virtio-win][vioscsi/viostor] cannot hot-unplug vioscsi/viostor controller with q35 2021-02-22 06:25:07 UTC
Red Hat Product Errata RHEA-2019:1997 0 None None None 2019-07-30 14:22:45 UTC

Internal Links: 1523017

Description Yiqian Wei 2017-11-24 08:37:37 UTC
Description of problem:
After hotunplug virtio-net device,guest nic still exist for win10.I need to reboot in guest,nic interface disapears.

Version-Release number of selected component (if applicable):
Host version:
qemu-kvm-rhev-2.10.0-7.el7.x86_64
kernel-3.10.0-797.el7.x86_64
virtio-win-1.9.3-1.el7.noarch
seabios-1.11.0-1.el7.x86_64
Guest:win10_64bit

How reproducible:
100%

Steps to Reproduce:
1.boot a win10 guest with cmd
 /usr/libexec/qemu-kvm \
  -M q35,accel=kvm,kernel-irqchip=split \
  -device intel-iommu,intremap=on \
  -cpu SandyBridge,enforce \
  -nodefaults -rtc base=utc \
  -m 2G \
  -smp 2,sockets=2,cores=1,threads=1 \
  -enable-kvm \
  -uuid 990ea161-6b67-47b2-b803-19fb01d30d12 \
  -k en-us \
  -nodefaults \
  -serial unix:/tmp/serial0,server,nowait \
  -global isa-debugcon.iobase=0x403 \
  -boot menu=on \
  -qmp tcp:0:6668,server,nowait \
  -usb \
  -device usb-tablet \
  -vga qxl \
  -global driver=cfi.pflash01,property=secure,value=on \
  -drive file=/home/win10-64-virtio.qcow2,if=none,id=drive-virtio-disk0,format=qcow2,cache=none,werror=stop,rerror=stop \
  -device virtio-blk-pci,drive=drive-virtio-disk0,id=virtio-disk0  \
  -device pcie-root-port,bus=pcie.0,id=root0,chassis=1,addr=0xa.0 \
  -device virtio-net-pci,netdev=tap10,mac=9a:6a:6b:6c:6d:6e,bus=root0,id=net0 -netdev tap,id=tap10,vhost=on \
  -device ahci,id=ahci1 \
  -drive file=/usr/share/virtio-win/virtio-win-1.9.3.iso,if=none,id=drive-virtio-disk1,format=raw \
  -device ide-cd,unit=0,drive=drive-virtio-disk1,id=virtio-disk1,bus=ahci1.0 \
  -monitor stdio \
  -vnc :9 \
2.Hotunplug nic in qmp
{"QMP": {"version": {"qemu": {"micro": 0, "minor": 10, "major": 2}, "package": "(qemu-kvm-rhev-2.10.0-7.el7)"}, "capabilities": []}}
{"execute":"qmp_capabilities"}
{"return": {}}
{"timestamp": {"seconds": 1511508913, "microseconds": 839104}, "event": "NIC_RX_FILTER_CHANGED", "data": {"name": "net0", "path": "/machine/peripheral/net0/virtio-backend"}}
{"execute":"device_del","arguments":{"id":"net0"}}
{"return": {}}
{"timestamp": {"seconds": 1511509084, "microseconds": 158659}, "event": "DEVICE_DELETED", "data": {"path": "/machine/peripheral/net0/virtio-backend"}}
{"timestamp": {"seconds": 1511509084, "microseconds": 162214}, "event": "DEVICE_DELETED", "data": {"device": "net0", "path": "/machine/peripheral/net0"}}
{"execute":"netdev_del","arguments":{"id":"tap10"}}
{"return": {}}
3.After step 2,check NIC interface disapears from guest.

Actual results:
NIC interface still exist.

Expected results:
NIC interface disapears from guest.

Additional info:
1)for e1000e nic,no hit this issue
2)for rhel guest,no hit this issue.
3)pc+seabios,no hit this issue. 
4)q35+ovmf,hit this issue.
5)host info:
Model name:Intel(R) Core(TM) i7-2600 CPU @ 3.40GHz

Comment 2 Peixiu Hou 2017-12-21 03:43:11 UTC
Hit the same issue on win2012-64 with q35+seabios.

Comment 4 Peixiu Hou 2018-08-14 08:11:59 UTC
Hit the same issue on rhel7.6 host with q35+seabios.

Guest os: Win2012-64

Used versions:
kernel-3.10.0-931.el7.x86_64
qemu-kvm-rhev-2.12.0-10.el7.x86_64.rpm
seabios-bin-1.10.2-3.el7_4.1.noarch
virtio-win-prewhql-160

Thanks~
Peixiu

Comment 5 huyu@redhat.com 2018-10-18 09:17:25 UTC
Guest : win2016+q35+ovmf   

NO hit this issue, guest behave properly.

1,boot script:
/usr/libexec/qemu-kvm -M q35 -cpu host,+kvm_pv_unhalt,hv_relaxed,hv_spinlocks=0x1fff,hv_vapic,hv_time -name NIC2016x86ovmfq -enable-kvm -m 3G -smp 4,cores=4 -uuid 51d906b0-8fe0-11e8-bb72-4437e64a454a -nodefconfig -nodefaults -rtc base=localtime,driftfix=slew -boot order=cd,menu=on -device piix3-usb-uhci,id=usb,bus=pcie.0 -drive file=os_ovmf2.raw,if=none,id=drive-ide0-0-0,format=raw,serial=mike_cao,cache=none -device ide-drive,bus=ide.0,unit=0,drive=drive-ide0-0-0,id=ide0-0-0,share-rw=on  -chardev pty,id=charserial0 -device isa-serial,chardev=charserial0,id=isa_serial0 -device usb-tablet,id=input0 -vnc 0.0.0.0:1 -vga std \
-qmp tcp:0:4445,server,nowait -monitor stdio \
-device pcie-root-port,id=pcie.0-root-port-4,slot=4,chassis=4,addr=0x4,bus=pcie.0 \
-netdev tap,script=/etc/qemu-ifup,downscript=no,id=hostnet0,vhost=on,queues=4 \
-device virtio-net-pci,netdev=hostnet0,id=net0,mac=00:52:3b:35:88:01,mq=on,vectors=10,bus=pcie.0-root-port-4 \
-cdrom /home/kvm_autotest_root/iso/ISO/Win2016/en_windows_server_2016_updated_feb_2018_x64_dvd_11636692.iso \
-drive file=/home/yhu/NIC2016x86ovmf2/OVMF_CODE.secboot.fd,if=pflash,format=raw,unit=0,readonly=on -drive file=/home/yhu/NIC2016x86ovmf2/OVMF_VARS.fd,if=pflash,format=raw,unit=1 \
-drive file=/home/kvm_autotest_root/iso/windows/virtio-win-1.9.6-1.el8.iso,format=raw,if=none,id=drive2,media=cdrom,readonly=off -device ide-drive,drive=drive2,bus=ide.1,unit=0,id=cdrom \


2,hotunplug qemu cml:
{ 'execute': 'device_del', 'arguments': {'id': 'net0' }}
{"return": {}}
{ 'execute': 'netdev_del', 'arguments': {'id': 'hostnet0' }}
{"return": {}}
{"timestamp": {"seconds": 1539853739, "microseconds": 415682}, "event": "DEVICE_DELETED", "data": {"path": "/machine/peripheral/net0/virtio-backend"}}
{"timestamp": {"seconds": 1539853739, "microseconds": 424251}, "event": "DEVICE_DELETED", "data": {"device": "net0", "path": "/machine/peripheral/net0"}}

3,actual result:

This [Network adapters->"Red Hat VirtIO EthernetAdapter"] disappears in device Manager. Red cross in the icon.

4,Packages info

    virtio-win-1.9.6-1.el8.iso

    qemu-kvm-2.12.0-26.el8+1648+9c120fe6.x86_64

    kernel-4.18.0-2.el8.x86_64

    seabios-bin-1.11.1-2.el8+1704+2153d97c.noarch
    edk2-ovmf-20180508gitee3198e672e2-4.el8+1460+6c285d46.noarch

Comment 6 Yvugenfi@redhat.com 2018-10-22 13:38:17 UTC
(In reply to huyu from comment #5)
> Guest : win2016+q35+ovmf   
> 
> NO hit this issue, guest behave properly.
> 
> 1,boot script:
> /usr/libexec/qemu-kvm -M q35 -cpu
> host,+kvm_pv_unhalt,hv_relaxed,hv_spinlocks=0x1fff,hv_vapic,hv_time -name
> NIC2016x86ovmfq -enable-kvm -m 3G -smp 4,cores=4 -uuid
> 51d906b0-8fe0-11e8-bb72-4437e64a454a -nodefconfig -nodefaults -rtc
> base=localtime,driftfix=slew -boot order=cd,menu=on -device
> piix3-usb-uhci,id=usb,bus=pcie.0 -drive
> file=os_ovmf2.raw,if=none,id=drive-ide0-0-0,format=raw,serial=mike_cao,
> cache=none -device
> ide-drive,bus=ide.0,unit=0,drive=drive-ide0-0-0,id=ide0-0-0,share-rw=on 
> -chardev pty,id=charserial0 -device
> isa-serial,chardev=charserial0,id=isa_serial0 -device usb-tablet,id=input0
> -vnc 0.0.0.0:1 -vga std \
> -qmp tcp:0:4445,server,nowait -monitor stdio \
> -device
> pcie-root-port,id=pcie.0-root-port-4,slot=4,chassis=4,addr=0x4,bus=pcie.0 \
> -netdev
> tap,script=/etc/qemu-ifup,downscript=no,id=hostnet0,vhost=on,queues=4 \
> -device
> virtio-net-pci,netdev=hostnet0,id=net0,mac=00:52:3b:35:88:01,mq=on,
> vectors=10,bus=pcie.0-root-port-4 \
> -cdrom
> /home/kvm_autotest_root/iso/ISO/Win2016/
> en_windows_server_2016_updated_feb_2018_x64_dvd_11636692.iso \
> -drive
> file=/home/yhu/NIC2016x86ovmf2/OVMF_CODE.secboot.fd,if=pflash,format=raw,
> unit=0,readonly=on -drive
> file=/home/yhu/NIC2016x86ovmf2/OVMF_VARS.fd,if=pflash,format=raw,unit=1 \
> -drive
> file=/home/kvm_autotest_root/iso/windows/virtio-win-1.9.6-1.el8.iso,
> format=raw,if=none,id=drive2,media=cdrom,readonly=off -device
> ide-drive,drive=drive2,bus=ide.1,unit=0,id=cdrom \
> 
> 
> 2,hotunplug qemu cml:
> { 'execute': 'device_del', 'arguments': {'id': 'net0' }}
> {"return": {}}
> { 'execute': 'netdev_del', 'arguments': {'id': 'hostnet0' }}
> {"return": {}}
> {"timestamp": {"seconds": 1539853739, "microseconds": 415682}, "event":
> "DEVICE_DELETED", "data": {"path":
> "/machine/peripheral/net0/virtio-backend"}}
> {"timestamp": {"seconds": 1539853739, "microseconds": 424251}, "event":
> "DEVICE_DELETED", "data": {"device": "net0", "path":
> "/machine/peripheral/net0"}}
> 
> 3,actual result:
> 
> This [Network adapters->"Red Hat VirtIO EthernetAdapter"] disappears in
> device Manager. Red cross in the icon.
> 
> 4,Packages info
> 
>     virtio-win-1.9.6-1.el8.iso
> 
>     qemu-kvm-2.12.0-26.el8+1648+9c120fe6.x86_64
> 
>     kernel-4.18.0-2.el8.x86_64
> 
>     seabios-bin-1.11.1-2.el8+1704+2153d97c.noarch
>     edk2-ovmf-20180508gitee3198e672e2-4.el8+1460+6c285d46.noarch

Can you please check with seabios as well (similar to comment #4)?

Comment 7 ybendito 2018-10-28 07:40:40 UTC
The problem happens also on non-UEFI platform.

Comment 9 huyu@redhat.com 2018-12-12 01:00:55 UTC
hit the same issue on win2019-q35

package info 

    virtio-win-prewhql-162
    kernel-4.18.0-48.el8.x86_64
     qemu-kvm-3.1.0-0.module+el8+2266+616cf026
    seabios-1.11.1-2.module+el8+2179+85112f94.src.rpm

Comment 10 huyu@redhat.com 2018-12-12 09:59:14 UTC
(In reply to huyu from comment #9)
> hit the same issue on win2019-q35
> 
> package info 
> 
>     virtio-win-prewhql-162
>     kernel-4.18.0-48.el8.x86_64
>      qemu-kvm-3.1.0-0.module+el8+2266+616cf026
>     seabios-1.11.1-2.module+el8+2179+85112f94.src.rpm

I'm sorry for that #Comment9 is Wrong !
On rhel8, hotunplug works well.
I made #comment9 due to that after hotunplug, This [Network adapters->"Red Hat VirtIO EthernetAdapter"] indeed still exists in the guest for a long time, and after rescan , it disappears, I misunderstood that it was a bug.
However, when I did another case, hotunplug is one of the test steps, and the device disappears very quickly, I was in confusion.
After confirmed with my mentor, it turns out that this is not a issue.
So I would like to modify my #comment9.

Comment 11 ybendito 2019-03-05 10:20:47 UTC
Fixed in build 167, please verify

Comment 12 Yiqian Wei 2019-03-06 09:06:04 UTC
Reproduce version:
host:
     virtio-win-prewhql-0.1-160
     qemu-kvm-rhev-2.12.0-18.el7.x86_64
     kernel-3.10.0-957.el7.x86_64
     seabios-1.11.0-2.el7.x86_64
guest:win10_64bit


Verify version:
host:
     virtio-win-prewhql-0.1-168
     qemu-kvm-rhev-2.12.0-18.el7.x86_64
     kernel-3.10.0-957.el7.x86_64
     seabios-1.11.0-2.el7.x86_64
guest:win10_64bit

After hot-unplug virtio-net-pci device,NIC interface disapears from guest.

Comment 13 ybendito 2019-03-06 13:08:20 UTC
Please verify this bug also with 167 (it is built from branch that is likely to be our next reference)

Comment 14 Yiqian Wei 2019-03-07 02:22:15 UTC
I can reproduce this bug with virtio-win-prewhql-0.1-167 on rhel7.6 host

host version:
     virtio-win-prewhql-0.1-167
     qemu-kvm-rhev-2.12.0-18.el7.x86_64
     kernel-3.10.0-957.el7.x86_64
     seabios-1.11.0-2.el7.x86_64

guest:q35 + seabios + win10

Comment 15 ybendito 2019-03-07 08:11:35 UTC
You're right, thank you. I see the build 167 does not include this commit.

Comment 16 ybendito 2019-03-07 08:20:41 UTC
Let's wait for better build and then recheck it.

Comment 17 ybendito 2019-03-12 09:59:51 UTC
Please check wjther build 169 solves the problem

Comment 18 Yiqian Wei 2019-03-12 11:20:45 UTC
I cannot reproduce this bug with virtio-win-prewhql-0.1-169 on rhel7.6 host

Verify version: 
                virtio-win-prewhql-0.1-169
                qemu-kvm-rhev-2.12.0-18.el7.x86_64
                kernel-3.10.0-957.el7.x86_64
                seabios-1.11.0-2.el7.x86_64

reproduce version:
                virtio-win-prewhql-0.1-167
                qemu-kvm-rhev-2.12.0-18.el7.x86_64
                kernel-3.10.0-957.el7.x86_64
                seabios-1.11.0-2.el7.x86_64


so,I think this bug fix on virtio-win-prewhql-0.1-169

Comment 20 lijin 2019-03-20 07:58:33 UTC
The fix is in virtio-win driver, so I change the component to virtio-win.

Comment 21 lijin 2019-03-21 02:15:32 UTC
change status to verified according to comment#18

Comment 27 errata-xmlrpc 2019-07-30 14:22:06 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHEA-2019:1997

Comment 31 ybendito 2019-12-26 06:55:52 UTC
Looking

Comment 32 ybendito 2021-02-08 11:33:48 UTC
Created attachment 1755685 [details]
Batch to start netkvm logging


Note You need to log in before you can comment on or make changes to this bug.