[KVM] Allow passing the OS type machine for KVM XML domains through VM setting (#11569)

* [KVM] Allow passing OS type machine to XML domains
This commit is contained in:
Nicolas Vazquez 2025-09-16 07:19:20 -03:00 committed by GitHub
parent 23a53e213e
commit 96cabf7e43
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 4 additions and 0 deletions

View File

@ -41,6 +41,7 @@ public interface VmDetailConstants {
String KVM_VNC_PORT = "kvm.vnc.port";
String KVM_VNC_ADDRESS = "kvm.vnc.address";
String KVM_VNC_PASSWORD = "kvm.vnc.password";
String KVM_GUEST_OS_MACHINE_TYPE = "kvm.guest.os.machine.type";
// KVM specific, custom virtual GPU hardware
String VIDEO_HARDWARE = "video.hardware";

View File

@ -3306,6 +3306,9 @@ public class LibvirtComputingResource extends ServerResourceBase implements Serv
}
}
guest.setIothreads(customParams.containsKey(VmDetailConstants.IOTHREADS));
if (customParams.containsKey(VmDetailConstants.KVM_GUEST_OS_MACHINE_TYPE)) {
guest.setMachineType(customParams.get(VmDetailConstants.KVM_GUEST_OS_MACHINE_TYPE));
}
}
guest.setUuid(uuid);
if(!isGuestS390x()) {