update vm_storage_helpers.sh

This commit is contained in:
MacRimi
2026-04-06 19:13:31 +02:00
parent c5b01b4bb7
commit d7c04ebbc7
8 changed files with 97 additions and 22 deletions

View File

@@ -469,13 +469,19 @@ fi
fi
if [[ ${#CONTROLLER_NVME_PCIS[@]} -gt 0 ]]; then
local CONTROLLER_CAN_STAGE=true
if declare -F _pci_is_iommu_active >/dev/null 2>&1 && ! _pci_is_iommu_active; then
if [[ "${VM_STORAGE_IOMMU_PENDING_REBOOT:-0}" == "1" ]]; then
msg_warn "$(translate "IOMMU was configured during this wizard and a reboot is pending.")"
msg_warn "$(translate "Controller + NVMe assignment is postponed until after host reboot.")"
msg_warn "$(translate "Controller + NVMe assignment will be written now and become active after host reboot.")"
else
msg_error "$(translate "IOMMU is not active. Skipping Controller + NVMe assignment.")"
CONTROLLER_CAN_STAGE=false
fi
fi
if [[ "$CONTROLLER_CAN_STAGE" != "true" ]]; then
:
elif ! _vm_is_q35 "$VMID"; then
msg_error "$(translate "Controller + NVMe passthrough requires machine type q35. Skipping controller assignment.")"
else
@@ -766,7 +772,6 @@ if [[ "${WIZARD_ADD_GPU:-no}" == "yes" ]]; then
if [[ "${VM_STORAGE_IOMMU_PENDING_REBOOT:-0}" == "1" ]]; then
HOST_REBOOT_REQUIRED="yes"
msg_warn "$(translate "IOMMU was enabled during this wizard. Reboot the host to apply it.")"
echo -e "${TAB}$(translate "After reboot, run: Storage -> Add Controller or NVMe PCIe to VM, and select VM") ${VMID}."
fi
if [[ "$GPU_WIZARD_REBOOT_REQUIRED" == "yes" ]]; then
HOST_REBOOT_REQUIRED="yes"
@@ -804,7 +809,6 @@ fi
if [[ "${VM_STORAGE_IOMMU_PENDING_REBOOT:-0}" == "1" ]]; then
msg_warn "$(translate "IOMMU was enabled during this wizard. Reboot the host to apply it.")"
echo -e "${TAB}$(translate "After reboot, run: Storage -> Add Controller or NVMe PCIe to VM, and select VM") ${VMID}."
fi
msg_success "$(translate "Press Enter to return to the main menu...")"