weizhouapache commented on code in PR #13108:
URL: https://github.com/apache/cloudstack/pull/13108#discussion_r3200556085


##########
plugins/hypervisors/kvm/src/main/java/com/cloud/hypervisor/kvm/resource/LibvirtComputingResource.java:
##########
@@ -3028,8 +3028,10 @@ public void createVifs(final VirtualMachineTO vmSpec, 
final LibvirtVMDef vm) thr
         final NicTO[] nics = vmSpec.getNics();
         final Map <String, String> params = vmSpec.getDetails();
         String nicAdapter = "";
-        if (params != null && params.get("nicAdapter") != null && 
!params.get("nicAdapter").isEmpty()) {
-            nicAdapter = params.get("nicAdapter");
+        if (params != null && params.get(VmDetailConstants.NIC_ADAPTER) != 
null && !params.get(VmDetailConstants.NIC_ADAPTER).isEmpty()) {
+            nicAdapter = params.get(VmDetailConstants.NIC_ADAPTER);
+        } else if (MapUtils.isNotEmpty(params) && 
params.containsKey(GuestDef.BootType.UEFI.toString())) {
+            nicAdapter = "e1000";

Review Comment:
   Documenting it might be enough, I guess, just my opinion.
   
   IMHO, the core idea is to provide more options rather than changing the 
default settings for users.



-- 
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]

Reply via email to