/!\ Big Merge REBASING

This commit is contained in:
archikid02
2026-01-28 18:08:10 +00:00
parent 4ad36f5cf8
commit 78fd3d03c2
17 changed files with 261 additions and 35 deletions
+36
View File
@@ -0,0 +1,36 @@
#!/bin/bash
set -eux
# from vm to make a shared folder
if [ $# -lt 1 ] ; then
echo """
"""
echo "cheat sheet: mount -t 9p -o trans=virtio hostshare /mnt"
exit 1
fi
# --- Configurable defaults ---
IMG=${1:-disc_alpine.qcow2}
SSH=${2:-2222}
SHARE=${3:-$PWD/shared}
CPUS=${4:-2}
SIZE=${5:-16G}
RAM=${6:-2G}
# --- Setup ---
mkdir -p "$SHARE"
# --- Optional install script ---
# Drop any file named install.sh in ./share to execute it inside the VM later:
# e.g. `bash /mnt/share/install.sh` after mounting
qemu-system-x86_64 \
-m $RAM \
-boot once=d \
-drive file=$IMG \
-enable-kvm \
-display spice-app,show-cursor=on \
-nic user,hostfwd=tcp::"${SSH}"-:22