Bug 1080731
| Summary: | [virtio-win][virtio-rng]Can not find 'QEMU VirtIO RNG Provider' on windows guest on win7-32 | ||||||||
|---|---|---|---|---|---|---|---|---|---|
| Product: | Red Hat Enterprise Linux 7 | Reporter: | Xu Han <xuhan> | ||||||
| Component: | virtio-win | Assignee: | Gal Hammer <ghammer> | ||||||
| Status: | CLOSED CURRENTRELEASE | QA Contact: | Virtualization Bugs <virt-bugs> | ||||||
| Severity: | high | Docs Contact: | |||||||
| Priority: | high | ||||||||
| Version: | 7.0 | CC: | acathrow, bcao, ghammer, hhuang, juzhang, mazhang, michen, virt-maint, xuhan | ||||||
| Target Milestone: | rc | Keywords: | TestBlocker | ||||||
| Target Release: | --- | ||||||||
| Hardware: | Unspecified | ||||||||
| OS: | Unspecified | ||||||||
| Whiteboard: | |||||||||
| Fixed In Version: | virtio-win-prewwhql-0.1-78 | Doc Type: | Bug Fix | ||||||
| Doc Text: | Story Points: | --- | |||||||
| Clone Of: | Environment: | ||||||||
| Last Closed: | 2014-06-13 10:18:58 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: | |||||||||
| Attachments: |
|
||||||||
Seems this is virtio-win bz. Best Regards, Junyi Also hit this problem on win7-64bit and win8.0-32bit guest. This is something that the installer should handle. In the mean while you can register the provider manually. 1. Copy the file viorngum.dll to C:\Windows\system32 2. Run (as admin) rundll32 C:\Windows\system32\viorngum.dll,RegisterProvider hanxu ,pls retest it w/ comment #3 Thanks for gal's feedback. Re-tested with following steps on a win8-32bit guest: 1. Copy the file viorngum.dll to C:\Windows\system32 2. Run (as admin) rundll32 C:\Windows\system32\viorngum.dll,RegisterProvider 3. Try to generate random number Result: CMD> C:\Users\qiguo\Desktop\random.exe Generated random number is 0xdf, 0x3b, 0xd7, 0x85, 0xfd, 0x66, 0x6e, 0x79, 0xfa, 0x5a, 0x46, 0x84, 0xee, 0xf6, 0xa1, 0x87, 0xcd, 0x8b, 0xb0, 0x78, 0x4a, 0xdb, 0x88, 0x14, 0xe3, 0x7a, 0x50, 0x93, 0x9e, 0x30, 0xfa, 0x0c, 0xe8, 0xaf, 0xa1, 0xe6, 0xa6, 0xc1, 0x22, 0x1d, 0x10, 0x7c, 0x66, 0x86, 0x7e, 0xc7, 0x19, 0x1f, 0x0b, 0x21, 0x89, 0xea, 0xfc, 0x1f, 0x74, 0x9a, 0x51, 0x7d, 0x47, 0x23, 0xd0, 0x1d, 0xf9, 0x4f, 0x1c, 0x80, 0x23, 0x1c, 0xaf, 0x7b, 0xfe, 0x23, 0xc3, 0x02, 0x46, 0x57, 0xd2, 0x59, 0xea, 0x1b, 0x4a, 0x33, 0xa4, 0x34, 0x5b, 0x9d, 0xde, 0x64, 0x76, 0xb8, 0xf0, 0x19, 0xb3, 0xe1, 0x79, 0xa5, 0x89, 0xff, 0xa4, 0xd3, 0x1f, 0x22, 0xea, 0xb5, 0x7a, 0xac, 0xb6, 0xb1, 0x49, 0x77, 0x80, 0xf9, 0x07, 0xa2, 0xdc, 0xe4, 0x6a, 0x38, 0x1f, 0x9a, 0x98, 0x65, 0x06, 0x9c, 0x25, 0xce, 0x5e, 0xb1, Re-Open this issue as I still can reproduce it on win7-32 guest Created attachment 881202 [details]
screenshot
(In reply to Mike Cao from comment #7) > Created attachment 881202 [details] > screenshot Ever after following the steps in comment #3? Which providers are listed under "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Cryptography\Providers"? (In reply to Gal Hammer from comment #8) > (In reply to Mike Cao from comment #7) > > Created attachment 881202 [details] > > screenshot > > Ever after following the steps in comment #3? I mean I can not run (as admin) rundll32 C:\Windows\system32\viorngum.dll,RegisterProvider successfully ,see comment #7 > > Which providers are listed under > "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Cryptography\Providers"? referring to next screenshot attachment Created attachment 881269 [details]
screenshot for win7-32
I still can reproduce this issue on win7-32 with virtio-win-prewhql-77 raising testblocker flag I can not reproduce it on windows server 2012 (In reply to Mike Cao from comment #13) > I can not reproduce it on windows server 2012 What happens if you take the Windows Server 2012 dll (win8 directory if I'm not mistaken) and try to register it on a Windows 7 machine? I'm trying to understand if this is a bug in the registration code (my fault) or something is wrong in the dll signing (error in the build system). (In reply to Gal Hammer from comment #14) > (In reply to Mike Cao from comment #13) > > I can not reproduce it on windows server 2012 > > What happens if you take the Windows Server 2012 dll (win8 directory if I'm Tried the file in win8\x86 on win7-32 ,hit the same issue as comment #9. Tried the file in win8\amd64 on win7-32 ,It reports it is not a valid win32 application I will try win8\x86 on win8-32 bit guest later Mike (In reply to Mike Cao from comment #15) > (In reply to Gal Hammer from comment #14) > > (In reply to Mike Cao from comment #13) > > > I can not reproduce it on windows server 2012 > > > > What happens if you take the Windows Server 2012 dll (win8 directory if I'm > > Tried the file in win8\x86 on win7-32 ,hit the same issue as comment #9. > Tried the file in win8\amd64 on win7-32 ,It reports it is not a valid win32 > application > > I will try win8\x86 on win8-32 bit guest later This matrix works fine > > Mike There was a redundant linker's command line option (/integritycheck) which cause this. I removed it and was able to register the dll on Window 7 32-bit. Verified this bug on virtio-win-prewhql-78 Steps 1../RandByte 2.Start VM with virito-rng /usr/libexec/qemu-kvm -M pc -m 6G -smp 4 -cpu host -usb -device usb-tablet -drive file=win7-32.qcow2,format=qcow2,if=none,id=drive-ide0-0-0,werror=stop,rerror=stop,cache=none -device ide-drive,drive=drive-ide0-0-0,id=ide0-0-0,bootindex=1 -netdev tap,id=hostnet0,script=/etc/qemu-ifup -device e1000,netdev=hostnet0,mac=00:52:36:18:34:22,id=net0 -uuid 534daeff-e3af-451c-bbb7-b4ab8fb84079 -rtc-td-hack -no-kvm-pit-reinjection -chardev socket,id=a,path=/tmp/monitor-win2k8R2-serial,server,nowait -mon chardev=a,mode=readline -name win2k8-R2-serial -vnc :2 -vga cirrus -global PIIX4_PM.disable_s3=1 -global PIIX4_PM.disable_s4=0 -monitor stdio -chardev socket,host=localhost,port=1024,id=chr0 -object rng-egd,chardev=chr0,id=rng0 -device virtio-rng-pci,rng=rng0 3.Copy the file viorngum.dll to C:\Windows\system32 4. Run (as admin) rundll32 C:\Windows\system32\viorngum.dll,RegisterProvider 5.random.exe in the guest Actual Results it will generate random data successfully Based on above ,this issue has been fixed ald ,move status to VERIFEID Verified this bug on win7-64 guest as well steps same as comment #20 This request was resolved in Red Hat Enterprise Linux 7.0. Contact your manager or support representative in case you have further questions about the request. |
Description of problem: I tried to access to the virtio-rng device on a windows 2012r2 guest by using: ... if(!NT_SUCCESS(status = BCryptOpenAlgorithmProvider( &hRandomAlg, BCRYPT_RNG_ALGORITHM, L"QEMU VirtIO RNG Provider", 0))) { wprintf(L"**** Error 0x%x returned by BCryptOpenAlgorithmProvider\n", status); goto Cleanup; } ... but failed. The program returned: "Error 0xc0000225 returned by BCryptOpenAlgorithmProvider" And this error code means: 0xC0000225: STATUS_NOT_FOUND - The object was not found. http://msdn.microsoft.com/en-us/library/cc704588.aspx STATUS_NOT_FOUND - No provider was found for the specified algorithm ID. http://msdn.microsoft.com/en-us/library/windows/desktop/aa375479%28v=vs.85%29.aspx I'm not sure if I were using the right steps. If not, please correct me. Version-Release number of selected component (if applicable): virtio-win-prewhql-0.1-76 qemu-kvm-rhev-1.5.3-57.el7ev.x86_64 How reproducible: 100% Steps to Reproduce: 1. boot windows guest with virtio-rng device. # /usr/libexec/qemu-kvm ... \ -object rng-random,filename=/dev/random,id=rng-random0 \ -device virtio-rng-pci,rng=rng-random0,id=rng0 2. install virtio-rng driver on guest 3. try to access to virtio-rng device. CMD> random.exe Actual results: Error 0xc0000225 returned by BCryptOpenAlgorithmProvider. Expected results: virtio-rng device works properly. Additional info: