rhtyd commented on a change in pull request #3638: UEFI Support on CloudStack
URL: https://github.com/apache/cloudstack/pull/3638#discussion_r392571840
##########
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:
@pavanaravapalli cc @DaanHoogland @andrijapanicsb Unless there is a
requirement of allowing customisation of UEFI (generally people use whatever
libvirt gives), you can simplify this by addressing the change in the libvirt
xml. See my changes around support EFI for arm64/raspberrypi (for example
https://github.com/apache/cloudstack/pull/3644/files#diff-042ba018afca0d690feae46e22f73301R128)
----------------------------------------------------------------
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