3 ms·
how do you do this and what do you use? do you just manually trigger qemu? I'd love to be able to boot VM with different nix configurations.
by woile 1y ago
how do you do this and what do you use? do you just manually trigger qemu? I'd love to be able to boot VM with different nix configurations.
- bjackman 1y agoUsually I just use `nix run .#nixosConfigurations.<my config>.config.system.build.vm` This boots directly into the kernel with QEMU's '-kernel' option, and it mounts the host Nix store into the guest via Plan 9 FS. So there is some significant difference vs a full system, e.g. it's not possible to nixos-rebuild the VM. But if you're just testing high-level stuff it's totally fine. Then there's also a .vmWithBootloader variant which behaves a bit more like a physical machine, IIUC it builds a disk image and boots it via Nixos' actual bootloader.