diff --git a/install.sh b/install.sh index 340b848..8f2ca03 100644 --- a/install.sh +++ b/install.sh @@ -3,14 +3,14 @@ set -e # Exit on any error set +x # Disable command echoing, remove if you want to see commands -# Variables (You can change these as needed) +# Default Variables (Can be overridden with command-line arguments) IMG_URL="https://cloud-images.ubuntu.com/noble/current/noble-server-cloudimg-amd64.img" IMG_NAME="noble-server-cloudimg-amd64.img" VM_ID=8000 VM_NAME="ubuntu-cloud" MEMORY=2048 CORES=2 -STORAGE="local" +STORAGE=${1:-proxmox} # Default to "proxmox", can be overridden by passing an argument CLONE_ID=135 CLONE_NAME="yoshi" @@ -33,7 +33,7 @@ qm create $VM_ID --memory $MEMORY --core $CORES --name $VM_NAME --net0 virtio,br check_command "Creating virtual machine" # Step 3: Import the downloaded Ubuntu disk to local storage -echo "Importing the downloaded Ubuntu disk to local storage..." +echo "Importing the downloaded Ubuntu disk to storage ($STORAGE)..." qm disk import $VM_ID $IMG_NAME $STORAGE check_command "Importing disk to storage"