On Mon, Mar 06, 2017 at 08:11:40PM +0100, Andrea Bolognani wrote:
On Thu, 2017-03-02 at 09:48 +0100, Pavel Hrdina wrote:
> The history of USB controller for ppc64 guest is complex and goes
> back to libvirt 1.3.1 where the fun started.
>
> Prior Libvirt 1.3.1 if no model for USB controller was specified
> we've simply passed "-usb" on QEMU command line.
>
> Since Libvirt 1.3.1 there is a patch (8156493d8db) that fixes this
> issue by using "-device pci-ohci,..." but it breaks migration with
> older Libvirts which was agreed that's acceptable. However this
> patch didn't reflect this change in the domain XML and the model
> was still missing.
Unfortunately, migrating a guest with
<controller type='usb' index='0'>
<address type='pci' .../>
</controller>
from libvirt 2.1.0 (which still allows not specifying the
controller model) to a build of libvirt including this patch
doesn't work as expected.
On the source host, I run
# virsh migrate \
mig-usb \
qemu+ssh://root@destination/system \
--live --persistent --copy-storage-all --compressed
While migration is still running, I can check on the
destination host and verify that:
* the <controller> element has model='pci-ohci';
* the QEMU command line contains -device pci-ohci.
However, after migration is complete, the <controller>
element has model='nec-xhci' instead of model='pci-ohci',
which means that power cycling the guest results in
breaking the guest ABI.
I'm not so sure that this is an ABI change. The guest ABI is to ensure
that the same guest XML will always start the same QEMU guest. However
the PERSISTENT migration can make ABI changes because it is the same as
virsh dumpxml $domain > $domain.xml && copy the XML onto remote host
and virsh define $domain.xml. This would also change the *model*.
If this would be considered to be guest ABI stable it would mean that
other changes done by using this flag would be wrong because they also
modifies the persistent XML during migration.
Pavel