Skip to content

make-disk-image: Fix overriding kernel modules#1277

Open
AlexLov wants to merge 2 commits into
nix-community:masterfrom
AlexLov:fix-vmTools-overried
Open

make-disk-image: Fix overriding kernel modules#1277
AlexLov wants to merge 2 commits into
nix-community:masterfrom
AlexLov:fix-vmTools-overried

Conversation

@AlexLov

@AlexLov AlexLov commented Jul 6, 2026

Copy link
Copy Markdown

After #530764 PR kernel modules should be passed as kernelModules instead of kernel.

Fixes error:

… while evaluating definitions from `/nix/store/1c1jbpjisa2249vrffd97vmjdflbcprx-source/lib/make-disk-image.nix':

(stack trace truncated; use '--show-trace' to show the full, detailed trace)

error: vmTools: the `kernel` argument (kernel-modules) has no
`target` attribute, so the kernel image filename cannot be determined.

If you are passing a module tree (e.g. from `pkgs.aggregateModules`) to
make extra modules available, pass it via `kernelModules` instead and
keep `kernel` pointing at a real kernel derivation. Alternatively, pass
`kernelImage` explicitly with the path of the bootable image relative
to the `kernel` derivation output (e.g. "bzImage" or "Image").

This should also fixes tests in #1273 PR

After [#530764](NixOS/nixpkgs#530764) PR
kernel modules should be passed as `kernelModules` instead of `kernel`.

Fixes error:
```
… while evaluating definitions from `/nix/store/1c1jbpjisa2249vrffd97vmjdflbcprx-source/lib/make-disk-image.nix':

(stack trace truncated; use '--show-trace' to show the full, detailed trace)

error: vmTools: the `kernel` argument (kernel-modules) has no
`target` attribute, so the kernel image filename cannot be determined.

If you are passing a module tree (e.g. from `pkgs.aggregateModules`) to
make extra modules available, pass it via `kernelModules` instead and
keep `kernel` pointing at a real kernel derivation. Alternatively, pass
`kernelImage` explicitly with the path of the bootable image relative
to the `kernel` derivation output (e.g. "bzImage" or "Image").
```

This should also fixes tests in [nix-community#1273](nix-community#1273) PR
Comment thread lib/make-disk-image.nix
Co-authored-by: Diffumist <git@diffumist.me>
JuneStepp added a commit to JuneStepp/disko that referenced this pull request Jul 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants