From 86517923bfe2e6370297cf25a9cbbb3de46d0a2e Mon Sep 17 00:00:00 2001 From: Maksim An Date: Wed, 2 Jul 2025 10:16:58 -0700 Subject: [PATCH 1/3] lcow: disable virtio-vsock init (#2461) When a kernel is built with virtio-vsock we encounter a kernel panic in our init script, while trying to read entropy from the host. Parsing through the boot logs, it seems like the hv_sock transport is not being initialized: ``` [ 0.712310] NET: Registered PF_VSOCK protocol family [ 0.716225] hv_vmbus: registering driver hv_sock [ 0.719551] hv_vmbus: unregistering driver hv_sock [ 0.723281] IPI shorthand broadcast: enabled ``` Disabling `virtio_vsock_init` seems to fix the problem: ``` [ 0.829397] NET: Registered PF_VSOCK protocol family [ 0.831728] initcall virtio_vsock_init blacklisted [ 0.835999] hv_vmbus: registering driver hv_sock [ 0.837906] IPI shorthand broadcast: enabled ``` For kernels built without virtio-vsock, skipping `virtio_vsock_init` is a no-op: ``` [ 0.539320] NET: Registered PF_VSOCK protocol family [ 0.541417] hv_vmbus: registering driver hv_sock [ 0.549999] IPI shorthand broadcast: enabled ``` Signed-off-by: Maksim An (cherry picked from commit 914512d9db1f87fb212f72767fdd3eb8abb7f85f) --- internal/uvm/create_lcow.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/internal/uvm/create_lcow.go b/internal/uvm/create_lcow.go index 1f310f8d60..1ab71e4e73 100644 --- a/internal/uvm/create_lcow.go +++ b/internal/uvm/create_lcow.go @@ -795,6 +795,10 @@ func makeLCOWDoc(ctx context.Context, opts *OptionsLCOW, uvm *UtilityVM) (_ *hcs } } + // Explicitly disable virtio_vsock_init, to make sure that we use hv_sock transport. For kernels built without + // virtio-vsock this is a no-op. + kernelArgs += " initcall_blacklist=virtio_vsock_init" + vmDebugging := false if opts.ConsolePipe != "" { vmDebugging = true From e00a172f0fdd1ee4043ff67b60a981929c428b6a Mon Sep 17 00:00:00 2001 From: Maksim An Date: Thu, 10 Jul 2025 12:01:04 -0700 Subject: [PATCH 2/3] log `mkfs.ext4` stderr output (#2474) Log the stderr output when `mkfs.ext4` fails during scratch formatting. This should help troubleshooting easier, e.g. when the binary is missing or not properly symlinked etc. Signed-off-by: Maksim An (cherry picked from commit 1c0e46403dc04e0a1ffa4cc85cdd745992d256f3) --- internal/lcow/scratch.go | 1 + 1 file changed, 1 insertion(+) diff --git a/internal/lcow/scratch.go b/internal/lcow/scratch.go index e44a6b388a..65ffc4a13c 100644 --- a/internal/lcow/scratch.go +++ b/internal/lcow/scratch.go @@ -105,6 +105,7 @@ func CreateScratch(ctx context.Context, lcowUVM *uvm.UtilityVM, destFile string, err = cmd.Run() cancel() if err != nil { + log.G(ctx).WithError(err).WithField("stderr", mkfsStderr.String()).Error("mkfs.ext4 failed") return fmt.Errorf("failed to `%+v` following hot-add %s to utility VM: %w", cmd.Spec.Args, destFile, err) } From 6f9af877d415114df552dd0e60cd1ce2a9f9cbdf Mon Sep 17 00:00:00 2001 From: Maksim An Date: Wed, 30 Jul 2025 17:59:10 -0700 Subject: [PATCH 3/3] remove WS2019 runner Signed-off-by: Maksim An --- .github/workflows/ci.yml | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 6a3d4b4555..75e95ad9f4 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -273,10 +273,8 @@ jobs: fail-fast: false matrix: name: - [windows-2022, windows-2019] + [windows-2022] include: - - name: "windows-2019" - runner: [self-hosted, 1ES.Pool=containerplat-github-runner-pool-east-us-2, 1ES.ImageOverride=github-mms-ws2019-containers-enabled] - name: "windows-2022" runner: [self-hosted, 1ES.Pool=containerplat-github-runner-pool-east-us-2, 1ES.ImageOverride=github-mms-ws2022-containers-enabled] steps: @@ -404,7 +402,7 @@ jobs: strategy: fail-fast: false matrix: - os: [windows-2019, windows-2022] + os: [windows-2022] steps: - name: Checkout hcsshim