Blame

9b2c70 Samuli Seppänen 2025-02-28 16:03:58 1
**NOTE:** OpenVPN's drivers (tap-windows6 mainly) was in the process of getting the WHQL certification years ago. Then we realized that Microsoft documentation is wrong and WHQL certification is **not** necessary for the drivers on Windows Server platforms. Due to complexities in getting HLK tests to pass, which is/was a requirement for WHQL certification, we basically just gave up. This article is retained because it may help somebody else on a more general level.
2
b69171 Samuli Seppänen 2025-02-28 16:04:19 3
# Introduction
4
2fa998 Samuli Seppänen 2025-02-28 16:01:46 5
Microsoft has some documentation about HLK testing and WHQL signing, but it is quite incomplete, and there is lots of room for speculation and anecdotes. Practical testing is often required to understand the requirements fully. Therefore some of the requirements documented in this article are bound to change.
6
7
Different Windows versions have different kernel-mode signing options:
8
9
* Windows 7/8/8.1/Server 2012r2
10
* Cross-signing
11
* WHQL-certified (HCR)
12
* Windows 10 desktop
13
* Attestation signing
14
* WHQL-certified (HLK)
15
* Windows Server 2016/2019
16
* Attestation signing
17
* WHQL-certified (HLK)
18
19
In this article we focus on HLK testing.
20
21
**NOTE:** it **is not required** to pass the HLK tests just to get a driver that loads on Windows Server 2016/2019. An attestation-signed driver is good enough. This claim contradicts the "official" Microsoft documentation but trust me, it is true. Our installers have attestation-signed drivers and no Windows Server 2016/2019 users have complained. Apparently that particular piece of MS documentation was written at a time when MS was _planning_ to require WHQL-certified drivers for Windows Server 2016+, then backpedaled and forgot to update the documentation.
22
23
# Getting source code for tap-windows6
24
25
Sgstair patched tap-windows6 to pass the HLK tests. [His work](https://github.com/sgstair/tap-windows6/tree/hlkwork) has now been merged to the upstream tap-windows6 project
26
27
# HLK test environment overview
28
9b2c70 Samuli Seppänen 2025-02-28 16:03:58 29
HLK testing always requires a HLK Controller/Studio node, plus one or more HLK clients. The HLK client Windows version and HLK versions need to be in sync [as described in MS documentation](https://docs.microsoft.com/en-us/windows-hardware/test/hlk/). For example, if your goal is to get a signature for Windows Server 2019 you need to use HLK 1809. This requirement is clearly outlined in the [HLK 1809 release blog post](https://techcommunity.microsoft.com/t5/Windows-Hardware-Certification/Accepting-Windows-10-version-1809-and-Windows-Server-2019/ba-p/364926). Additionally since [HLK 1709 release](https://techcommunity.microsoft.com/t5/Windows-Hardware-Certification/Accepting-Windows-10-version-1803-submissions/ba-p/364921) HLK will support testing a single Windows 10 version only.
2fa998 Samuli Seppänen 2025-02-28 16:01:46 30
31
According to practical testing done by [wintun](https://www.wintun.net/) developers it is possible to get a code signature that is valid for all Windows 10 platforms using the following HLK clients:
32
33
* Windows Server 2019 Desktop (64-bit)
34
* Currently the [Static Tools Logo Test](https://docs.microsoft.com/en-us/windows-hardware/test/hlk/testref/6ab6df93-423c-4af6-ad48-8ea1049155ae) has to run on "Desktop" Server variant
35
* Windows Server 2019 Core (64-bit)
36
* The [Operate in Server Core test](https://docs.microsoft.com/en-us/windows-hardware/test/hlk/testref/ac3eb111-539a-4b7b-93f2-d542bd8a2135) needs to run on "Core" server variant
37
* Windows 10 desktop (32-bit)
38
39
Wintun was able to pass HLK testing without any *physical* HLK clients. But because Wintun advertised itself as a virtual device it had a narrower scope and had to pass fewer HLK tests (~50 in total) than tap-windows6 (68 tests with filters applied).
40
41
For the HLK controller you can use a virtualized (Virtualbox, VMware) Windows Server 2016 or 2012r2 instance.
42
43
For tap-windows6 testing a support machine is also needed. To be on the safe side use the same OS version and build as the HLK client.
44
45
There are some additional requirements for tap-windows6 that stem from generic [LAN testing prerequisites](https://docs.microsoft.com/en-us/windows-hardware/test/hlk/testref/lan-testing-prerequisites):
46
47
* HLK client needs at least 4 virtual processor cores (unverified) for Windows Server certification
48
* HLK clients need to be physical computers, not virtualized (unverified)
49
50
Also try to get a quality fast network switch. Slow switches can cause issues on some of the tests. However, a cheap 10€ switch may end up working just fine.
51
52
# Installing HLK software
53
54
For HLK software installation please refer to the official MS documentation, check out [puppet-hlk](https://github.com/Puppet-Finland/puppet-hlk/) and [puppet-hlk_tap6_openvpn](https://github.com/Puppet-Finland/puppet-hlk_tap6_openvpn) or try out the [Windows Virtual Hardware Lab Kit](https://docs.microsoft.com/en-us/windows-hardware/test/hlk/getstarted/getstarted-vhlk).
55
56
The version of HLK you need to install depends on the version of Windows you're attempting certify as described in [Microsoft documentation](https://docs.microsoft.com/en-us/windows-hardware/test/hlk/). To check Windows version from Powershell do:
57
58
```
59
PS> [System.Environment]::OSVersion.Version
60
```
61
62
# Preparing HLK clients
63
64
For multimachine tests you need to name some of the devices on the HLK test client (that actually runs the tests) and support machine (second machine that is connected “back to back” through the VPN). The non-VPN interface through which the nodes communicate with the HLK controller should be named "MessageDevice" and the tap-windows6 adapter on the support machine should be named "SupportDevice0". Details in [LAN testing prerequisites](https://docs.microsoft.com/en-us/windows-hardware/test/hlk/testref/lan-testing-prerequisites).
65
66
You also have to enable test signing so that you can load unsigned ("to be tested") drivers on both HLK client and support machine:
67
68
```
69
PS> bcdedit /set testsigning on
70
PS> shutdown /r
71
```
72
73
Then you need to install the HLK client software from the HLKInstall SMB share on the controller.
74
75
You also need the automatically generated test certificate ("WDKTest*") from the tap-windows6 build machine to the Windows certificate store on the HLK clients. After all this you can install the test-signed driver without signature errors.
76
77
# Setting up OpenVPN for HLK tests
78
79
The "Run tests" in HLK fail consistently unless the tap-windows6 adapter has an IPv6 gateway address. This can be resolved by a simple bridged peer to peer OpenVPN setup, where interface settings are configured statically outside of OpenVPN.
80
81
The first steps are:
82
83
* Install the latest OpenVPN 2.x on the HLK client and support machine
84
* Install the same, test-signed (to-be-HLK-tested) tap-windows6 driver on the HLK clients
85
* Configure static IP, netmask, gateway, etc. for the TAP interface
86
* Disable Windows Firewall for the TAP adapter / Private networks. This is not strictly necessary, but saves time.
87
88
Then generate a shared secret with "openvpn --genkey" so that you can use it in the OpenVPN config. The OpenVPN configuration file for HLK client and support machines can be identical except for the "remote" settings:
89
90
```
91
dev tap
92
mode p2p
93
cipher AES-256-CBC
94
secret hlk.key
95
remote <remote>
96
verb 3
97
```
98
99
The above setup is symmetric in the sense that neither node is a client or a server, and either one can initiate the connection. This is similar to what is described in the [static key mini-howto](https://openvpn.net/community-resources/static-key-mini-howto/).
100
101
To verify OpenVPN connectivity launch it from an administrator Powershell session first on both machines:
102
103
```
104
PS> cd C:\Program Files\OpenVPN\config
105
PS> ..\bin\openvpn.exe --config hlk.ovpn
106
```
107
108
If you see that connection was established try to ping the VPN IPs (IPv4 and IPv6) of the other party from both ends. If that succeeds, you can stop OpenVPN and let OpenVPNService manage it from there on:
109
110
```
111
PS> Set-Service OpenVPNService -StartupType Automatic -Status Running
112
```
113
114
Some have had more luck with the legacy service (OpenVPNServiceLegacy).
115
8f55af Samuli Seppänen 2025-02-28 16:06:25 116
# Preparing HLK studio/controller
2fa998 Samuli Seppänen 2025-02-28 16:01:46 117
118
## Select the device to test
119
120
When you have created a Project the next step is to select what to test. Go to "Selection" tab and select "TAP-Windows Adapter V9" of the HLK client (not support) machine.
121
122
## Set product type
123
124
In the HLK Studio's Project tab you will see a category called "Product Types" at the right, like in [here](https://docs.microsoft.com/en-us/windows-hardware/test/hlk/user/hlk-studio). When you create a new project the "Product Types" section will be empty, and you need to make it says LAN, or you end up doing all the testing work and only get certified as an "Other Driver".
125
126
HLK product types are listed in the [product type matrix](https://docs.microsoft.com/en-us/windows-hardware/test/hlk/user/hlk-product-type-matrix). The way to add the "LAN" product type is to go to the "Selection" Tab, select "Device Manager" on the left, then right click on the TAP adapter and add the feature for Device.Network.LAN.PM (power management). HLK then notices that all features for the "LAN" product type are met and it adds the "LAN" product type to the project.
127
128
## Loading compatibility playlists
129
130
Make sure to get the HLK Hardware Compatibility Playlists (on the main HLK download page), and apply the one for the correct context, e.g. HLK Version 1809 CompatPlaylist x64 Server.xml. The playlist narrows down the list of tests to the set required to get an HLK certification, removes some extra stress/failure verification type tests designed to help find driver crashes. There’s a “Load Playlist” option in the tests panel in the HLK studio app that you can use.
131
132
## Adding machines to pool
133
134
It seems required/useful to add HLK clients to the pool first, then the support machine. Otherwise when you select the driver in "Device manager" tab HLK will assume that the HLK support machine has the driver under test. This *may* create problems down the line.
135
136
# Configuring and running the mandatory HLK tests
137
138
## Multi-machine tests
139
140
Then when you go to schedule the multimachine test, you can change the “role” dropdown to the support machine, and select the support machine (should be there if you have two ready machines in the pool).
141
142
Some of the non-NDIS tests that require “a working network connection” can just be given a valid IPV6 address on the VPN network and they will be happy with that. Whenever you see the “WDTFREMOTESYSTEM” parameter when scheduling a test, set it to an IPv6 address the system can ping over the VPN link. This could be the ipv6 address of the “support” system, or it could be some other arbitrary system on the VPN. This might not be necessary if the device under test has a working IPv6 gateway address that points to, say, support machine's tap adapter interface. But wearing belt and suspenders is not a bad idea when running HLK tests.
143
144
## NDISTest 6.5 - 2 machine - Linkcheck
145
146
This test tests plugging and unplugging the (virtual) ethernet cable.
147
148
For this test you have two options:
149
150
* Start and stop the service when running this to make the link start and stop
151
* Note that you can't do this from Powershell prompt of the DTMLLUAdminUser which you may end up being in. You can still use the graphical services management, or possibly use an elevated Powershell prompt.
152
* Use Tapdiag to change link state on the test system
153
154
In either case follow the interactive messagebox prompts. You may need to detach and attach the "cable" twice.
155
156
## NDISTest 6.0 - 2 Machine - 2c_Priority
157
158
Use Tapdiag to enable 802.1Q on both machines before running the NDIS QoS test (2c_Priority).
159
160
The process for using tapdiag is:
161
162
1. tapdiag /enable # Sets a registry key that enables the .tapdiag endpoint in the driver
163
1. Restart the TAP driver, reboot or disable/enable in device manager. May need to stop the openvpn service to avoid a reboot – Reconnect VPN
164
1. tapdiag /link:[on|off] # Use to unplug/plug ethernet cable
165
1. tapdiag /setq:[on|off|always] # to set the 802.1Q handling. Driver now disables 802.1Q by default.
166
167
Note that the tapdiag configuration is runtime only – if you reboot the test machine, you will lose the 802.1Q state.
168
8f55af Samuli Seppänen 2025-02-28 16:06:25 169
## NDISTest 6.5 - 2 Machine - AddressChange
2fa998 Samuli Seppänen 2025-02-28 16:01:46 170
171
This will definitely fail on slower machines. It worked fine on 1 year old i7 systems.
172
173
## NDISTest 6.5 - 2 Machine - E2EPerf
174
175
The *E2EPerf* test seems to fail if the test adapter and the support adapter have different link speeds. This is visible from the logs of "Run NDISTest Client (no verifier)":
176
177
```
178
ERROR: Support Adapter must be connected at a link speed greater than or equal to the Test Adapter
179
```
180
181
This is a problem if the support machine has an old tap-windows6 driver version that claims to be 100Mbps whereas the device under test ("DUT") is advertising itself as 1Gbps device. Resolve by installing the correct (1Gbps) tap-windows6 driver version to the support machine as well.
182
183
## NDISTest 6.0 - 1 machine - 1c_FaultHandling
184
185
This test can if you happen to have even one Network device that does not have a functional driver. The failure will then happen at the "Run NDISTest Client" phase when it tries to stop the (tap-windows6) driver:
186
187
```
188
Error: Unable to stop driver
189
Error Type: NT_STATUS
190
Error Code: 0x5473
191
Error Text: Error 0x00005473
192
```
193
194
More details are available in the log file *ndistest.htm*:
195
196
```
197
Variation #3 StopDriver
198
StopDriver
199
- GUID: {0CCB2729-3A97-4B26-863E-1FA8162F2F99}
200
[1062062]NDTSupp: Unable to open NetCfg device registry key. Error = 0xe0000204
201
Unable to collect setup information for all network devices
202
203
Unable to build PNP information translation list
204
205
[1062062]NDTSupp: Unable to convert GUID to an instance ID
206
FAILED: [21619] Unable to stop driver
207
```
208
209
The only hint here that tap-windows6 itself might not be to blame is the phrase "all network devices". In my case on Windows Server 2019 Datacenter Evaluation the problem was a Wireless LAN adapter whose driver was not functioning properly. The fix was to disable Wireless LAN altogether from BIOS. Installing a working driver would probably have solved the problem as well.
210
211
Once you get past these failure, at the end of the test !OpenvpnService might not re-establish a link. WHQL seems to get the OpenVPN service into a bad state, just restart the OpenVPN service and the test will pass. The test waits a few minutes for the link to come back up.
212
213
## NDISTest 6.0 - 1 machine - 1c_NdisRequestCov
214
215
This test may fail at "Run NDISTest Client" -> "Restore protocol bindings" phase:
216
217
```
218
Error: Unable to restore device settings at the end of the test
219
Error Type: NT_STATUS
220
Error Code: 0x15b38
221
Error Text: Error 0x00015b38
222
```
223
224
While the error message is not the same as with 1c_FaultHandling and with 1c_Registry, the cause seems to be the same, as well as the remedy: ensure that you don't have any disfunctional network device (drivers).
225
226
## NDISTest 6.0 - 1 machine - 1c_Registry
227
228
This test has the same issues as 1c_FaultHandling, above. The same remedies apply.
229
230
## NDISTest 6.0 - 2 machine - 2c_Mini6Stress
231
232
Sometimes this test will hit a breakpoint in the NDIS test code. The breakpoint seems harmless and complained about some packets not getting confirmed. If you don't connect a kernel debugger this will cause a !BugCheck and the test will fail. If this happens connect a kernel debugger and rerun the test. When the breakpoint is hit press (l) Always Ignore and the test will pass.
233
234
You may also get away with just rerunning the test until it passes.
235
236
## TDI filters and LSPs are not allowed
237
238
This test may fail due to broken network drive mappings. The hints are available in "Infrastructure -> Execution Logs -> WttEa.log:
239
240
```
241
2980 4496 2019:5:31 18:48:8:90 Error: 0x8205aaaf, Error 0x8205aaaf winsockerror code of 11001
242
File=sdktools\wtt\jobs\wtttransportproviders\wttcommtcpip\src\wttcommtcpip.cpp Line=656
243
PersistManager:EA:JobCancel::token::57M710T->
244
--- snip --
245
2980 5488 2019:5:31 18:48:11:210 Error: 0x800704c3, Multiple connections to a server or shared
246
resource by the same user, using more than one user name, are not allowed. Disconnect all
247
previous connections to the server or shared resource and try again.
248
CRunManager::GetLogLocation()::(null)::CAUSE:Error returned from EnableShareAccess to the root
249
of "\\controller.hlk.local\HLKLogs\EaFolderAccessCheck\4825BE12-3B91-4414-B8E2-5AD703D69BB3"
250
File=sdktools\wtt\jobs\runtime\wttexecutionagent\eamanager\runmanager\src\runmanager.cpp Line=2379
251
```
252
253
If this happens you should see a network share that is unavailable:
254
255
```
256
PS C:\Users\Administrator> net use
257
New connections will be remembered.
258
259
Status Local Remote Network
260
-------------------------------------------------------------------------------------------
261
Unavailable R: \\hlk-controller.openvpn.in\HLKInstall Microsoft Windows Network
262
263
The command completed successfully.
264
```
265
266
To resolve, unmount the network drive:
267
268
```
269
PS C:\Users\Administrator> net use R: /DELETE
270
R: was deleted successfully.
271
```
272
273
## Static Tools Logo Test
274
275
The [Static Tools Logo Test](https://docs.microsoft.com/en-us/windows-hardware/test/hlk/testref/6ab6df93-423c-4af6-ad48-8ea1049155ae) checks for the presence of a Driver Verification Log (DVL) log file as described in the [official MS documentation](https://docs.microsoft.com/en-us/windows-hardware/drivers/develop/creating-a-driver-verification-log). The verification log does not have to come from the same *build* as the one you install to the HLK clients, but it almost certainly has to be based on the exact same *source code*.
276
277
Tap-windows6 buildsystem runs code analysis automatically for x64 Release builds, so build that variant as the first step. Test analysis files are under directory *tap-windows6\src\x64\Release* named as *<sourcefile>.nativecodeanalysis.xml*. Results of the code analysis are not enough, as you also need to [Creating a log file for Static Driver Verifier](https://docs.microsoft.com/en-us/windows-hardware/drivers/develop/creating-a-log-file-for-static-driver-verifier).
278
279
Creating the Static Driver Verifier logs is a simple process once you know it. Launch a *x64 Native Tools command prompt* that comes with Visual Studio 2019. Then
280
281
```
282
PS> cd tap-windows6\src
283
PS> msbuild C:\users\samuli\opt\tap-windows6\src\tap-windows6.vcxproj /p:Configuration=Release /p:Platform=x64 /target:sdv /p:inputs="/check"
284
```
285
286
Note that you need to "cd" to the "src" directory. You also need to provide the full path to the vcxproj file. The SDV tests will take quite a bit of time so don't wait holding your breath.
287
288
Once they pass you need to merge the results of SDV and codeanalysis. You can do this from Visual Studio 2019 from the "Extensions" -> "Driver" menu, or using the command-line:
289
290
```
291
cd tap-windows6\src
292
$ msbuild tap-windows6.vcxproj /target:DVL /p:Configuration=Release;Platform=x64
293
```
294
295
The end result is a file called *tap0901.DVL.XML*, which you should copy to *C:\DVL* on one of the HLK clients, after which the Static Tools Logo Test should pass.
296
297
# Various known issues
298
299
## Failures to Copy downlevel NDISTest binaries
300
301
An issue that occurs in many tests and which *looks* serious, but is actually not that, is the error at "Copy downlevel NDISTest binaries", where it starts to look for non-existing files from the Controller SMB share:
302
303
```
304
Cause : Failed to Start the Task
305
306
Cause : Failed to Copy File : "\\controller.hlk.local\tests\AMD64\nethlk\ndistest\bin\ntndis62\ndprot62.sys"
307
Dest : "C:\hlk\JobsWorkingDir\Tasks\WTTJobRun76257277-2193-E911-82AA-080027895339\ndistest\bin\ntndis62\ndprot62.sys"
308
309
Failure : Failed to Start the Task "Copy downlevel NDISTest binaries"
310
311
Cause : Cannot Find Pattern "\\controller.hlk.local\tests\AMD64\nethlk\ndistest\bin\ntndis62\ndprot62.sys"
312
313
Cause : Failed to Copy File : "\\controller.hlk.local\tests\AMD64\nethlk\ndistest\bin\ntndis61\ndprot61.sys"
314
Dest : "C:\hlk\JobsWorkingDir\Tasks\WTTJobRun76257277-2193-E911-82AA-080027895339\ndistest\bin\ntndis61\ndprot61.sys"
315
316
Cause : Cannot Find Pattern "\\controller.hlk.local\tests\AMD64\nethlk\ndistest\bin\ntndis61\ndprot61.sys"
317
318
Cause : Failed to Copy File : "\\controller.hlk.local\tests\AMD64\nethlk\ndistest\bin\ntndis6\ndprot60.sys"
319
Dest : "C:\hlk\JobsWorkingDir\Tasks\WTTJobRun76257277-2193-E911-82AA-080027895339\ndistest\bin\ntndis6\ndprot60.sys"
320
321
Cause : Cannot Find Pattern "\\controller.hlk.local\tests\AMD64\nethlk\ndistest\bin\ntndis6\ndprot60.sys"
322
323
Cause : Failed to Copy File : "\\controller.hlk.local\tests\AMD64\nethlk\ndistest\bin\ntndis51\ndprot51.sys"
324
Dest : "C:\hlk\JobsWorkingDir\Tasks\WTTJobRun76257277-2193-E911-82AA-080027895339\ndistest\bin\ntndis51\ndprot51.sys"
325
326
Cause : Cannot Find Pattern "\\controller.hlk.local\tests\AMD64\nethlk\ndistest\bin\ntndis51\ndprot51.sys"
327
```
328
329
If you mount the share manually on the HLK client you'll notice that either the entire directories or individual .sys files are missing indeed:
330
331
```
332
PS> net use X: \\controller.hlk.local\tests
333
The command completed successfully.
334
PS> Get-Childitem x:\amd64\NetHlk\NDISTest\bin\ -filter "ntndis*"
335
336
Directory: x:\amd64\NetHlk\NDISTest\bin
337
338
339
Mode LastWriteTime Length Name
340
---- ------------- ------ ----
341
d----- 5/30/2019 7:07 AM ntndis51
342
d----- 5/30/2019 7:07 AM ntndis630
343
d----- 5/30/2019 7:07 AM ntndis650
344
d----- 5/30/2019 7:07 AM ntndis660
345
d----- 5/30/2019 7:07 AM ntndis680
346
```
347
348
While this step fails, it seems that it *can* fail yet the test as a whole can pass. The failure reason icon (see [here](https://docs.microsoft.com/en-us/windows-hardware/test/hlk/user/troubleshooting-windows-hlk-test-failures)) in this case should be "Canceled", i.e. "A user canceled the test, or a task has been canceled because the preceding task failed."
349
350
## HLK clients can't be activated
351
352
If you upgrade HLK software on both controller and client/support you may end up with a situation where you can't put any of the clients into "Ready" state. You may be able to resolve this by removing the machines from the pool, and deleting them from the default pool, and then restarting HLKSvc service on the clients.
353
354
## Packet transmission too slow
355
356
This can result in test errors like "Expected minimum of 237 packets but we received 200 packets". The test allows one second after all the sends have been completed for all the packets to be received.
357
358
Disabling verbose log printing in the server makes it more reliable.
359
360
## Packets reordering
361
362
Packets can (rarely) be reordered in flight, which causes an assertion in the test driver. Hints are errors such as
363
364
* "1 total breakpoints were hit in the protocol driver while this test was executing"
365
* "Out of order indication"
366
* "Dropped indications"
367
368
HLK doesn't complain if some packets are lost, instead these errors are raised when out of order packets are received.
369
370
The OpenVPN architecture has some inherent race conditions that can cause reordering of packets. This has happened 2 or 3 times over dozens of runs, and does cause a test failure, but a rerun should pass.
371
372
## Address Change test failures
373
374
You may encounter failures in the "Address Change" test. It’s a combination of a few factors:
375
376
* OpenVPN client sets the network link status around a second before the server actually starts forwarding any packets to the client. This is quite possibly an order of operations bug in openvpn.
377
* That would be well and good, but the address change test has extremely aggressive timings
378
* It starts sending packets almost immediately once the link status comes up, and stops listening for packets less than a second after that.
379
380
This failure seems to be related to newer OpenVPN versions.
381
382
383
Logs for reference:
384
```
385
(Test system connecting after MAC address changes)
386
387
…
388
389
Wed Feb 20 22:03:43 2019 us=810407 vpnclient-nopass/192.168.1.36:1194 Data Channel MTU parms [ L:1581 D:1450 EF:49 EB:411 ET:32 EL:3 ]
390
391
Wed Feb 20 22:03:43 2019 us=810637 vpnclient-nopass/192.168.1.36:1194 Outgoing Data Channel: Cipher 'AES-256-GCM' initialized with 256 bit key
392
393
Wed Feb 20 22:03:43 2019 us=810765 vpnclient-nopass/192.168.1.36:1194 Incoming Data Channel: Cipher 'AES-256-GCM' initialized with 256 bit key
394
395
396
397
(Other system starts to send test packets)
398
399
WWWWRWed Feb 20 22:03:48 2019 us=680899 vpnclient-nopass/192.168.1.151:1194 MULTI: unknown unicast destination [00:ff:e9:88:37:ca], flood
400
401
wWRWed Feb 20 22:03:48 2019 us=681534 vpnclient-nopass/192.168.1.151:1194 MULTI: unknown unicast destination [00:ff:e9:88:37:ca], flood
402
403
wWRWed Feb 20 22:03:48 2019 us=681869 vpnclient-nopass/192.168.1.151:1194 MULTI: unknown unicast destination [00:ff:e9:88:37:ca], flood
404
405
…
406
407
wWRWed Feb 20 22:03:49 2019 us=158052 vpnclient-nopass/192.168.1.151:1194 MULTI: unknown unicast destination [00:ff:e9:88:37:ca], flood
408
409
(Other system is done sending packets)
410
411
412
(Openvpn server starts forwarding packets at around this point.)
413
414
wWRRRWed Feb 20 22:03:50 2019 us=472525 vpnclient-nopass/192.168.1.36:1194 MULTI: Learn: 02:02:04:06:08:08 -> vpnclient-nopass/192.168.1.36:1194
415
…
416
417
```
418
419
Another side note – The “unicast destination [00:ff:e9:88:37:ca]” in those messages is incorrect – those packets are actually directed to the “02:02:04:06:08:08” address. The flood message in the patch is showing the source address.
420
421
## HLK client version mismatches
422
423
The HLK client version (e.g. Windows 1809) needs to match the HLK version (HLK 1809). If there is a mismatch there can be some setup issues (some semantics of driver verifier configuration changed, or some of the test components might have failed on the OS version).
424
425
## Controller misuses support machine
426
427
The controller seems to arbitrarily pick which machine is Support and which one is under Test. If it has trouble picking name one of the TAP adapters SupportDevice0. Picking the options in the UI didn't change the behavior. So for the tests you are baby sitting pay attention to which the server and and which one the client is. The server will run a server.htm in NDIS test so it will be obvious.
428
429
## Driver parameters
430
431
Not sure if the below had any effect but was changed when doing this test:
432
433
In !OemVista.inf.in: *!PhysicalMediaType = 0x0 ; !NdisPhysicalMediumUnspecified
434
435
This was done to be consistent with what was in constants.h, but it also seemed to get some tests passing.
436
437
## Test-signing issues
438
439
You may encounter the follwoing error when building with EWDK from the command-line with buildtap.py with --hlk switch, which has test-signing enabled:
440
441
```
442
SIGNTASK : SignTool error : No certificates were found that met all the given criteria.
443
```
444
445
This happens even though a properly named (e.g. "WDKTest samuli") certificate is present under *cert:\!CurrentUser\My*. This problem was probably caused doing a "Hlk" build from inside Visual Studio 2019 Community, which created the WDKTest certificate automatically, but in a way that EWDK was unable to use it.
446
447
This problem can be resolved by simply removing the old certificate. For example:
448
449
```
450
PS> Remove-Item Cert:\CurrentUser\My\91047502F73D5410C106E05CEC8A990219810FBE
451
```
452
453
Then just run buildtap.py with --hlk to create a new test-signing certificate.
454
455
You will also need to export the new certificate from the certificate store. For example:
456
457
```
458
PS> Get-Childitem Cert:\Currentuser\My\F1E725722C5BB56757B6D261D958425869213089|Export-Certificate -Filepath C:\users\samuli\opt\wdktest-samuli.cer
459
```
460
461
Then import that certificate to the certificate store on HLK clients:
462
463
```
464
Get-Childitem .\wdktest-samuli.cer| Import-Certificate -Certstorelocation cert:\LocalMachine\TrustedPublisher
465
```
466
467
The puppet-hlk_tap6_openvpn module handles the import part automatically with Powershell DSC.
468
469
# HLK logging
470
471
HLK controller logs problems mostly to event logs, so when tests are failing in an unusual fashion you can possibly find out why in the event viewer. When you have issue putting an HLK client into "Ready" state, for example, have a look at the event log.
472
473
The HLK tests fortunately provide tons of logging visible for HLK Studio. Check sections "Error", "Task log", "Infrastructure" in the context menu for the test in question to see what you can find.
474
475
# Debugging
476
477
It is possible to get HLK into strange states. For example:
478
479
* HLK clients / support machines do not get into "Ready" state
480
* Launching two-machine tests fail with duplicate database key errors
481
482
Some things you can try to get past these errors:
483
484
* Restart the "hlksvc" Windows service
485
* Reboot HLK nodes (controller, clients, support machine)
486
* Reinstall HLK client software and reboot HLK client
487
* Create a new HLK project
488
* Create a new pool and move HLK client machines there
489
* Delete HLK clients from the pool
490
491
The are known to work sometimes, but so far I have not been able to establish any logic here.
492
493
# Addendum
494
495
## Default browser on HLK controller
496
497
Do not change the default browser on the HLK controller, or you may be unable to view the HLK test logs directly from the HLK controller. This is known to happen if the default browser is set to Firefox, but other non-Internet Explorer browsers may be affected.
498
499
## Tap-windows6 as virtual network device
500
501
Changing the TAP interface type to be a virtual adapter in the INF file does not seem to work. It seems to mess up the NDIS tests which looked for a device that advertised as physical to assign a SupportDevice. Maybe this is something we can eventually work with Microsoft to fix.
502
503
## Note on reboots
504
505
Reboots seems to happen randomly during test setup. This can be a nuisance if you are monitoring the services window or the network connections
506
window. Helpful to make shortcuts to these so they can easily be opened.
507
508
## Firewall rules for HLK server and clients
509
510
Installing HLK software automatically opens ports in the Windows firewall for HLK traffic. In case HLK controller and HLK clients are not in the same switch some firewall (e.g. EC2 security group rules) might block HLK traffic. Here is a reference for the ports which need to be open for HLK tests to work:
511
512
* OpenVPN peer (udp/1194) <-> OpenVPN peer (udp/1194)
513
* HLK clients -> HLK controller tcp/1771 (HLK Server Receiver Port)
514
* HLK clients -> HLK controller tcp/1782 (HLKSvc Receiver Port)
515
* HLK clients -> HLK controller tcp/445 (HLKInstall Samba share)
516
* HLK controller -> HLK clients tcp/1771 (HLK Server Receiver Port)
517
518
Outbound traffic is assumed to be unrestricted. If not, adjust egress rules accordingly. Also note that IPv6 traffic needs to flow properly in the OpenVPN virtual network as HLK tests require IPv6.
519
520
# External links
521
522
* [Three-Plus Years Later… Driver Signing Still Baffles](https://www.osr.com/blog/2019/06/03/three-plus-years-later-driver-signing-still-baffles)
523
* [Device.Network tests](https://docs.microsoft.com/en-us/windows-hardware/test/hlk/testref/device-network-tests) (reference)
8f55af Samuli Seppänen 2025-02-28 16:06:25 524
* [WHCP Documents \(HLK 1809\)](https://download.microsoft.com/download/0/8/0/080BEFA0-416B-425A-BE37-B9E41B7C4C6B/WHCP-Documents-1809.zip)
2fa998 Samuli Seppänen 2025-02-28 16:01:46 525
* Zip containing PDFs that contain some of the best info on WHCP certification requirements
526
* [Windows Hardware Certification blog](https://techcommunity.microsoft.com/t5/Windows-Hardware-Certification/bg-p/WindowsHardwareCertification)
527
* [Troubleshooting Windows HLK](https://docs.microsoft.com/en-us/windows-hardware/test/hlk/user/troubleshooting-windows-hlk)
528
* [tapdiag](https://github.com/sgstair/tapdiag): a tool that is used to manipulate tap-windows6 at runtime for some HLK tests
529
* [puppet-hlk](https://github.com/Puppet-Finland/puppet-hlk/): Puppet module for setting up HLK controllers and HLK clients
530
* [puppet-hlk_tap6_openvpn](https://github.com/Puppet-Finland/puppet-hlk_tap6_openvpn): Puppet module for setting up OpenVPN and network interface configurations for HLK testing
531
* [Windows Virtual Hardware Lab Kit](https://docs.microsoft.com/en-us/windows-hardware/test/hlk/getstarted/getstarted-vhlk)
8f55af Samuli Seppänen 2025-02-28 16:06:25 532
* [Compatibility Play Lists \(Understanding is these are the only ones necessary to get signed\)](https://aka.ms/HLKPlaylist)
2fa998 Samuli Seppänen 2025-02-28 16:01:46 533
* [Getting drivers signed by Microsoft for multiple Windows versions](https://docs.microsoft.com/en-us/windows-hardware/drivers/dashboard/get-drivers-signed-by-microsoft-for-multiple-windows-versions)
534
* [http://timr.probo.com/wd3/071503/NDISTest.htm Testing Network Drivers with the NDIS Test Tool]