Hi.
On some VM, I need to exec a hook script when an incoming live migration is over (and another one when an outgoing live migration is over). In my case, it's to redirect public IP from my hoster (Online.net) to the new node where the VM is running, and updating routes to setup ARP proxying.
Until now, I managed to do this using a self written daemon which listens to sockets creation/deletion in /var/run/qemu-server with inotify, and fire the scripts. The problem I have is that since the latest versions (I guess since qemu 3.0), the migrate socket is unlinked nearly immediatly, while the migration is still running, so I cannot detect when the incming migration is finished anymore.
I'd like to remove this daemon, and use the hooks PVE recently added. But I only see pre-start, post-start, pre-stop and post-stop hooks. As a migration can take un unkown amount of time (from a few sec to several minutes, depending on the link speed, and the VM activity), I don't want to migrate the IP when the qemu process is started on the new node, but only when the migration is finished, to have a minimal downtime. Is there a way to do this somehow ?
Are more hooks planned ? (ideally, I'd like to have pre-migrate-in, pre-migrate-out, post-migrate-in and post-migrate-out)
Thanks,
Daniel
On some VM, I need to exec a hook script when an incoming live migration is over (and another one when an outgoing live migration is over). In my case, it's to redirect public IP from my hoster (Online.net) to the new node where the VM is running, and updating routes to setup ARP proxying.
Until now, I managed to do this using a self written daemon which listens to sockets creation/deletion in /var/run/qemu-server with inotify, and fire the scripts. The problem I have is that since the latest versions (I guess since qemu 3.0), the migrate socket is unlinked nearly immediatly, while the migration is still running, so I cannot detect when the incming migration is finished anymore.
I'd like to remove this daemon, and use the hooks PVE recently added. But I only see pre-start, post-start, pre-stop and post-stop hooks. As a migration can take un unkown amount of time (from a few sec to several minutes, depending on the link speed, and the VM activity), I don't want to migrate the IP when the qemu process is started on the new node, but only when the migration is finished, to have a minimal downtime. Is there a way to do this somehow ?
Are more hooks planned ? (ideally, I'd like to have pre-migrate-in, pre-migrate-out, post-migrate-in and post-migrate-out)
Thanks,
Daniel