home

My NixOS systems configurations.
Log | Files | Refs | LICENSE

create-vm.sh (391B)


      1 #!/usr/bin/env bash
      2 set -euo pipefail
      3 
      4 out=$(git rev-parse --show-toplevel)/qemu
      5 
      6 mkdir -p $out
      7 diskImage=$out/nixos-test.qcow2
      8 qemu-img create -f qcow2 $diskImage 20G
      9 qemu-system-x86_64 \
     10     -enable-kvm \
     11     -m 2048 \
     12     -nic user,model=virtio \
     13     -drive file=$diskImage,media=disk,if=virtio \
     14     -cdrom ~/desktop/isos/nixos-minimal-20.03.1445.95b9c99f6d0-x86_64-linux.iso \
     15     -sdl