Hi, On Wed, Sep 4, 2013 at 6:03 PM, Dmitri Chebotarov <dcheb...@gmu.edu> wrote: > > Does anyone have an example script on how to use VNET_HOOK? > > I need to make custom changes for a OVS's flows when a VM started or > migrated to other host. >
I think that you need to use a VM hook [1] instead. The VNet hooks can only be triggered when a network is created or deleted. You can create a hook ON RUNNING, it will work for VMs reaching this state on the first boot, or after a (live) migration. If you need more fine-tuning, you may want to create a ON CUSTOM hook, and provide your script with the previous states. This could be used to perform different actions for a normal boot and for a migration. Regards [1] http://opennebula.org/documentation:rel4.2:hooks -- Join us at OpenNebulaConf2013 <http://opennebulaconf.com> in Berlin, 24-26 September, 2013 -- Carlos Martín, MSc Project Engineer OpenNebula - The Open-source Solution for Data Center Virtualization www.OpenNebula.org | cmar...@opennebula.org | @OpenNebula<http://twitter.com/opennebula><cmar...@opennebula.org> On Wed, Sep 4, 2013 at 6:03 PM, Dmitri Chebotarov <dcheb...@gmu.edu> wrote: > Hi > > Does anyone have an example script on how to use VNET_HOOK? > > I need to make custom changes for a OVS's flows when a VM started or > migrated to other host. > In particular I would like to undo MAC_spoofing rule for a VM (based on > VM's custom attribute/tag): > > sudo /usr/bin/ovs-ofctl add-flow br0 > in_port=207,dl_src=00:50:56:00:10:5d,priority=40000,actions=normal > sudo /usr/bin/ovs-ofctl add-flow br0 > in_port=207,priority=39000,actions=drop > > I think the script associated with VNET_HOOK needs to access VM's > attributes and in_port value... > > Thanks. > > _______________________________________________ > Users mailing list > Users@lists.opennebula.org > http://lists.opennebula.org/listinfo.cgi/users-opennebula.org > >
_______________________________________________ Users mailing list Users@lists.opennebula.org http://lists.opennebula.org/listinfo.cgi/users-opennebula.org