summaryrefslogtreecommitdiff
path: root/.local/bin/livevm
diff options
context:
space:
mode:
Diffstat (limited to '.local/bin/livevm')
-rwxr-xr-x.local/bin/livevm6
1 files changed, 4 insertions, 2 deletions
diff --git a/.local/bin/livevm b/.local/bin/livevm
index 838977a..f52b45c 100755
--- a/.local/bin/livevm
+++ b/.local/bin/livevm
@@ -5,7 +5,8 @@ storage="${data_dir}/livevm.qcow2"
# allocate half of available memory and cores to vm
mem="$(($(grep MemAvailable /proc/meminfo | grep -o '[0-9]*')/2))"
cores="$(($(nproc)/2))"
-cmd="qemu-system-x86_64 -boot menu=on -enable-kvm -device intel-hda -device hda-duplex -m ${mem}k -cpu host -smp $cores -drive file=$storage"
+cmd="qemu-system-x86_64 -boot menu=on -enable-kvm -device intel-hda \
+ -device hda-duplex -m ${mem}k -cpu host -smp $cores -drive file=$storage"
[ ! -d "${data_dir}" ] &&
mkdir -p "${data_dir}"
@@ -66,7 +67,8 @@ do
exit
;;
?)
- printf "%s\n" "usage: ${0##*/} [ -weh ] [ -c cdrom ] [ -d drive ]" 1>&2
+ printf "%s%s\n" "usage: ${0##*/} [ -weh ] [ -c cdrom ] [ -d drive ]" \
+ "[ -u host_bus/host_addr ] [ -q img.qcow2 ] [ -r img.raw ]" 1>&2
exit 1
;;
esac