On Mon, May 09, 2022 at 09:12:51 +0100, Daniel P. Berrangé wrote:
On Sat, May 07, 2022 at 05:40:13PM +0800, zhangjl02 wrote:
> Get default emulator based on guest's arch, and replace it in domain's
> definition after domainPostParseDataAlloc's failure, then alloc again.
> This will solve the migration problem because of qemu emulator location error,
> especially, from host with to host without qemu-kvm.
[please primarily put justification of why you are doing something into
the patches themselves. Apart from making it more obvious to reviewers
it also records the justification in git once patches are commited]
When you're migrating between hosts it is possible to provide
libvirt an
updated XML doc at the time you initiate the migration. This allows you
to change any aspect that doesn't impact guest ABI, so you can provide
an updated emulator binary path at time of migration.
Actually there might be a problem with this. I've discussed this
recently with Jirka.
Specifically the ABI stability check is done on the source of the
migration. This means that the source has to actually parse and
interpret the destination XML too if it's provided by the user.
Now if your source host doesn't have the qemu binary or doesn't have it
in the path you have it on the destination this will fail.
I mentioned to Jirka that I think this is sub-optimal:
1) see problem above
2) the post-parse callbacks might fill in different defaults e.g. if the
destination qemu has different capabilities
3) if it were done on destination, the source portion of the XML can be
parsed without post-parse callbacks as it comes actually from a live
libvirt instance
So with the above if they have problem of qemu not being where they
expect, using of the destination XML will not help.
They might be able to use the hook script to filter it on the
destination though:
https://www.libvirt.org/hooks.html#qemu-guest-migration