DaanHoogland commented on a change in pull request #3638: UEFI Support on
CloudStack
URL: https://github.com/apache/cloudstack/pull/3638#discussion_r391682215
##########
File path:
plugins/hypervisors/kvm/src/main/java/com/cloud/hypervisor/kvm/resource/LibvirtComputingResource.java
##########
@@ -2302,14 +2380,23 @@ public String getVolumePath(final Connect conn, final
DiskTO volume) throws Libv
}
public void createVbd(final Connect conn, final VirtualMachineTO vmSpec,
final String vmName, final LibvirtVMDef vm) throws InternalErrorException,
LibvirtException, URISyntaxException {
+ final Map<String, String> details = vmSpec.getDetails();
final List<DiskTO> disks = Arrays.asList(vmSpec.getDisks());
+ boolean isSecureBoot = false;
+ boolean isWindowsTemplate = false;
Collections.sort(disks, new Comparator<DiskTO>() {
@Override
public int compare(final DiskTO arg0, final DiskTO arg1) {
return arg0.getDiskSeq() > arg1.getDiskSeq() ? 1 : -1;
}
});
+ if (MapUtils.isNotEmpty(details) &&
details.containsKey(GuestDef.BootType.UEFI.toString())) {
+ isSecureBoot =
isSecureMode(details.get(GuestDef.BootType.UEFI.toString()));
+ }
+ if (vmSpec.getOs().toLowerCase().contains("window")) {
+ isWindowsTemplate =true;
+ }
Review comment:
please extract, see above
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services