mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-21 20:15:17 +00:00
qemu: do not drop implicit controllers with non-implicit attributes
If someone set a user alias or pcihole64 on an implicit controller, we need to format it to migrate the domain properly. Signed-off-by: Ján Tomko <jtomko@redhat.com> Reported-by: Joseph Richard <Joseph.Richard@windriver.com>
This commit is contained in:
parent
186412fe76
commit
a1745174e9
@ -6181,7 +6181,8 @@ qemuDomainDefFormatBufInternal(virQEMUDriverPtr driver,
|
|||||||
if (ARCH_IS_X86(def->os.arch) && qemuDomainIsI440FX(def) &&
|
if (ARCH_IS_X86(def->os.arch) && qemuDomainIsI440FX(def) &&
|
||||||
usb && usb->idx == 0 &&
|
usb && usb->idx == 0 &&
|
||||||
(usb->model == VIR_DOMAIN_CONTROLLER_MODEL_USB_DEFAULT ||
|
(usb->model == VIR_DOMAIN_CONTROLLER_MODEL_USB_DEFAULT ||
|
||||||
usb->model == VIR_DOMAIN_CONTROLLER_MODEL_USB_PIIX3_UHCI)) {
|
usb->model == VIR_DOMAIN_CONTROLLER_MODEL_USB_PIIX3_UHCI) &&
|
||||||
|
!virDomainDeviceAliasIsUserAlias(usb->info.alias)) {
|
||||||
VIR_DEBUG("Removing default USB controller from domain '%s'"
|
VIR_DEBUG("Removing default USB controller from domain '%s'"
|
||||||
" for migration compatibility", def->name);
|
" for migration compatibility", def->name);
|
||||||
toremove++;
|
toremove++;
|
||||||
@ -6202,7 +6203,9 @@ qemuDomainDefFormatBufInternal(virQEMUDriverPtr driver,
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (pci && pci->idx == 0 &&
|
if (pci && pci->idx == 0 &&
|
||||||
pci->model == VIR_DOMAIN_CONTROLLER_MODEL_PCI_ROOT) {
|
pci->model == VIR_DOMAIN_CONTROLLER_MODEL_PCI_ROOT &&
|
||||||
|
!virDomainDeviceAliasIsUserAlias(pci->info.alias) &&
|
||||||
|
!pci->opts.pciopts.pcihole64) {
|
||||||
VIR_DEBUG("Removing default pci-root from domain '%s'"
|
VIR_DEBUG("Removing default pci-root from domain '%s'"
|
||||||
" for migration compatibility", def->name);
|
" for migration compatibility", def->name);
|
||||||
toremove++;
|
toremove++;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user