Hi Team ,
I am reaching out to you seeking your help for one of my KVM hook script.
I am using /etc/libvirt/hooks/network file to trigger an event when a network is created or deleted (
https://www.libvirt.org/hooks.html
). Basically I using a rest call to create the same network in my Infoblox appliance for the network monitoring.
However every time I create a network only $2== start or $2==started gets invoked, i have tried pretty much every combination and permutation but did not get any success. I checked the libvirtd.log and found that only
$2== start or $2==started gets invoked.
In my case i would like to get network created in infoblox appliance as and when it gets created in the KVM and should get deleted as and when it gets deleted from the KVM.
Here is snippet of my script
-----------------------------------------------------------------------------------------------------------------------
This script works perfectly fine and creates the network however when i delete the network it does not get deleted from the infoblox appliance. As i mentioned when tailed the libvirtd.log I found that the API to create network gets executed when the network is stopped.
Attaching libvirted.log snippet
In this screen shot, stopped hook is triggered but still network creation API is fired which has errored out.
Any guidance or help is highly appreciated.
-Aditya