Open ashraffouda opened 1 year ago
hmm, will have to investigate that deeper I guess. what kind of bootloader are you using? I'm not sure where the initrd is coming from in your example? is it not needed?
i'm using this https://github.com/cloud-hypervisor/cloud-hypervisor/ to boot the image now I'm kinda did a work around to boot it, I made efi enabled qcow image then converted it to raw and it works that way
btw, I added a qcow-efi to make this work for me, should I add a pr here? or it is not needed?
we can add that for now, It would also be nice to find out why raw does not work :)
at some point in the far future I would like to refactor the nixpkgs images to do more of the abstraction which is currently done in this repo
d that for now, It would also be nice to find out why raw does not work :
will try to find out why, but was kinda in hurry to make something work for us
The image is missing the following kernel modules I believe:
boot.initrd.kernelModules = [
"virtio_blk"
"virtio_pmem"
"virtio_console"
"virtio_pci"
"virtio_mmio"
];
Probably some of them are not needed all the time, but I believe virtio_pci
is the critical one in this context.
(I succeeded into booting a raw-efi image with this adjustement.)
I was trying to build a raw-efi image using nixos-generators, and when I tried to boot it using cloud-hyvervisor it always giving this error and I have no clue what to do to make it bootable built it like this
NIX_PATH=nixpkgs=channel:nixos-22.05 nix-shell -p nixos-generators --run "nixos-generate --format raw-efi -o result"
and booted it with cloud-hypervisorcloud-hypervisor --kernel ./hypervisor-fw --disk path=nixos.img --cpus boot=4 --memory size=1024M --console off --serial tty --cmdline "boot.debug1 debug1"