<div dir="ltr"><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Feb 11, 2015 at 12:17 PM, Chris Adams <span dir="ltr">&lt;<a href="mailto:cma@cmadams.net" target="_blank">cma@cmadams.net</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">Once upon a time, Chris Adams &lt;<a href="mailto:cma@cmadams.net">cma@cmadams.net</a>&gt; said:<br>
&gt; Once upon a time, Dan Yasny &lt;<a href="mailto:dyasny@gmail.com">dyasny@gmail.com</a>&gt; said:<br>
&gt; &gt; shouldn&#39;t be hard to do. Can you provide the details of what you need to<br>
&gt; &gt; happen to the VM exactly?<br>
&gt; &gt; - domxml changes<br>
&gt; &gt; - other host level changes<br>
&gt; &gt; - whether the VM should be able to live migrate<br>
&gt;<br>
&gt; It looks like libvirt supports setting up DSCP bits with nwfilter, per:<br>
&gt;<br>
&gt; <a href="https://libvirt.org/formatnwfilter.html" target="_blank">https://libvirt.org/formatnwfilter.html</a><br>
<br>
</span>Oh, on reading this, nwfilter can only match, not set, so that won&#39;t<br>
help.  It doesn&#39;t look like libvirt has a way to set something like<br>
that.<br>
<br>
Do VDSM hooks only act on the XML, or is there a way to configure things<br>
outside of libvirt?<br></blockquote><div><br></div><div>The hooks are point is the VMs lifetime where you can insert any code you like.</div><div>There is a way to edit the domxml at certain points, because it hasn&#39;t been passed </div><div>to libvirt for execution yet. At other points changing the domxml will do nothing </div><div>useful because the VM is already running, but you can do other things, execute </div><div>other commands. A classic example is an oVirt independent Vm event monitoring</div><div>engine, to which you can issue a hook based message at certain lifecycle points, </div><div>e.g. &quot;VM $VM is starting&quot;; &quot;VM $VM is migrating&quot; etc. No idea why you&#39;d need </div><div>that engine (it&#39;s quite redundant because the ovirt-engine already does all this)</div><div>but it will definitely work.</div><div><br></div><div>In short, explore the hooks, note the livecycle points (they are simply aptly named</div><div>directories on the hosts) and decide what and where you need to execute. </div><div><br></div><div>If you are modifying a VM, it probably makes sense to do it in before_vm_start, but </div><div>if you&#39;re also live migrating that VM, you need to add the same changes in</div><div>before_migrate_vm_*, and if the hook script makes changes on the host, you </div><div>probably want to clean up after the VM is gone, so after_vm_stop and </div><div>after_vm_migrate_source are the places to start looking. The mechanism is very </div><div>flexible really, you can do anything you want if the host OS is capable of it</div><div><br></div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="HOEnZb"><div class="h5">--<br>
Chris Adams &lt;<a href="mailto:cma@cmadams.net">cma@cmadams.net</a>&gt;<br>
_______________________________________________<br>
Users mailing list<br>
<a href="mailto:Users@ovirt.org">Users@ovirt.org</a><br>
<a href="http://lists.ovirt.org/mailman/listinfo/users" target="_blank">http://lists.ovirt.org/mailman/listinfo/users</a><br>
</div></div></blockquote></div><br></div></div>