Bug 2130768

Summary: [virtual network][rhel9.2][windows]Can not support command "netsh netkvm setparam 0 param=vlanid value=1"
Product: Red Hat Enterprise Linux 9 Reporter: Lei Yang <leiyang>
Component: virtio-winAssignee: Yvugenfi <yvugenfi>
virtio-win sub component: others QA Contact: Lei Yang <leiyang>
Status: CLOSED MIGRATED Docs Contact:
Severity: high    
Priority: high CC: chayang, coli, jinzhao, juzhang, leidwang, qizhu, wji, ybendito, yvugenfi
Version: 9.2Keywords: MigratedToJIRA, Regression, Triaged
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Windows   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2023-06-28 08:35:05 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Lei Yang 2022-09-29 04:40:25 UTC
Description of problem:
Boot windows 11 guest and enable netkvm verifier, then get error messages "The following command was not found: netkvm setparam 0 param=vlanid value=1" after execute this command,

Version-Release number of selected component (if applicable):
qemu-kvm-7.1.0-1.el9.x86_64
kernel-5.14.0-168.el9.x86_64
edk2-ovmf-20220526git16779ede2d36-4.el9.noarch
virtio-win-prewhql-0.1-225.iso

en-us_windows_11_business_editions_version_22h2_x64_dvd_17a08ce3.iso

How reproducible:
100%

Steps to Reproduce:
1.Boot a win11 guest
/usr/libexec/qemu-kvm \
-name 'avocado-vt-vm1'  \
-sandbox on  \
-blockdev node-name=file_ovmf_code,driver=file,filename=/usr/share/OVMF/OVMF_CODE.secboot.fd,auto-read-only=on,discard=unmap \
-blockdev node-name=drive_ovmf_code,driver=raw,read-only=on,file=file_ovmf_code \
-blockdev node-name=file_ovmf_vars,driver=file,filename=/root/avocado/data/avocado-vt/avocado-vt-vm1_win11-64-virtio-scsi_qcow2_filesystem_VARS.fd,auto-read-only=on,discard=unmap \
-blockdev node-name=drive_ovmf_vars,driver=raw,read-only=off,file=file_ovmf_vars \
-machine q35,memory-backend=mem-machine_mem,pflash0=drive_ovmf_code,pflash1=drive_ovmf_vars \
-device pcie-root-port,id=pcie-root-port-0,multifunction=on,bus=pcie.0,addr=0x1,chassis=1 \
-device pcie-pci-bridge,id=pcie-pci-bridge-0,addr=0x0,bus=pcie-root-port-0  \
-nodefaults \
-device VGA,bus=pcie.0,addr=0x2 \
-m 46080 \
-object memory-backend-ram,size=46080M,id=mem-machine_mem  \
-smp 16,maxcpus=16,cores=8,threads=1,dies=1,sockets=2  \
-cpu 'EPYC-IBPB',x2apic=on,tsc-deadline=on,hypervisor=on,tsc-adjust=on,arch-capabilities=on,xsaves=on,cmp-legacy=on,perfctr-core=on,clzero=on,xsaveerptr=on,virt-ssbd=on,npt=on,lbrv=on,nrip-save=on,tsc-scale=on,vmcb-clean=on,svme-addr-chk=on,rdctl-no=on,skip-l1dfl-vmentry=on,mds-no=on,pschange-mc-no=on,monitor=off,hv_stimer,hv_synic,hv_vpindex,hv_relaxed,hv_spinlocks=0x1fff,hv_vapic,hv_time,hv_frequencies,hv_runtime,hv_tlbflush,hv_reenlightenment,hv_stimer_direct,hv_ipi,kvm_pv_unhalt=on \
-device pcie-root-port,id=pcie-root-port-1,port=0x1,addr=0x1.0x1,bus=pcie.0,chassis=2 \
-device qemu-xhci,id=usb1,bus=pcie-root-port-1,addr=0x0 \
-device usb-tablet,id=usb-tablet1,bus=usb1.0,port=1 \
-device pcie-root-port,id=pcie-root-port-2,port=0x2,addr=0x1.0x2,bus=pcie.0,chassis=3 \
-device virtio-scsi-pci,id=virtio_scsi_pci0,bus=pcie-root-port-2,addr=0x0 \
-blockdev node-name=file_image1,driver=file,auto-read-only=on,discard=unmap,aio=threads,filename=/root/avocado/data/avocado-vt/vl_avocado-vt-vm1_image1.qcow2,cache.direct=on,cache.no-flush=off \
-blockdev node-name=drive_image1,driver=qcow2,read-only=off,cache.direct=on,cache.no-flush=off,file=file_image1 \
-device scsi-hd,id=image1,drive=drive_image1,write-cache=on \
-device pcie-root-port,id=pcie-root-port-3,port=0x3,addr=0x1.0x3,bus=pcie.0,chassis=4 \
-device virtio-net-pci,mac=9a:e6:a2:8c:68:f1,id=idwWP7sa,netdev=idHXPxxs,bus=pcie-root-port-3,addr=0x0  \
-netdev tap,id=idHXPxxs,vhost=on \
-blockdev node-name=file_cd1,driver=file,auto-read-only=on,discard=unmap,aio=threads,filename=/home/kvm_autotest_root/iso/windows/winutils.iso,cache.direct=on,cache.no-flush=off \
-blockdev node-name=drive_cd1,driver=raw,read-only=on,cache.direct=on,cache.no-flush=off,file=file_cd1 \
-device scsi-cd,id=cd1,drive=drive_cd1,write-cache=on \
-blockdev node-name=file_virtio,driver=file,auto-read-only=on,discard=unmap,aio=threads,filename=/home/kvm_autotest_root/iso/windows/virtio-win-prewhql-0.1-225.iso,cache.direct=on,cache.no-flush=off \
-blockdev node-name=drive_virtio,driver=raw,read-only=on,cache.direct=on,cache.no-flush=off,file=file_virtio \
-device scsi-cd,id=virtio,drive=drive_virtio,write-cache=on  \
-vnc :0  \
-rtc base=localtime,clock=host,driftfix=slew  \
-boot menu=off,order=cdn,once=c,strict=off \
-enable-kvm \
-device pcie-root-port,id=pcie_extra_root_port_0,multifunction=on,bus=pcie.0,addr=0x3,chassis=5 \
-monitor stdio \

