add storage nfs

This commit is contained in:
patriciocl 2021-06-21 20:00:53 -04:00
parent e6a79f67aa
commit 68da81452a

View File

@ -119,11 +119,16 @@ esac
# Create variables for container disk # Create variables for container disk
STORAGE_TYPE=$(pvesm status -storage $STORAGE | awk 'NR>1 {print $2}') STORAGE_TYPE=$(pvesm status -storage $STORAGE | awk 'NR>1 {print $2}')
if [ "$STORAGE_TYPE" = "dir" ]; then msg "Extracting disk image..."
case $STORAGE_TYPE in
nfs|dir)
DISK_EXT=".qcow2" DISK_EXT=".qcow2"
DISK_REF="$VMID/" DISK_REF="$VMID/"
IMPORT_OPT="-format qcow2" IMPORT_OPT="-format qcow2"
fi ;;
*) echo "next"
;;
esac
for i in {0,1}; do for i in {0,1}; do
disk="DISK$i" disk="DISK$i"
eval DISK${i}=vm-${VMID}-disk-${i}${DISK_EXT:-} eval DISK${i}=vm-${VMID}-disk-${i}${DISK_EXT:-}