diff --git a/.cirrus.yml b/.cirrus.yml index 26167ba2bdd..ea422c31e04 100644 --- a/.cirrus.yml +++ b/.cirrus.yml @@ -138,6 +138,7 @@ validate-source_task: build_task: alias: 'build' name: 'Build for $DISTRO_NV' # N/B: Referenced by URLencoded strings elsewhere + skip: true # Temporarily disabled gce_instance: &fastvm image_project: libpod-218412 zone: "us-central1-a" @@ -198,6 +199,7 @@ build_task: build_aarch64_task: alias: 'build_aarch64' name: 'Build for $DISTRO_NV' + skip: true # Temporarily disabled ec2_instance: &standard_build_ec2_aarch64 image: ${VM_IMAGE_NAME} type: ${EC2_INST_TYPE} @@ -238,22 +240,22 @@ alt_build_task: TEST_FLAVOR: "altbuild" gce_instance: *fastvm matrix: - - env: - ALT_NAME: 'Build Each Commit' + # - env: + # ALT_NAME: 'Build Each Commit' - env: # TODO: Replace with task using `winmake` to build # binary and archive installation zip file. ALT_NAME: 'Windows Cross' # N/B: Referenced by URLencoded strings elsewhere - - env: - ALT_NAME: 'Alt Arch. x86 Cross' - - env: - ALT_NAME: 'Alt Arch. ARM Cross' - - env: - ALT_NAME: 'Alt Arch. MIPS Cross' - - env: - ALT_NAME: 'Alt Arch. MIPS64 Cross' - - env: - ALT_NAME: 'Alt Arch. Other Cross' + # - env: + # ALT_NAME: 'Alt Arch. x86 Cross' + # - env: + # ALT_NAME: 'Alt Arch. ARM Cross' + # - env: + # ALT_NAME: 'Alt Arch. MIPS Cross' + # - env: + # ALT_NAME: 'Alt Arch. MIPS64 Cross' + # - env: + # ALT_NAME: 'Alt Arch. Other Cross' # This task cannot make use of the shared repo.tar.zst artifact. clone_script: *full_clone setup_script: *setup @@ -267,6 +269,7 @@ alt_build_task: # Confirm building the remote client, natively on a Mac OS-X VM. osx_alt_build_task: name: "Build for MacOS amd64+arm64" # N/B: Referenced by URLencoded strings elsewhere + skip: true # Temporarily disabled alias: osx_alt_build # Docs: ./contrib/cirrus/CIModes.md only_if: *no_rhel_release # RHEL never releases podman mac installer binary @@ -318,6 +321,7 @@ osx_alt_build_task: freebsd_alt_build_task: name: "FreeBSD Cross" alias: freebsd_alt_build + skip: true # Temporarily disabled # Only run on 'main' and PRs against 'main' # Docs: ./contrib/cirrus/CIModes.md only_if: $CIRRUS_BRANCH == 'main' || $CIRRUS_BASE_BRANCH == 'main' @@ -359,11 +363,11 @@ build_success_task: alias: build_success depends_on: - validate-source - - build - - build_aarch64 + # - build + # - build_aarch64 - alt_build - - osx_alt_build - - freebsd_alt_build + # - osx_alt_build + # - freebsd_alt_build env: CTR_FQIN: ${FEDORA_CONTAINER_FQIN} container: &smallcontainer @@ -381,6 +385,7 @@ build_success_task: bindings_task: name: "Test Bindings" alias: bindings + skip: true # Temporarily disabled # Docs: ./contrib/cirrus/CIModes.md (Cirrus Task contexts and runtime modes) # only when: - main rules (see doc above); or # - bindings test code is changed; or @@ -431,6 +436,7 @@ bindings_task: swagger_task: name: "Test Swagger" alias: swagger + skip: true # Temporarily disabled depends_on: *build gce_instance: *standardvm env: @@ -452,6 +458,7 @@ swagger_task: win_installer_task: name: "Verify Win Installer Build" + skip: true # Temporarily disabled matrix: - env: CONTAINERS_MACHINE_PROVIDER: 'wsl' @@ -517,6 +524,7 @@ win_installer_task: docker-py_test_task: name: Docker-py Compat. alias: docker-py_test + skip: true # Temporarily disabled # Docs: ./contrib/cirrus/CIModes.md (Cirrus Task contexts and runtime modes) # only when: - main rules (see doc above); or # - docker-py test code is changed; or @@ -543,6 +551,7 @@ docker-py_test_task: unit_test_task: name: "Unit tests on $DISTRO_NV" alias: unit_test + skip: true # Temporarily disabled # Docs: ./contrib/cirrus/CIModes.md (Cirrus Task contexts and runtime modes) # only when: - main rules (see doc above); or # - unit test files are changed (contains a false positves such as test/e2e/ @@ -574,6 +583,7 @@ unit_test_task: unit_test_windows_task: name: "Unit tests on Windows" alias: unit_test_windows + skip: true # Temporarily disabled # Docs: ./contrib/cirrus/CIModes.md (Cirrus Task contexts and runtime modes) # only when: - main rules (see doc above); or # - unit test files are changed (contains a false positves such as test/e2e/ @@ -591,9 +601,6 @@ unit_test_windows_task: # everywhere to do so here it would mean we would need duplicate the # full big only_if condition which is more difficult to maintain so # use the skip here. - skip: &skip_rhel_release | - $CIRRUS_BRANCH =~ 'v[0-9\.]+-rhel' || - $CIRRUS_BASE_BRANCH =~ 'v[0-9\.]+-rhel' depends_on: *build ec2_instance: *windows timeout_in: 20m @@ -612,6 +619,7 @@ unit_test_windows_task: apiv2_test_task: name: "APIv2 test on $DISTRO_NV ($PRIV_NAME)" alias: apiv2_test + skip: true # Temporarily disabled # Docs: ./contrib/cirrus/CIModes.md (Cirrus Task contexts and runtime modes) # only when: - main rules (see doc above); or # - apiv2 test code is changed; or @@ -641,6 +649,7 @@ apiv2_test_task: compose_test_task: name: "$TEST_FLAVOR test on $DISTRO_NV ($PRIV_NAME)" alias: compose_test + skip: true # Temporarily disabled # Docs: ./contrib/cirrus/CIModes.md (Cirrus Task contexts and runtime modes) # only when: - main rules (see doc above); or # - compose test code is changed; or @@ -673,6 +682,7 @@ local_integration_test_task: &local_integration_test_task # name: &std_name_fmt "$TEST_FLAVOR $PODBIN_NAME $DISTRO_NV $PRIV_NAME $TEST_ENVIRON ${CI_DESIRED_DATABASE}" alias: local_integration_test + skip: true # Temporarily disabled # Docs: ./contrib/cirrus/CIModes.md (Cirrus Task contexts and runtime modes) # only when: - main rules (see doc above); or # - int test code is changed; or @@ -706,6 +716,7 @@ local_integration_test_task: &local_integration_test_task remote_integration_test_task: <<: *local_integration_test_task alias: remote_integration_test + skip: true # Temporarily disabled env: TEST_FLAVOR: int PODBIN_NAME: remote @@ -716,6 +727,7 @@ remote_integration_test_task: container_integration_test_task: name: *std_name_fmt alias: container_integration_test + skip: true # Temporarily disabled # Docs: ./contrib/cirrus/CIModes.md only_if: *only_if_int_test depends_on: *build @@ -743,6 +755,7 @@ container_integration_test_task: rootless_integration_test_task: name: *std_name_fmt alias: rootless_integration_test + skip: true # Temporarily disabled # Docs: ./contrib/cirrus/CIModes.md only_if: *only_if_int_test depends_on: *build @@ -760,6 +773,7 @@ rootless_integration_test_task: podman_machine_task: name: *std_name_fmt alias: podman_machine + skip: true # Temporarily disabled # Docs: ./contrib/cirrus/CIModes.md (Cirrus Task contexts and runtime modes) # only when: - main rules (see doc above); or # - machine code files are changed @@ -789,6 +803,7 @@ podman_machine_task: podman_machine_aarch64_task: name: *std_name_fmt alias: podman_machine_aarch64 + skip: true # Temporarily disabled only_if: *only_if_machine_test depends_on: *build ec2_instance: @@ -826,19 +841,16 @@ podman_machine_windows_task: # everywhere to do so here it would mean we would need duplicate the # full big only_if condition which is more difficult to maintain so # use the skip here. - skip: *skip_rhel_release depends_on: *build ec2_instance: <<: *windows type: z1d.metal platform: windows - timeout_in: 60m + timeout_in: 120m env: *winenv matrix: - env: TEST_FLAVOR: "machine-wsl" - - env: - TEST_FLAVOR: "machine-hyperv" clone_script: *winclone # This depends on an instance with an local NVMe storage so we can make use of fast IO # Our machine tests are IO bound so this is rather imporant to speed them up a lot. @@ -860,7 +872,7 @@ podman_machine_windows_task: main_script: ".\\repo\\contrib\\cirrus\\win-podman-machine-main.ps1" always: wsl_logs_artifacts: - path: ./*.zip + path: ./*.7z # Required for `contrib/cirrus/logformatter` to work properly html_artifacts: path: ./*.html @@ -870,8 +882,8 @@ podman_machine_windows_task: podman_machine_mac_task: name: *std_name_fmt alias: podman_machine_mac + skip: true # Temporarily disabled only_if: *only_if_machine_test - skip: *skip_rhel_release depends_on: *build persistent_worker: *mac_pw timeout_in: 60m @@ -918,6 +930,7 @@ podman_machine_mac_task: local_system_test_task: &local_system_test_task name: *std_name_fmt alias: local_system_test + skip: true # Temporarily disabled # Docs: ./contrib/cirrus/CIModes.md (Cirrus Task contexts and runtime modes) # only when: - main rules (see doc above); or # - sys test code is changed; or @@ -943,6 +956,7 @@ local_system_test_task: &local_system_test_task local_system_test_aarch64_task: &local_system_test_task_aarch64 name: *std_name_fmt alias: local_system_test_aarch64 + skip: true # Temporarily disabled # Docs: ./contrib/cirrus/CIModes.md only_if: *only_if_system_test depends_on: *build @@ -961,6 +975,7 @@ local_system_test_aarch64_task: &local_system_test_task_aarch64 remote_system_test_task: <<: *local_system_test_task alias: remote_system_test + skip: true # Temporarily disabled env: TEST_FLAVOR: sys PODBIN_NAME: remote @@ -969,12 +984,14 @@ remote_system_test_task: remote_system_test_aarch64_task: <<: *local_system_test_task_aarch64 alias: remote_system_test_aarch64 + skip: true # Temporarily disabled env: TEST_FLAVOR: sys PODBIN_NAME: remote rootless_remote_system_test_task: + skip: true # Temporarily disabled matrix: # Minimal sanity testing: only the latest Fedora - env: @@ -995,6 +1012,7 @@ rootless_remote_system_test_task: rootless_system_test_task: name: *std_name_fmt alias: rootless_system_test + skip: true # Temporarily disabled # Docs: ./contrib/cirrus/CIModes.md only_if: *only_if_system_test depends_on: *build @@ -1013,6 +1031,7 @@ rootless_system_test_task: farm_test_task: name: *std_name_fmt alias: farm_test + skip: true # Temporarily disabled # Docs: ./contrib/cirrus/CIModes.md (Cirrus Task contexts and runtime modes) # only when: - main rules (see doc above); or # - farm test code is changed or one of the shared helper import files from the system test; or @@ -1037,6 +1056,7 @@ farm_test_task: buildah_bud_test_task: name: *std_name_fmt alias: buildah_bud_test + skip: true # Temporarily disabled # Docs: ./contrib/cirrus/CIModes.md (Cirrus Task contexts and runtime modes) # only when: - main rules (see doc above); or # - podman build source code files or bud tests files are changed @@ -1064,6 +1084,7 @@ buildah_bud_test_task: upgrade_test_task: name: "Upgrade test: from $PODMAN_UPGRADE_FROM" alias: upgrade_test + skip: true # Temporarily disabled # Docs: ./contrib/cirrus/CIModes.md (Cirrus Task contexts and runtime modes) # only when: - main rules (see doc above); or # - upgrade test code is changed or one of the shared helper import files from the system test; or @@ -1103,6 +1124,7 @@ upgrade_test_task: meta_task: name: "VM img. keepalive" alias: meta + skip: true # Temporarily disabled container: cpu: 2 memory: 2 @@ -1135,6 +1157,7 @@ success_task: # Ref: https://github.com/openshift/release/pull/48855 name: "Total Success" alias: success + skip: true # Temporarily disabled # N/B: ALL tasks must be listed here, minus their '_task' suffix. depends_on: - build_success @@ -1176,6 +1199,7 @@ success_task: artifacts_task: name: "Artifacts" alias: artifacts + skip: true # Temporarily disabled # Docs: ./contrib/cirrus/CIModes.md only_if: *no_rhel_release depends_on: @@ -1225,6 +1249,7 @@ artifacts_task: release_task: name: "Verify Release" alias: release + skip: true # Temporarily disabled # This should _only_ run for new tags # Docs: ./contrib/cirrus/CIModes.md only_if: $CIRRUS_TAG != '' @@ -1249,6 +1274,7 @@ release_task: release_test_task: name: "Optional Release Test" alias: release_test + skip: true # Temporarily disabled # Release-PRs always include "release" or "Bump" in the title # Docs: ./contrib/cirrus/CIModes.md only_if: $CIRRUS_CHANGE_TITLE =~ '.*((release)|(bump)).*' diff --git a/.packit.yaml b/.packit.yaml index 60c542ec87e..7e922e9b4cc 100644 --- a/.packit.yaml +++ b/.packit.yaml @@ -49,7 +49,7 @@ actions: jobs: - job: copr_build - trigger: pull_request + trigger: ignore packages: [podman-fedora] notifications: &packit_generic_failure_notification failure_comment: @@ -90,7 +90,7 @@ jobs: # Run on commit to main branch - job: copr_build - trigger: commit + trigger: ignore packages: [podman-fedora] branch: main owner: rhcontainerbot @@ -99,7 +99,7 @@ jobs: # Tests on Fedora - job: tests - trigger: pull_request + trigger: ignore packages: [podman-fedora] notifications: *packit_generic_failure_notification targets: @@ -113,7 +113,7 @@ jobs: - job: tests identifier: cockpit-revdeps - trigger: pull_request + trigger: ignore packages: [podman-fedora] notifications: failure_comment: @@ -140,7 +140,7 @@ jobs: - fedora-all - job: koji_build - trigger: commit + trigger: ignore packages: [podman-fedora] sidetag_group: podman-releases dist_git_branches: *fedora_targets diff --git a/contrib/cirrus/win-collect-wsl-logs-start.ps1 b/contrib/cirrus/win-collect-wsl-logs-start.ps1 index 4dec63228f9..f441add241a 100644 --- a/contrib/cirrus/win-collect-wsl-logs-start.ps1 +++ b/contrib/cirrus/win-collect-wsl-logs-start.ps1 @@ -39,12 +39,19 @@ if ($LogProfile -eq $null -Or ![System.IO.File]::Exists($LogProfile)) { if ($LogProfile -eq $null) { + Write-Host "`nWSL Log profile is default." $url = "https://raw.githubusercontent.com/microsoft/WSL/master/diagnostics/wsl.wprp" } elseif ($LogProfile -eq "storage") { + Write-Host "`nWSL Log profile is storage." $url = "https://raw.githubusercontent.com/microsoft/WSL/master/diagnostics/wsl_storage.wprp" } + elseif ($LogProfile -eq "hvsocket") + { + Write-Host "`nWSL Log profile is hvsocket." + $url = "https://raw.githubusercontent.com/microsoft/WSL/master/diagnostics/wsl_hvsocket.wprp" + } else { Write-Error "Unknown log profile: $LogProfile" diff --git a/contrib/cirrus/win-collect-wsl-logs-stop.ps1 b/contrib/cirrus/win-collect-wsl-logs-stop.ps1 index be71966f4b9..4f5c7b3a8af 100644 --- a/contrib/cirrus/win-collect-wsl-logs-stop.ps1 +++ b/contrib/cirrus/win-collect-wsl-logs-stop.ps1 @@ -34,12 +34,14 @@ $wprOutputLog = "$folder/wpr.txt" Write-Host "Saving WSL logs..." wpr.exe -stop $folder/logs.etl 2>&1 >> $wprOutputLog -$logArchive = "$(Resolve-Path $folder).zip" -Compress-Archive -Path $folder -DestinationPath $logArchive +$logArchive = "$(Resolve-Path $folder).7z" +Write-Host "Compressing logs with 7z..." +7z.exe a -t7z $logArchive $folder # Use 7-zip because if $folder is larger than 2GB, `Compress-Archive` fails Remove-Item $folder -Recurse $fileName = (Get-Item $logArchive).Name $parentFolder = (Get-Item $logArchive).Directory.Parent.FullName +Write-Host "Moving logs to parent folder..." Move-Item -Path $logArchive -Destination $parentFolder Write-Host -ForegroundColor Green "Logs saved in: ${parentFolder}/${fileName}" diff --git a/contrib/cirrus/win-installer-main.ps1 b/contrib/cirrus/win-installer-main.ps1 index bd921a58998..16acb71466a 100644 --- a/contrib/cirrus/win-installer-main.ps1 +++ b/contrib/cirrus/win-installer-main.ps1 @@ -40,4 +40,4 @@ $command += "-provider $ENV:CONTAINERS_MACHINE_PROVIDER " $command += "-setupExePath `"$WIN_INST_FOLDER\podman-$ENV:WIN_INST_VER-dev-setup.exe`"" $command += "-previousSetupExePath `"$env:PREV_SETUP_EXE_PATH`"" $command += "-nextSetupExePath `"$WIN_INST_FOLDER\podman-$NEXT_WIN_INST_VER-dev-setup.exe`"" -Run-Command "${command}" +Run-Command "${command}" -invokeLogformatter:$true diff --git a/contrib/cirrus/win-lib.ps1 b/contrib/cirrus/win-lib.ps1 index ee9a4196ea7..3159093e780 100644 --- a/contrib/cirrus/win-lib.ps1 +++ b/contrib/cirrus/win-lib.ps1 @@ -56,6 +56,7 @@ function Invoke-Logformatter { $logformatterGeneratedFile = "$logformatterArg.log.html" if (Test-Path $logformatterGeneratedFile) { Move-Item $logformatterGeneratedFile .. -Force + Write-Host "Logformatter generated $logformatterGeneratedFile" } else { Write-Host "Logformatter did not generate the expected file: $logformatterGeneratedFile" } @@ -87,7 +88,10 @@ function Check-Exit { # WARNING: DO NOT use this with powershell builtins! It will not do what you expect! function Run-Command { param ( - [string] $command + [Parameter(Mandatory = $true)] + [string] $command, + [Parameter(Mandatory = $false)] + [switch] $invokeLogformatter = $false ) Write-Host $command @@ -101,7 +105,7 @@ function Run-Command { $exitCode = $LASTEXITCODE - if ($Env:CIRRUS_CI -eq "true") { + if ($Env:CIRRUS_CI -eq "true" -and $invokeLogformatter) { Invoke-Logformatter $unformattedLog } diff --git a/contrib/cirrus/win-podman-machine-test.ps1 b/contrib/cirrus/win-podman-machine-test.ps1 index 72a9949d67b..55d87d4cfc4 100644 --- a/contrib/cirrus/win-podman-machine-test.ps1 +++ b/contrib/cirrus/win-podman-machine-test.ps1 @@ -2,21 +2,23 @@ . $PSScriptRoot\win-lib.ps1 -Write-Host "Recovering env. vars." -Import-CLIXML "$ENV:TEMP\envars.xml" | % { +Write-Host 'Recovering env. vars.' +Import-CLIXML "$ENV:TEMP\envars.xml" | ForEach-Object { Write-Host " $($_.Name) = $($_.Value)" Set-Item "Env:$($_.Name)" "$($_.Value)" } -if ($Env:TEST_FLAVOR -eq "machine-wsl") { +if ($Env:TEST_FLAVOR -eq 'machine-wsl') { # FIXME: Test-modes should be definitively set and positively asserted. # Otherwise if the var. goes out-of-scope, defaults change, or definition # fails: Suddenly assumed behavior != actual behaviorr, esp. if/when only # quickly glancing at a green status check-mark. - $Env:CONTAINERS_MACHINE_PROVIDER = "" # IMPLIES WSL -} elseif ($Env:TEST_FLAVOR -eq "machine-hyperv") { - $Env:CONTAINERS_MACHINE_PROVIDER = "hyperv" -} else { + $Env:CONTAINERS_MACHINE_PROVIDER = '' # IMPLIES WSL +} +elseif ($Env:TEST_FLAVOR -eq 'machine-hyperv') { + $Env:CONTAINERS_MACHINE_PROVIDER = 'hyperv' +} +else { Write-Host "Unsupported value for `$TEST_FLAVOR '$Env:TEST_FLAVOR'" Exit 1 } @@ -27,10 +29,10 @@ Write-Host "`n" # The repo.tar.zst artifact was extracted here Set-Location "$ENV:CIRRUS_WORKING_DIR\repo" # Tests hard-code this location for podman-remote binary, make sure it actually runs. -Run-Command ".\bin\windows\podman.exe --version" +Run-Command '.\bin\windows\podman.exe --version' # Add policy.json to filesystem for podman machine pulls -New-Item -ItemType "directory" -Path "$env:AppData\containers" +New-Item -ItemType 'directory' -Path "$env:AppData\containers" Copy-Item -Path pkg\machine\ocipull\policy.json -Destination "$env:AppData\containers" # Set TMPDIR to fast storage, see cirrus.yml setup_disk_script for setup Z:\ @@ -42,16 +44,40 @@ $Env:TEMP = 'Z:\' Write-Host "`nRunning podman-machine e2e tests" -if ($Env:TEST_FLAVOR -eq "machine-wsl") { +if ($Env:TEST_FLAVOR -eq 'machine-wsl') { + if ($Env:CIRRUS_CI -eq 'true') { + # Add a WSL configuration file + # The `kernelBootTimeout` configuration is to prevent CI/CD flakes + # See + # https://github.com/microsoft/WSL/issues/13301#issuecomment-3367452109 + Write-Host "`nAdding WSL configuration file" + $wslConfigPath = "$env:UserProfile\.wslconfig" + $wslConfigContent = @' +[wsl2] +kernelCommandLine=WSL_DEBUG=hvsocket WSL_SOCKET_LOG=1 +kernelBootTimeout=300000 # 5 minutes +'@ + Set-Content -Path $wslConfigPath -Value $wslConfigContent -Encoding utf8 + wsl --shutdown + Write-Host "`n$wslConfigPath content:" + Get-Content -Path $wslConfigPath + } + # Output info so we know what version we are testing. + Write-Host "`nUpdating WSL version to pre-release:" + (New-Object System.Net.WebClient).DownloadFile("https://wslstorestorage.blob.core.windows.net/wslblob/wsl.2.6.2.2.x64.msi", "wsl.msi") + Start-Process "msiexec.exe" -ArgumentList "/i wsl.msi /quiet" -Wait + Write-Host "`nOutputting WSL version:" wsl --version - Run-Command "$PSScriptRoot\win-collect-wsl-logs-start.ps1" + # Run-Command "$PSScriptRoot\win-collect-wsl-logs-start.ps1" + Run-Command "$PSScriptRoot\win-collect-wsl-logs-start.ps1 -LogProfile hvsocket" } try { - Run-Command ".\winmake localmachine" -} finally { - if ($Env:TEST_FLAVOR -eq "machine-wsl") { + Run-Command '.\winmake localmachine' -invokeLogformatter:$true +} +finally { + if ($Env:TEST_FLAVOR -eq 'machine-wsl') { Run-Command "$PSScriptRoot\win-collect-wsl-logs-stop.ps1" } } diff --git a/contrib/cirrus/win-unit-main.ps1 b/contrib/cirrus/win-unit-main.ps1 index b945f4a1550..e4179f47bf8 100644 --- a/contrib/cirrus/win-unit-main.ps1 +++ b/contrib/cirrus/win-unit-main.ps1 @@ -8,6 +8,6 @@ if ($Env:CI -eq "true") { Push-Location $PSScriptRoot\..\.. } -Run-Command ".\winmake.ps1 localunit" +Run-Command ".\winmake.ps1 localunit" -invokeLogformatter:$true Pop-Location diff --git a/pkg/machine/e2e/machine_test.go b/pkg/machine/e2e/machine_test.go index 0dfb0274c94..ac49e39a297 100644 --- a/pkg/machine/e2e/machine_test.go +++ b/pkg/machine/e2e/machine_test.go @@ -144,6 +144,21 @@ func setup() (string, *machineTestBuilder) { if err := os.Setenv("USERPROFILE", homeDir); err != nil { Fail("unable to set home dir on windows") } + if testProvider.VMType() == define.WSLVirt { + // create file $USERPROFILE/.wslconfig + // https://github.com/microsoft/WSL/issues/13301#issuecomment-3367452109 + wslconfig, err := os.Create(filepath.Join(homeDir, ".wslconfig")) + if err != nil { + Fail(fmt.Sprintf("failed to create wslconfig file: %q", err)) + } + _, err = wslconfig.WriteString("[wsl]\nkernelCommandLine=WSL_DEBUG=hvsocket WSL_SOCKET_LOG=1\nkernelBootTimeout=300000") + if err != nil { + Fail(fmt.Sprintf("failed to write wslconfig file: %q", err)) + } + if err := wslconfig.Close(); err != nil { + Fail(fmt.Sprintf("failed to close wslconfig file: %q", err)) + } + } } if err := os.Setenv("XDG_RUNTIME_DIR", homeDir); err != nil { Fail("failed to set xdg_runtime dir")