diff --git a/install.sh b/install.sh index bd23c8d..c0894f3 100644 --- a/install.sh +++ b/install.sh @@ -29,12 +29,15 @@ function cleanup() { TMP=`mktemp -d` pushd $TMP >/dev/null +# Select storage location STORAGE=${1:-local-lvm} pvesm list $STORAGE >& /dev/null || die "'$STORAGE' is not a valid storage ID." pvesm status -content images -storage $STORAGE >&/dev/null || die "'$STORAGE' does not allow 'Disk image' to be stored." STORAGE_TYPE=`pvesm status -storage $STORAGE | awk 'NR>1 {print $2}'` + +# Get the next guest VM/LXC ID VMID=$(cat<&/dev/null qm importdisk $VMID ${FILE%".gz"} $STORAGE ${IMPORT_OPT:-} 1>&/dev/null qm set $VMID -bootdisk sata0 -efidisk0 ${DISK0_REF},size=128K \ -sata0 ${DISK1_REF},size=6G > /dev/null + msg "\n\n\n ******************************** * Completed Successfully *