Pearl1594 commented on code in PR #11569:
URL: https://github.com/apache/cloudstack/pull/11569#discussion_r2319356718
##########
plugins/hypervisors/kvm/src/main/java/com/cloud/hypervisor/kvm/resource/LibvirtComputingResource.java:
##########
@@ -2903,6 +2904,31 @@ private boolean isGuestAarch64() {
return AARCH64.equals(guestCpuArch);
}
+ private boolean isQemuVersionConflictingSMBiosForWindowsGuestVMs() {
+ if (!isUbuntuOrDebianHost()) {
+ return false;
+ }
+ return getHypervisorQemuVersion() >
HYPERVISOR_QEMU_VERSION_PC_MACHINE_TYPE_FIX;
+ }
+
+ /**
+ * Observed the QEMU version included on Ubuntu 24 conflicts retrieval of
UUID for Windows VMs
+ * References:
+ * - <a href="https://gitlab.com/libvirt/libvirt/-/issues/807">Reported
issue with CloudStack created Windows VMs on Ubuntu 24</a>
+ * - <a href="https://gitlab.com/qemu-project/qemu/-/issues/2008">Reported
Issue on QEMU</a>
+ * Workaround: Set an older OS type machine on the XML domain:
'pc-i440fx-8.0'
+ */
+ private void setGuestMachineType(GuestDef guest) {
+ if (isGuestAarch64()) {
+ guest.setMachineType(VIRT);
+ } else if (isQemuVersionConflictingSMBiosForWindowsGuestVMs()) {
+ // Please check the method javadoc
+ guest.setMachineType("pc-i440fx-8.0");
Review Comment:
I wonder if getting this as vm detail would be better? as opposed to
hard-coding this to a specific machine type.
--
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]