minor fix on VMID cleanup and install git-lfs
This commit is contained in:
parent
f73104862e
commit
5db6405b19
@ -35,8 +35,8 @@ IMG_NAME="${LOCAL_IMG_DIR}/debian-${DEBIAN_VERSION}-generic-amd64-${LATEST_IMG}.
|
|||||||
|
|
||||||
# Check if Git LFS is installed
|
# Check if Git LFS is installed
|
||||||
if ! which git-lfs > /dev/null; then
|
if ! which git-lfs > /dev/null; then
|
||||||
echo "git-lfs not found. Please install git-lfs and try again."
|
apt-get update
|
||||||
exit 1
|
apt-get install -y git-lfs
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Pull the specific image file from Git LFS if it exists in the repository
|
# 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"
|
NET_BRIDGE="vmbr0"
|
||||||
|
|
||||||
# Create the VM and configure its settings
|
# 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 create $VMID --name $TEMPL_NAME --memory $MEM --net0 virtio,bridge=$NET_BRIDGE
|
||||||
qm importdisk $VMID $IMG_NAME $DISK_STOR
|
qm importdisk $VMID $IMG_NAME $DISK_STOR
|
||||||
qm set $VMID --scsihw virtio-scsi-pci --scsi0 $DISK_STOR:vm-$VMID-disk-0
|
qm set $VMID --scsihw virtio-scsi-pci --scsi0 $DISK_STOR:vm-$VMID-disk-0
|
||||||
|
BIN
images/debian-12-generic-amd64-20240507-1740.qcow2
(Stored with Git LFS)
BIN
images/debian-12-generic-amd64-20240507-1740.qcow2
(Stored with Git LFS)
Binary file not shown.
Loading…
Reference in New Issue
Block a user