2.Check netkvm driver state.
wmic> sysdriver where PathName="C:\\Windows\\System32\\drivers\\netkvm.sys" get State /value

3.Check netkvm driver verifier status
verifier /querysettings

4.Ensure netkvm verifier is enabled already,then setup a vlan tag for network interface: Ethernet Instance 0
> netsh netkvm setparam 0 param=vlanid value=1
The following command was not found: netkvm setparam 0 param=vlanid value=1

Actual results:
command failed

Expected results:
it should be set pass

Additional info:
1. Under the same env, windows 2019 test pass. From QE side this seems a windows 11 iso issue. 
2. Used the same env to test windows-11-21h2 also hit same issue.
3. In the past it test pass on rhel.9.1.0 with windows-11-21h2,so add keywords "Regression".
   Test Version:
    qemu-kvm-7.0.0-1.el9.x86_64
    kernel-5.14.0-79.el9.x86_64
    edk2-ovmf-20220221gitb24306f15d-1.el9.noarch
    virtio-win-prewhql-0.1-215.iso

Comment 1 Lei Yang 2022-09-30 03:54:24 UTC
Additioanl info:

Hit same issue with windows 2019 guest, but the reproduced rate is very low(About 1/6)

Test Version:
kernel-5.14.0-169.el9.x86_64
qemu-kvm-7.1.0-1.el9.x86_64
edk2-ovmf-20220526git16779ede2d36-4.el9.noarch
virtio-win-prewhql-0.1-225.iso

Comment 2 Lei Yang 2022-10-11 11:57:36 UTC
Hit same issue with command: netsh netkvm setparam 0 param=*LsoV2IPv4 value=0

error info: the following command was not found: netkvm setparam 0 param=*LsoV2IPv4 value=0.

Test Version:
kernel-5.14.0-174.el9.x86_64
qemu-kvm-7.1.0-2.el9.x86_64
edk2-ovmf-20220526git16779ede2d36-4.el9.noarch
virtio-win-prewhql-0.1-227.iso

