On Tue, Feb 18, 2025 at 18:41:46 +0100, Victor Toso wrote:
Hi,
I'm particularly interested in the PoC of KubeVirt to allow
custom changes in libvirt domain xml in a more straightforward
manner than they have Today [0].
When I was looking into the libvirt hooks, I was a bit excited
when I read:
> you can also place several hook scripts in the directory
> /etc/libvirt/hooks/qemu.d/. They are executed in alphabetical
> order after main script. In this case each script also acts as
> filter and can modify the domain XML and print it out on its
> standard output. This script output is passed to standard
> input next script in order. Empty output from any script is
> also identical to copying the input XML without changing it.
> In case any script returns failure common process will be
> aborted, but all scripts from the directory will are executed.
But that's not the case for every situation. When the domain is
being defined the scripts are run but the output is ignored [1]
Is there a reason for that?
Libvirt only checks the output of pre-migration hook so that you can
change the XML on incoming migration on the destination host rather than
providing the updated XML to the migrate API.
The above paragraph talks about domain XML passing from one script to
the following one when there's more scripts defined in qemu.d/
Jirka