From 388240c3a4699cc7e933116dc8f6e6338333e534 Mon Sep 17 00:00:00 2001 From: Denis Kvist Date: Wed, 18 Dec 2024 15:13:41 +0300 Subject: [PATCH] For headless VMs, DisplayType does not need to be checked. Otherwise, we will have problems while creating clones. Signed-off-by: Denis Kvist --- .../src/main/java/org/ovirt/engine/core/bll/VmHandler.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/VmHandler.java b/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/VmHandler.java index e550bdcc579..17a99f23263 100644 --- a/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/VmHandler.java +++ b/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/VmHandler.java @@ -801,6 +801,10 @@ public ValidationResult isOsTypeSupported(int osId, ArchitectureType architectur */ public ValidationResult isGraphicsAndDisplaySupported (int osId, Collection graphics, DisplayType displayType, BiosType biosType, Version clusterVersion) { + // When we have no any display for vm then we don't have to check compatibility of display-graphics for selected OS + if (displayType == DisplayType.none) { + return ValidationResult.VALID; + } if (!vmValidationUtils.isGraphicsAndDisplaySupported(osId, clusterVersion, graphics, displayType)) { return new ValidationResult( EngineMessage.ACTION_TYPE_FAILED_ILLEGAL_VM_DISPLAY_TYPE_IS_NOT_SUPPORTED_BY_OS);