The current Xen capabilities XML data chooses between /usr/lib/xen/bin/qemu-dm
and /usr/lib64/xen/bin/qemu-dm based on whether the guest arch is 64 bit.
This is incorrect because the path is actually determined based on the host
OS. Only x86_64 uses /usr/lib64, all other arches just use /usr/lib - even
on ia64. So this patch changes the logic so that /usr/lib64 is only used if
we see an x86_64 guest present - this implies host is x86_64 and that all
guests whether 32 or 64bit shoudl use /usr/lib64
Dan.
diff -r 38f2abccef9b src/xen_internal.c
--- a/src/xen_internal.c Sun Jan 20 11:28:37 2008 -0500
+++ b/src/xen_internal.c Sun Jan 20 12:36:23 2008 -0500
@@ -2186,6 +2186,7 @@ xenHypervisorMakeCapabilitiesXML(virConn
int ia64_be;
} guest_archs[32];
int nr_guest_archs = 0;
+ int lib64 = 0;
virBufferPtr xml;
char *xml_str;
@@ -2261,6 +2262,7 @@ xenHypervisorMakeCapabilitiesXML(virConn
else if (strncmp (&token[subs[2].rm_so], "x86_64", 6) == 0)
{
model = "x86_64";
bits = 64;
+ lib64 = 1;
}
else if (strncmp (&token[subs[2].rm_so], "ia64", 4) == 0)
{
model = "ia64";
@@ -2376,7 +2378,7 @@ xenHypervisorMakeCapabilitiesXML(virConn
<machine>pc</machine>\n\
<machine>isapc</machine>\n\
<loader>/usr/lib/xen/boot/hvmloader</loader>\n",
- guest_archs[i].bits == 64 ? "64" :
"");
+ lib64 ? "64" : "");
if (r == -1) goto vir_buffer_failed;
}
r = virBufferAdd (xml,
--
|=- Red Hat, Engineering, Emerging Technologies, Boston. +1 978 392 2496 -=|
|=- Perl modules:
http://search.cpan.org/~danberr/ -=|
|=- Projects:
http://freshmeat.net/~danielpb/ -=|
|=- GnuPG: 7D3B9505 F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 -=|