elitak/nixos-infect

Build failure on aarch64 due to missing module vmw_pvscsi

deejayem opened this issue · 6 comments

Running nixos-infect on an Ampere instance on Oracle Cloud (Ubuntu 22.04), I get this error:

building '/nix/store/xa5k8n6zy9za0canz5b0ffhnm1nayi2f-linux-5.15.77-modules-shrunk.drv'...
kernel version is 5.15.77
root module: virtio_net
  builtin dependency: virtio_net
root module: virtio_pci
  builtin dependency: virtio_pci
root module: virtio_mmio
  builtin dependency: virtio_mmio
root module: virtio_blk
  builtin dependency: virtio_blk
root module: virtio_scsi
  copying dependency: /nix/store/nql345d4xxv4kcgg9qv0g8z65346jv9a-linux-5.15.77-modules/lib/modules/5.15.77/kernel/drivers/scsi/virtio_scsi.ko.xz
root module: 9p
  builtin dependency: 9p
root module: 9pnet_virtio
  builtin dependency: 9pnet_virtio
root module: ata_piix
  copying dependency: /nix/store/nql345d4xxv4kcgg9qv0g8z65346jv9a-linux-5.15.77-modules/lib/modules/5.15.77/kernel/drivers/ata/ata_piix.ko.xz
root module: uhci_hcd
  builtin dependency: ehci_pci
  copying dependency: /nix/store/nql345d4xxv4kcgg9qv0g8z65346jv9a-linux-5.15.77-modules/lib/modules/5.15.77/kernel/drivers/usb/host/uhci-hcd.ko.xz
root module: vmw_pvscsi
modprobe: FATAL: Module vmw_pvscsi not found in directory /nix/store/nql345d4xxv4kcgg9qv0g8z65346jv9a-linux-5.15.77-modules/lib/modules/5.15.77
error: builder for '/nix/store/xa5k8n6zy9za0canz5b0ffhnm1nayi2f-linux-5.15.77-modules-shrunk.drv' failed with exit code 1
error: 1 dependencies of derivation '/nix/store/ijx2aa13r24wrln9ycavdnvyc9vry0kc-stage-1-init.sh.drv' failed to build
error: 1 dependencies of derivation '/nix/store/j0iq3cspwck28qav6r015rdwi1651j9i-initrd-linux-5.15.77.drv' failed to build
building '/nix/store/w8kr4nakaxdc37z2lrcglxgwn05jwjza-localhost-hosts.drv'...
error: 1 dependencies of derivation '/nix/store/wbz9y2ldjyynsaplqp60d6ir8z0sh8b9-nixos-system-djmuk2-22.05.4033.ebf65554b18.drv' failed to build

Initially I thought it was caused by #115 but I got the same error using an older version of nixos-infect, and also when manually removing the reference to vmw_pvscsi from the latest version.
This is caused by the mentioned issue - I was still using the hardware configuration generated by the first run.

I tried nixos-unstable, nixos-22.05 and nixos-22.11 channels, and get the same error one all three.

It seems vmw_pvscsi is missing in linux-5.15.77. I pinned the kernel to 5.10.x and it started working. This is not a real solution, but a step in the right direction. I added the followin line to my configuration.nix:

boot.kernelPackages = pkgs.linuxPackages_5_10;

And added pkgs into the arguments list on line 1, replacing: { ... }: { with { pkgs, ... }: {.

Follow up. After rebooting I was able to remove the added lines and I could rebuild nixos with linux-5.15.77 without issues.. I will test some more to see if I bump into any issues. (I need to resize my boot partition first, it seems Oracle defaults it to 100mb)

I realised I made a mistake in my initial investigations - when I tried different versions of nixos-infect, it was just re-using the version of hardware-configuration.nix created the first time. After I added that, I was able to successfully run a modified version nixos-infect.

@johan-adriaans is that on aarch64? I'm currently working on the assumption that vmw_pvscsi is working on at least some architectures.

@deejayem Yes, I started out with the following image: Canonical-Ubuntu-20.04-aarch64-2022.08.15-0

I have reinstalled my instances to double check, and it seems I too was confused with the /etc/nixos persistance. I did the same thing again and now it does not work as before. I did try some other things before that, so I will retrace what I did and report back later.

I am confused. I could swear I had the vmw_pvscsi module in my /etc config. But, after some research my previous fix does not work, but pulling in your pull request 118 worked for me! So thanks! :)