pavanaravapalli commented on a change in pull request #3638: UEFI Support on 
CloudStack
URL: https://github.com/apache/cloudstack/pull/3638#discussion_r395248492
 
 

 ##########
 File path: 
plugins/hypervisors/kvm/src/main/java/com/cloud/hypervisor/kvm/resource/LibvirtComputingResource.java
 ##########
 @@ -2125,11 +2167,44 @@ public LibvirtVMDef createVMFromSpec(final 
VirtualMachineTO vmTO) {
         }
         guest.setGuestArch(_guestCpuArch != null ? _guestCpuArch : 
vmTO.getArch());
         guest.setMachineType(_guestCpuArch != null && 
_guestCpuArch.equals("aarch64") ? "virt" : "pc");
+        guest.setBootType(GuestDef.BootType.BIOS);
+        if (MapUtils.isNotEmpty(customParams) && 
customParams.containsKey(GuestDef.BootType.UEFI.toString())) {
+            guest.setBootType(GuestDef.BootType.UEFI);
+            guest.setBootMode(GuestDef.BootMode.LEGACY);
+            if 
(StringUtils.isNotBlank(customParams.get(GuestDef.BootType.UEFI.toString())) && 
"secure".equalsIgnoreCase(customParams.get(GuestDef.BootType.UEFI.toString()))) 
{
+                guest.setMachineType("q35");
 
 Review comment:
   @rhtyd 
   
   UEFI Secure boot does not work with default libvirt xml changes and "**pc**" 
as machine type. It's confirmed by doing a POC and verified the same. 
   
   There are few other mandatory changes to be handled in case of secure boot 
guest xml, the same have been captured in the design doc. please have a look in 
the wiki doc shared with this PR description. 
   
    
   

----------------------------------------------------------------
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:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to