Re: libvirt hook to change domain xml

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

On Tue, Feb 18, 2025 at 07:11:45PM +0100, Jiri Denemark wrote:
> 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

Indeed, I understood it after failing and re-reading the docs. My
question is more related to the possibility of using it in other
scenarios. Would patches for that be welcomed?

Cheers,
Victor

Attachment: signature.asc
Description: PGP signature


[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux