mirror of
https://github.com/xcat2/xcat-core.git
synced 2026-08-03 16:06:59 +00:00
fix(kvm): emit a pseries domain for ppc64le KVM hypervisors
build_xmldesc only recognised cpumodel "ppc64" (big-endian) when deciding to set
<os type arch='ppc64' machine='pseries'>, but ppc64le hosts report cpumodel
"ppc64le" (virNodeGetInfo model). A guest on a ppc64le hypervisor was therefore
emitted as an x86-style domain -- no machine type and with pae/acpi/apic -- and
libvirt rejected it: "machine type 'pseries-*' does not support ACPI".
Recognise "ppc64le" alongside "ppc64" for the arch/machine block, and omit the
x86-only pae/acpi/apic features on both. Little- and big-endian pseries guests
both use libvirt <os> arch "ppc64".
Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
(cherry picked from commit 37666b92cd)
This commit is contained in:
committed by
Vinícius Ferrão
parent
0330cdad67
commit
014b2327d4
@@ -720,7 +720,11 @@ sub build_xmldesc {
|
||||
$xtree{name}->{content} = $node;
|
||||
$xtree{uuid}->{content} = getNodeUUID($node);
|
||||
$xtree{os} = build_oshash();
|
||||
if (defined($hypcpumodel) and $hypcpumodel eq "ppc64") {
|
||||
# ppc64le hypervisors report cpumodel "ppc64le" (not "ppc64"); both are pseries
|
||||
# guests whose libvirt <os> arch is "ppc64". Without this the guest is emitted
|
||||
# as an x86-style domain (no machine, plus the pae/acpi/apic below) which libvirt
|
||||
# rejects on ppc64le hosts: "machine type 'pseries-*' does not support ACPI".
|
||||
if (defined($hypcpumodel) and ($hypcpumodel eq "ppc64" or $hypcpumodel eq "ppc64le")) {
|
||||
$xtree{os}->{type}->{arch} = "ppc64";
|
||||
$xtree{os}->{type}->{machine} = "pseries";
|
||||
delete $xtree{os}->{bios};
|
||||
@@ -936,9 +940,13 @@ sub build_xmldesc {
|
||||
}
|
||||
}
|
||||
|
||||
$xtree{features}->{pae} = {};
|
||||
$xtree{features}->{acpi} = {};
|
||||
$xtree{features}->{apic} = {};
|
||||
# pae/acpi/apic are x86 features; pseries (ppc64/ppc64le) guests do not support
|
||||
# them and libvirt rejects the domain if they are present.
|
||||
unless (defined($hypcpumodel) and ($hypcpumodel eq "ppc64" or $hypcpumodel eq "ppc64le")) {
|
||||
$xtree{features}->{pae} = {};
|
||||
$xtree{features}->{acpi} = {};
|
||||
$xtree{features}->{apic} = {};
|
||||
}
|
||||
$xtree{features}->{content} = "\n";
|
||||
($xtree{devices}->{disk}, my $errstr) = build_diskstruct($cdloc);
|
||||
if ($errstr) {
|
||||
|
||||
Reference in New Issue
Block a user