From 5db6405b1901d9224de7cf9f20c3c82e52611312 Mon Sep 17 00:00:00 2001 From: root Date: Sat, 22 Jun 2024 22:25:51 -0700 Subject: [PATCH] minor fix on VMID cleanup and install git-lfs --- cloud-init.sh | 5 +++-- images/debian-12-generic-amd64-20240507-1740.qcow2 | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/cloud-init.sh b/cloud-init.sh index 2ec6291..c88e050 100755 --- a/cloud-init.sh +++ b/cloud-init.sh @@ -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 diff --git a/images/debian-12-generic-amd64-20240507-1740.qcow2 b/images/debian-12-generic-amd64-20240507-1740.qcow2 index 67b63e9..47bfcf2 100644 --- a/images/debian-12-generic-amd64-20240507-1740.qcow2 +++ b/images/debian-12-generic-amd64-20240507-1740.qcow2 @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:f4b8a20e4503bfc9e7c3b2862cceeb5d5a4b6470b3dadc893b63d63886e55687 +oid sha256:e14a9553866a1b0a2c6ffd6d2373e1b6494fe22007cb6272085cf131df29d980 size 697303040