<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<style type="text/css" id="owaParaStyle" style="display: none; ">P {margin-top:0;margin-bottom:0;}</style>
</head>
<body dir="ltr" fpstyle="1" aria-label="Message body" tabindex="0" style="">
<div name="divtagdefaultwrapper" id="divtagdefaultwrapper" style="font-family: Calibri,Arial,Helvetica,sans-serif; font-size: 12pt; color: #000000; margin: 0">
<span style="background-color: rgb(255, 255, 255); ">Hi</span>
<div style="background-color: rgb(255, 255, 255); "><br>
</div>
<div style="background-color: rgb(255, 255, 255); ">Does anyone have an example script on how to use VNET_HOOK? </div>
<div style="background-color: rgb(255, 255, 255); "><br>
</div>
<div style="background-color: rgb(255, 255, 255); ">I need to make custom changes for a OVS's flows when a VM started or migrated to other host.</div>
<div style="background-color: rgb(255, 255, 255); ">In particular I would like to undo MAC_spoofing rule for a VM (based on VM's custom attribute/tag):</div>
<div style="background-color: rgb(255, 255, 255); "><br>
</div>
<div style="background-color: rgb(255, 255, 255); "><font face="Open Sans,sans-serif" size="2" color="#F2F2F2"><span style="font-size: 14px; background-color: rgb(111, 111, 111); ">sudo /usr/bin/ovs-ofctl add-flow br0 in_port=207,dl_src=00:50:56:00:10:5d,priority=40000,actions=normal</span></font><br>
<font face="Open Sans,sans-serif" size="2" color="#F2F2F2"><span style="font-size: 14px; background-color: rgb(111, 111, 111); ">sudo /usr/bin/ovs-ofctl add-flow br0 in_port=207,priority=39000,actions=drop</span></font></div>
<div style="background-color: rgb(255, 255, 255); "><br>
</div>
<div style="background-color: rgb(255, 255, 255); ">I think the script associated with VNET_HOOK needs to access VM's attributes and in_port value...</div>
<div style="background-color: rgb(255, 255, 255); "><br>
</div>
<div style="background-color: rgb(255, 255, 255); ">Thanks.</div>
</div>
</body>
</html>