mirror of Team/StarlightOS at forge.starlightnet.work
at main 26 lines 723 B view raw view rendered
1# Build and VM testing Guide 2 3> This assumes you have both `nix` installed as well as flakes 4> enabled. We use the `nixos` CLI internally, but you can use 5> the default `nixos-rebuild` CLI too. 6 7The installer can be built using either of those commands: 8 9```sh 10nixos apply .#installer --vm --output result 11# or 12nixos-rebuild build-vm --flake .#installer 13``` 14 15You can then run the VM like this: 16 17```sh 18# create a qcow2 disk image first 19# note: running this command again will overwrite your virtual disk 20qemu-img create -f qcow root.qcow2 20G 21 22# run the VM with QEMU 23QEMU_KERNEL_PARAMS=console=ttyS0 QEMU_OPTS="-hdd $PWD/root.qcow2" ./result/bin/run-slos-vm -nographic 24``` 25 26You should then have it booting in your terminal.