qemu hook: event for source host too

Michal Privoznik mprivozn at redhat.com
Fri Jan 24 16:24:39 UTC 2020


On 1/24/20 4:34 PM, Guy Godfroy wrote:
> I don't really understand what new hook this would be.

Libvirt's migration happens in phases [1]. The last one is 'Confirm' 
where either the domain is either killed (because it's running on the 
destination successfully), or resumed (because there was an error).

If you make a lock shared at the beginning of the migration, but 
migration doesn't succeed you want to make it exclusive again in the 
Confirm phase. Or release it, because the domain is being killed (in 
which case we already run a hook script, so might get away with this 
specific case). Basically, in the hook called from the confirm phase you 
want to undo everything that the hook script called at the beginning of 
the migration has done.

BTW: I might have some time to work on this during weekend, but no 
promises. If you want to write patches though, I can give you some 
pointers and review them ;-)

Michal

1: 
https://libvirt.org/git/?p=libvirt.git;a=blob;f=src/libvirt-domain.c;h=4074397b30c3bba8b57d2058b3608234dd7a20ec;hb=HEAD#l2933




More information about the libvirt-users mailing list