Re: libvirt prepare and start hooks not callled

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

 



On Mon, Nov 16, 2015 at 12:43:21 +0000, Sundar Nadathur wrote:
> Hello Jirka,
>    The script is not even invoked for prepare/start calls, not that it
>    is invoking libvirt APIs or is hanging. When it is invoked for
>    'started', it runs to completion.

Strange. Do you see corresponding "Calling hook" messages in libvirtd
debug logs? (See http://wiki.libvirt.org/page/DebugLogs for instructions
how to enable debug logs.)

> I did notice the warning about talking to libvirt from the hooks.
> However, if the script were to be invoked, I will only be writing the
> modified xml to stdout. This is based on:
>    https://libvirt.org/hooks.html
> For migrate and restore calls, "the script acts as a filter and is
> supposed to modify the domain XML and print it out on its standard
> output".

> I am hoping the same method will work for prepare or start calls.

No, the hook only works as a filter for migrate and restore calls.

> If there is a better way to update the VM's xml before it is launched,
> please let me know.

There is, just redefine the XML before starting the domain. There's no
way of doing this via hooks.

Jirka

_______________________________________________
libvirt-users mailing list
libvirt-users@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvirt-users



[Index of Archives]     [Virt Tools]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [KDE Users]

  Powered by Linux