From b7b988bc7570d1364302e9f50852c8cdb4f48767 Mon Sep 17 00:00:00 2001 From: "CanbiZ (MickLesk)" <47820557+MickLesk@users.noreply.github.com> Date: Tue, 3 Feb 2026 12:17:01 +0100 Subject: [PATCH] Remove duplicate qm set; show Cloud-Init output Collapse duplicated qm set invocation into a single call when attaching the EFI and root disk, removing the duplicate conditional block. Also stop redirecting setup_cloud_init output (remove >/dev/null 2>&1) so Cloud-Init setup logs and errors are visible for debugging. Note: the previous conditional added a --scsi1 "${STORAGE}:cloudinit" only when USE_CLOUD_INIT=yes; that explicit scsi1 assignment is no longer present in this unified call. --- vm/docker-vm.sh | 21 ++++++--------------- 1 file changed, 6 insertions(+), 15 deletions(-) diff --git a/vm/docker-vm.sh b/vm/docker-vm.sh index 0eb69a4b4..b8f9ae408 100644 --- a/vm/docker-vm.sh +++ b/vm/docker-vm.sh @@ -622,20 +622,11 @@ rm -f "$WORK_FILE" # ============================================================================== msg_info "Attaching EFI and root disk" -if [ "$USE_CLOUD_INIT" = "yes" ]; then - qm set "$VMID" \ - --efidisk0 "${STORAGE}:0,efitype=4m" \ - --scsi0 "${DISK_REF_IMPORTED},${DISK_CACHE}${THIN%,}" \ - --scsi1 "${STORAGE}:cloudinit" \ - --boot order=scsi0 \ - --serial0 socket >/dev/null -else - qm set "$VMID" \ - --efidisk0 "${STORAGE}:0,efitype=4m" \ - --scsi0 "${DISK_REF_IMPORTED},${DISK_CACHE}${THIN%,}" \ - --boot order=scsi0 \ - --serial0 socket >/dev/null -fi +qm set "$VMID" \ + --efidisk0 "${STORAGE}:0,efitype=4m" \ + --scsi0 "${DISK_REF_IMPORTED},${DISK_CACHE}${THIN%,}" \ + --boot order=scsi0 \ + --serial0 socket >/dev/null qm set $VMID --agent enabled=1 >/dev/null @@ -647,7 +638,7 @@ set_description # Cloud-Init configuration if [ "$USE_CLOUD_INIT" = "yes" ]; then msg_info "Configuring Cloud-Init" - setup_cloud_init "$VMID" "$STORAGE" "$HN" "yes" >/dev/null 2>&1 + setup_cloud_init "$VMID" "$STORAGE" "$HN" "yes" msg_ok "Cloud-Init configured" fi