Setup instructions for self-hosted runners
April 4, 2025 ยท View on GitHub
The CI/CD workflow for eBPF for Windows has two categories of tests. The first category is for the user mode tests
(including the unit tests, fault injection tests etc.) that run on the GitHub runners.
The other category is the kernel driver tests in that run on specialized pool of runners as discussed in 1es/README.md.
It is recommended that a developer run the CI/CD tests in their local development environment before submitting a pull-request.
While the user mode tests can be run on the development machine without a lot of prior setup, that is not true for the kernel tests.
This document describes step-by-step how a self-hosted runner can be configured to run the CI/CD kernel driver tests.
- Create the Self-Hosted Runner
This section discusses how to create a new self-hosted runner for the developer's fork of the
eBPF for Windowsproject. This requires administrator permissions in the project. - From the settings menu in Github UI, select
Actions->Runnersand click on theNew self-hosted-runnerbutton. This will generate a token for the self-hosted runner. - The self-hosted runner must be a Windows device running a 64-bit Windows OS.
- If the runner is a physical machine, it must satisfy the hardware requirements for installing Hyper-V.
- If the runner is a virtual machine, it must support nested virtualization.
- On the self-hosted runner download and install action runner following the instructions for Windows x64.
- Configure action runner as follows:
./config.cmd --url <fork URL> --labels 'ebpf_cicd_tests_ws2019' --token <action runner token> --runasservice --windowslogonaccount <account> --windowslogonpassword <password>For the--urlparameter provide the URL to the fork for which self-hosted runner is being configured.
For the--tokenparameter provide the token obtained in step 3.
The value for--labelsparameter must be set toself-hosted, matching the value of theenvironmentfield in the jobs nameddriver_testsanddriver_native_only_testsincicd.yml.
The--runasserviceparameter makes the action runner run as a Windows service. The runner service runs asNetworkServiceby default. However, theKernel_Test_VMworkflow performs operations on a test VM that requires administrator privilege. So, the credentials of an account with administrator privilege must be supplied inwindowslogonaccountandwindowslogonpasswordparameters. - Reboot the self-hosted runner.
- Run the
setup.ps1script to configure the self-hosted runner and install a test VM inside it.- The script requires a VHD file for installing the Windows OS of your choice on to the test VM. The VHD file can be downloaded from the Microsoft Evaluation Center. Here are the download links for some of the latest Windows offerings. Windows 11 Enterprise Edition Windows Server 2022 Windows Server 2025
- The script requires the following powershell modules that are in the
eBPF for Windowsrepository:scripts\common.psm1scripts\config_test_vm.psm1
- The script requires an
unattendfile. One is available inunattend.xml.
- Run the
configure_vm.ps1script to configure the test VM.