Re: libvirt prepare and start hooks not callled

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

 



On Thu, Nov 19, 2015 at 21:32:05 +0000, Sundar Nadathur wrote:
> Hello,
>    Is there a reason why the prepare and start hooks cannot modify the
>    domain xml?

Because they were not designed that way. It's already too late to change
the domain definition in any of the hooks.

>    One would think it is a common use case to inject a device or some
>    content at VM creation time.

Not really, there's no reason to do anything like that. You can just
change the XML before starting it. Or you can use transient domains if
you want domain XMLs to be generated dynamically. It would certainly be
possible to add a new hook which would work as a filter when starting a
new domain, but using existing methods may be easier.

Both migrate and restore hooks were designed as filters because they are
(in case of migration) or can be (in case of restore) called on a
different host where, e.g., disk image files are mounted in a different
path.

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