<fix>[kvm]: do not use hyper-v emulate for linux vm.
Ignore the Emulate Hyper-V config for linux vms. Because some OS,
CentOS 8 for example, would crash with this config.
Resolves:
@@ -2760,11 +2760,14 @@ public class KVMHost extends HostBase implements Host {
cmd.setInstanceOfferingOnlineChange(VmSystemTags.INSTANCEOFFERING_ONLIECHANGE.getTokenByResourceUuid(spec.getVmInventory().getUuid(), VmSystemTags.INSTANCEOFFERING_ONLINECHANGE_TOKEN) != null);
cmd.setKvmHiddenState(rcf.getResourceConfigValue(VmGlobalConfig.KVM_HIDDEN_STATE, spec.getVmInventory().getUuid(), Boolean.class));
cmd.setSpiceStreamingMode(VmGlobalConfig.VM_SPICE_STREAMING_MODE.value(String.class));
- boolean emulatehyperV = false;
- if (ImageArchitecture.x86_64.toString().equals(architecture)) {
- emulatehyperV = rcf.getResourceConfigValue(VmGlobalConfig.EMULATE_HYPERV, spec.getVmInventory().getUuid(), Boolean.class);
+
+ boolean emulateHyperV = false;
+ if (!ImagePlatform.isType(platform, ImagePlatform.Linux) &&
+ ImageArchitecture.x86_64.toString().equals(architecture)) {
+ emulateHyperV = rcf.getResourceConfigValue(VmGlobalConfig.EMULATE_HYPERV, spec.getVmInventory().getUuid(), Boolean.class);
}
- cmd.setEmulateHyperV(emulatehyperV);
+ cmd.setEmulateHyperV(emulateHyperV);
+
cmd.setVendorId(rcf.getResourceConfigValue(VmGlobalConfig.VENDOR_ID, spec.getVmInventory().getUuid(), String.class));
cmd.setAdditionalQmp(VmGlobalConfig.ADDITIONAL_QMP.value(Boolean.class));
cmd.setApplianceVm(spec.getVmInventory().getType().equals("ApplianceVm"));
