#!/bin/bash # Nu-2 --- Operating system for headless production servers. # Copyright © 2024 Dale Mellor # # This file is part of nu-2. # # Nu-2 is free software; you can redistribute it and/or modify it under # the terms of the GNU General Public License as published by the Free # Software Foundation; either version 3 of the License, or (at your # option) any later version. # # Nu-2 is distributed in the hope that it will be useful, but WITHOUT ANY # WARRANTY; without even the implied warranty of MERCHANTABILITY or # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License # for more details. # # You should have received a copy of the GNU General Public License along # with Nu-2. If not, see . if [ "x$1" == "x" ]; then echo "run-emu: provide qcow2 image" else # You might want to tweak the allocated memory (-m) and number of # processor cores (-smp) according to your available hardware. qemu-system-x86_64 \ -netdev bridge,br=emu,id=n \ -device virtio-net,netdev=n,mac=00:00:10:04:00:99 \ -drive if=none,file="$1.qcow2",id=a \ -device virtio-blk,drive=a \ -enable-kvm -m 4G -smp 8 \ -nographic fi