You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm using nixosGenerate in a flake. Given a minimal example as such:
mkVmImage = modules:
nixos-generators.nixosGenerate {
modules = modules;
system = "...";
format = "vm-nogui";
};
This appears to always produce a run script and guest kernel/initrd for the same architecture. I.e. if system is x86_64-linux, the resulting executable bash script (something like run-nixos-vm) will be built to run on an x86_64-linux host and emulate an x86_64-linux guest VM, likewise for aarch64-linux. In my use case, I would like to have a runner script that runs on x86_64-linux, which emulates an aarch64-linux guest machine. Is it possible to achieve this using format = "vm-nogui"?
I'm guessing my best option would be to generate an aarch64-linux image in a qcow2 format, and make my own script to emulate it with qemu-system-aarch64, however I just wanted to check.
Thank you for the help! I apologize if this is a naive question.
The text was updated successfully, but these errors were encountered:
Title sums it up.
I'm using nixosGenerate in a flake. Given a minimal example as such:
This appears to always produce a run script and guest kernel/initrd for the same architecture. I.e. if
system
isx86_64-linux
, the resulting executable bash script (something likerun-nixos-vm
) will be built to run on anx86_64-linux
host and emulate anx86_64-linux
guest VM, likewise foraarch64-linux
. In my use case, I would like to have a runner script that runs onx86_64-linux
, which emulates anaarch64-linux
guest machine. Is it possible to achieve this usingformat = "vm-nogui"
?I'm guessing my best option would be to generate an
aarch64-linux
image in a qcow2 format, and make my own script to emulate it withqemu-system-aarch64
, however I just wanted to check.Thank you for the help! I apologize if this is a naive question.
The text was updated successfully, but these errors were encountered: