<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"><<a href="mailto:cma@cmadams.net" target="_blank">cma@cmadams.net</a>></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 <<a href="mailto:cma@cmadams.net">cma@cmadams.net</a>> said:<br>
> Once upon a time, Dan Yasny <<a href="mailto:dyasny@gmail.com">dyasny@gmail.com</a>> said:<br>
> > shouldn't be hard to do. Can you provide the details of what you need to<br>
> > happen to the VM exactly?<br>
> > - domxml changes<br>
> > - other host level changes<br>
> > - whether the VM should be able to live migrate<br>
><br>
> It looks like libvirt supports setting up DSCP bits with nwfilter, per:<br>
><br>
> <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't<br>
help. It doesn'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'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. "VM $VM is starting"; "VM $VM is migrating" etc. No idea why you'd need </div><div>that engine (it'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'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 <<a href="mailto:cma@cmadams.net">cma@cmadams.net</a>><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>