diff --git a/backend/install.sh b/backend/install.sh index 18a0492..eff5610 100755 --- a/backend/install.sh +++ b/backend/install.sh @@ -48,6 +48,10 @@ if ! command -v git &>/dev/null; then echo " Installing git..." apt-get update -qq && apt-get install -y -qq git fi +if ! command -v qemu-img &>/dev/null; then + echo " ${RED}✗${NC} 'qemu-img' not found — Proxmox ships this. Do NOT install qemu-utils (conflicts with Proxmox)." + exit 1 +fi echo " ${GREEN}✓${NC} Running on Proxmox host." # ─────────────────────────────────────────────────────────────────── @@ -105,11 +109,10 @@ PACKAGES=() REQUIRED=( python3 "python3" python3-pip "pip3" - qemu-utils "qemu-img" libguestfs-tools "guestfish" p7zip-full "7z" unzip "unzip" - unrar-free "unrar" + unrar-free "unrar" tar "tar" gzip "gunzip" bzip2 "bunzip2" @@ -216,6 +219,23 @@ CT_MAC="${CT_MAC:-BC:24:11:80:5A:B1}" NET_CFG="name=eth0,bridge=${CT_BRIDGE},firewall=1,gw=${CT_GW},hwaddr=${CT_MAC},ip=${CT_IP},type=veth" ROOTFS="local-lvm:vm-${CTID}-disk-0,size=24G" +# ── Storage path ────────────────────────────────────────────────── +echo "" +echo " ${CYAN}Storage mount:${NC}" +echo " Path on the Proxmox host where VM Bench stores its data." +echo " The LXC will see this as /mnt/converter internally." +read -p " Host storage path [/mnt/pve/hosted-thin]: " STORAGE_PATH +STORAGE_PATH="${STORAGE_PATH:-/mnt/pve/hosted-thin}" + +# Remove trailing slash +STORAGE_PATH="${STORAGE_PATH%/}" + +# Create the directory on the host if it doesn't exist +if [ ! -d "$STORAGE_PATH" ]; then + echo " Creating: $STORAGE_PATH" + mkdir -p "$STORAGE_PATH" +fi + # ── Template selection ──────────────────────────────────────────── echo "" echo " ${CYAN}Available Debian templates:${NC}" @@ -260,7 +280,7 @@ pct create "$CTID" "$TEMPLATE" \ --swap 2048 \ --unprivileged 0 \ --features nesting=1 \ - --mp0 /mnt/converter,mp=/mnt/converter \ + --mp0 ${STORAGE_PATH},mp=/mnt/converter \ --onboot 1 \ --start 0