pavanaravapalli commented on code in PR #11750:
URL: https://github.com/apache/cloudstack/pull/11750#discussion_r2441765474
##########
plugins/hypervisors/kvm/src/main/java/com/cloud/hypervisor/kvm/resource/LibvirtComputingResource.java:
##########
@@ -3010,6 +3009,44 @@ public static DiskDef.DiskType
getDiskType(KVMPhysicalDisk physicalDisk) {
return useBLOCKDiskType(physicalDisk) ? DiskDef.DiskType.BLOCK :
DiskDef.DiskType.FILE;
}
+ /**
+ * Defines the disk configuration for the default pool type based on the
provided parameters.
+ * It determines the appropriate disk settings depending on whether the
disk is a data disk, whether
+ * it's a Windows template, whether UEFI is enabled, and whether secure
boot is active.
+ *
+ * @param disk The disk definition object that will be configured with the
disk settings.
+ * @param volume The volume (disk) object, containing information about
the type of disk.
+ * @param isWindowsTemplate Flag indicating whether the template is a
Windows template.
+ * @param isUefiEnabled Flag indicating whether UEFI is enabled.
+ * @param isSecureBoot Flag indicating whether secure boot is enabled.
+ * @param physicalDisk The physical disk object that contains the path to
the disk.
+ * @param devId The device ID for the disk.
+ * @param diskBusType The disk bus type to use if not skipping force disk
controller.
+ * @param diskBusTypeData The disk bus type to use for data disks, if
applicable.
+ * @param details A map of VM details containing additional configuration
values, such as whether to skip force
+ * disk controller.
+ */
+ protected void defineDiskForDefaultPoolType(DiskDef disk, DiskTO volume,
boolean isWindowsTemplate,
+ boolean isUefiEnabled, boolean isSecureBoot,
KVMPhysicalDisk physicalDisk, int devId,
+ DiskDef.DiskBus diskBusType, DiskDef.DiskBus
diskBusTypeData, Map<String, String> details) {
+ boolean skipForceDiskController = MapUtils.getBoolean(details,
VmDetailConstants.KVM_SKIP_FORCE_DISK_CONTROLLER,
+ false);
+ if (skipForceDiskController) {
Review Comment:
@shwstppr
This condition forces the root disk controller to use its configured
settings instead of the UEFI workflow settings, even when the VM is deployed
with UEFI and this setting "skip.force.disk.controller" is enabled.
Consequently, a UEFI-deployed VM may fail to boot because some guest operating
systems still depend on SATA disk. Please include a comment or a note
detailing the change in behavior."
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]