Comment 3 Lei Yang 2022-10-14 06:19:55 UTC
Also hit this problem on the rhel.8.8 host with virtual netwotk function testing.

Test Version:
qemu-kvm-6.2.0-22.module+el8.8.0+16816+1d3555ec.x86_64
kernel-4.18.0-430.el8.x86_64
virtio-win-prewhql-0.1-227.iso
edk2-ovmf-20220126gitbb1bba3d77-3.el8.noarch

Guest:
en-us_windows_11_business_editions_version_22h2_x64_dvd_17a08ce3.iso

Comment 4 Yvugenfi@redhat.com 2022-11-08 10:29:28 UTC
Sorry, I don't see in the steps the registration of the netsh plugin. 

"rundll32 netkvmco.dll,RegisterNetKVMNetShHelper"

Comment 5 Lei Yang 2022-11-09 01:03:29 UTC
(In reply to Yvugenfi from comment #4)
> Sorry, I don't see in the steps the registration of the netsh plugin. 
> 
> "rundll32 netkvmco.dll,RegisterNetKVMNetShHelper"

Hello Yan

I tried to add this step to the test and the problem was reproduced again.

Test Steps:
1. Boot a guest

2. Check netkvm driver state
wmic> sysdriver where PathName="C:\\Windows\\System32\\drivers\\netkvm.sys" get State /value

3.Check netkvm driver verifier status
> verifier /querysettings

4.Copy and register netkvmco.dll
> xcopy E:\NetKVM\w11\amd64\netkvmco.dll c:\\ /y && rundll32 netkvmco.dll,RegisterNetKVMNetShHelper

5.setup a vlan tag for network interface: Ethernet Instance 0
> netsh netkvm setparam 0 param=vlanid value=900
The following command was not found: netkvm setparam 0 param=vlanid value=900.

Thanks
Lei

Comment 8 Lei Yang 2022-12-26 05:56:45 UTC
Hit same issue

Test Version:
kernel-5.14.0-224.el9.x86_64
qemu-kvm-7.2.0-2.el9.x86_64
edk2-ovmf-20220826gitba0e0e4c6a-2.el9.noarch
virtio-win-prewhql-0.1-231.iso

Guest:
Windows_11_x64_testsigned_enabled_dvd-22h2.iso

Comment 10 Lei Yang 2023-01-30 06:02:35 UTC
Hello Yan

ITM 22 has passed. Are there still plans to fix this bug in the current release? If not maybe it should move to the next release.

Thanks
Lei

Comment 11 Lei Yang 2023-05-11 03:07:29 UTC
Hit same issues

Test Version:
kernel-5.14.0-304.el9.x86_64
qemu-kvm-8.0.0-1.el9.x86_64
edk2-ovmf-20230301gitf80f052277c8-2.el9.noarch
virtio-win-prewhql-0.1-236.iso

Comment 12 Wenkang Ji 2023-05-24 01:42:40 UTC
Still hit this issue on virtio-win-prewhql-0.1-236.

kernel-5.14.0-284.11.1.el9_2.x86_64
qemu-kvm-7.2.0-14.el9_2.x86_64
seabios-bin-1.16.1-1.el9.noarch
edk2-ovmf-20221207gitfff6d81270b5-9.el9_2.noarch
virtiofsd-1.5.0-1.el9.x86_64


I changed the location after netkvmco to "rundll32 c:\\netkvmco.dll,RegisterNetKVMNetShHelper" instead of the previous "rundll32 netkvmco.dll,RegisterNetKVMNetShHelper". I think the root cause of this problem is that netkvmco.dll is not found.

Comment 13 Lei Yang 2023-06-06 06:47:20 UTC
Hello Yan

Currently it is during the DTM=14 period. It looks like hasn't been fixed, does the DTM need to be reset?

Thanks
Lei

Comment 14 ybendito 2023-06-25 21:36:26 UTC
According to my check the netkvmco.dll does not function on win11 22H2, due to the fact that in 22h2 WDK the interface of NETSH was changed.
We can hope that netkvmco.dll will continue working on Win10 and earlier.