minor fix on VMID cleanup and install git-lfs

This commit is contained in:
root 2024-06-22 22:25:51 -07:00
parent f73104862e
commit 5db6405b19
2 changed files with 4 additions and 3 deletions

View File

@ -35,8 +35,8 @@ IMG_NAME="${LOCAL_IMG_DIR}/debian-${DEBIAN_VERSION}-generic-amd64-${LATEST_IMG}.
# Check if Git LFS is installed
if ! which git-lfs > /dev/null; then
echo "git-lfs not found. Please install git-lfs and try again."
exit 1
apt-get update
apt-get install -y git-lfs
fi
# Pull the specific image file from Git LFS if it exists in the repository
@ -73,6 +73,7 @@ DISK_STOR="local-lvm"
NET_BRIDGE="vmbr0"
# Create the VM and configure its settings
qm destroy $VMID || true
qm create $VMID --name $TEMPL_NAME --memory $MEM --net0 virtio,bridge=$NET_BRIDGE
qm importdisk $VMID $IMG_NAME $DISK_STOR
qm set $VMID --scsihw virtio-scsi-pci --scsi0 $DISK_STOR:vm-$VMID-disk-0

Binary file not shown.