From ef2d74a62b1e9a0691594e2194c135c14aa2eb67 Mon Sep 17 00:00:00 2001 From: root Date: Sat, 25 Jul 2026 11:23:26 +0000 Subject: [PATCH] fix: remove qemu-utils from installer + configurable storage path MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 1. Removed qemu-utils from required packages — Proxmox ships its own qemu-img and installing Debian's version breaks VMs. Added preflight check: if qemu-img missing, exits with clear error message. 2. Installer now prompts for host storage path (default: /mnt/pve/hosted-thin). Uses it for the LXC bind mount mp0. The LXC always sees /mnt/converter internally — no symlinks needed. --- backend/install.sh | 26 +++++++++++++++++++++++--- 1 file changed, 23 insertions(+), 3 deletions(-) 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