mirror of https://gitee.com/openkylin/libvirt.git
Look up machine types from all domains in qemudGetOldMachines()
Rather than just looking at the default domain info, look at all domains * src/qemu_conf.c: look at all domains in qemudGetOldMachines()
This commit is contained in:
parent
44646747a7
commit
f5dd3bcde9
|
@ -554,12 +554,22 @@ qemudGetOldMachines(const char *ostype,
|
||||||
|
|
||||||
for (i = 0; i < old_caps->nguests; i++) {
|
for (i = 0; i < old_caps->nguests; i++) {
|
||||||
virCapsGuestPtr guest = old_caps->guests[i];
|
virCapsGuestPtr guest = old_caps->guests[i];
|
||||||
|
int j;
|
||||||
|
|
||||||
if (!STREQ(ostype, guest->ostype) ||
|
if (!STREQ(ostype, guest->ostype) ||
|
||||||
!STREQ(arch, guest->arch.name) ||
|
!STREQ(arch, guest->arch.name) ||
|
||||||
wordsize != guest->arch.wordsize)
|
wordsize != guest->arch.wordsize)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
|
for (j = 0; j < guest->arch.ndomains; j++) {
|
||||||
|
virCapsGuestDomainPtr dom = guest->arch.domains[j];
|
||||||
|
|
||||||
|
if (qemudGetOldMachinesFromInfo(&dom->info,
|
||||||
|
emulator, emulator_mtime,
|
||||||
|
machines, nmachines))
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
if (qemudGetOldMachinesFromInfo(&guest->arch.defaultInfo,
|
if (qemudGetOldMachinesFromInfo(&guest->arch.defaultInfo,
|
||||||
emulator, emulator_mtime,
|
emulator, emulator_mtime,
|
||||||
machines, nmachines))
|
machines, nmachines))
|
||||||
|
|
Loading…
Reference in New Issue