From e3022cf9136eb5a4e73feb0a92fbfc8ceb182c3d Mon Sep 17 00:00:00 2001 From: MacRimi Date: Fri, 2 May 2025 16:54:51 +0200 Subject: [PATCH] Update vm_creator.sh --- scripts/vm/vm_creator.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/scripts/vm/vm_creator.sh b/scripts/vm/vm_creator.sh index ca7928d..36194b8 100644 --- a/scripts/vm/vm_creator.sh +++ b/scripts/vm/vm_creator.sh @@ -184,7 +184,9 @@ function create_vm() { esac if pvesm alloc "$EFI_STORAGE" "$VMID" "$EFI_DISK_NAME$EFI_DISK_EXT" 4M >/dev/null 2>&1; then - if qm set "$VMID" -efidisk0 "$EFI_STORAGE:${EFI_DISK_REF}$EFI_DISK_NAME$EFI_DISK_EXT,pre-enrolled-keys=0" >/dev/null 2>&1; then + EFI_KEYS="0" + [[ "$OS_TYPE" == "2" ]] && EFI_KEYS="1" + if qm set "$VMID" -efidisk0 "$EFI_STORAGE:${EFI_DISK_REF}$EFI_DISK_NAME$EFI_DISK_EXT,pre-enrolled-keys=$EFI_KEYS" >/dev/null 2>&1; then msg_ok "$(translate "EFI disk created and configured on") $EFI_STORAGE" else msg_error "$(translate "Failed to configure EFI disk")"