<div dir="ltr">Thanks Eric!  This was exactly what I was looking for.<br></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Fri, Dec 20, 2013 at 11:48 AM, Eric Blake <span dir="ltr"><<a href="mailto:eblake@redhat.com" target="_blank">eblake@redhat.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="im">On 12/20/2013 11:45 AM, Mark Trinh wrote:<br>
> I'm currently running:<br>
> virsh --version<br>
> 1.0.2<br>
><br>
> libvirtd --version<br>
> libvirtd (libvirt) 1.0.2<br>
><br>
> I have a couple questions.<br>
><br>
> 1. Can I upgrade my libvirt.so version to use with an older libvirtd?  In<br>
> other words, does the versions of libvirt and libvirtd need to be in lock<br>
> step?<br>
<br>
</div>No, they do not have to be in lockstep.  libvirt.so communicates to a<br>
local libvirtd the same way it communicates to a remote machine, and we<br>
took great care in the design to ensure that things error out nicely if<br>
the libvirt.so client is newer than the remote server; conversely, if<br>
the client is older, the changes have always been back-compat so that a<br>
newer server will always talk to the client correctly (although the<br>
client being older means that you can't take full advantage of the server).<br>
<div class="im"><br>
><br>
><br>
> 2. I'm able to use virsh blockcopy, but I want to do it programmatically<br>
> via C.  I looked through the API and was not able to see any references to<br>
> that.  I did see mention of virDomainBlockCopy on the TIP of the git<br>
> repository, but no other references to it.<br>
<br>
</div>The source code to virsh shows the APIs that we used; this is a good<br>
starting point for any other C binding, and also for any other language<br>
binding if you can map the C bindings over to your language bindings.<br>
In particular, tools/virsh-domain.c:cmdBlockCopy() is currently<br>
implemented atop the virDomainBlockRebase() API call with the<br>
VIR_DOMAIN_BLOCK_REBASE_COPY flag (but the door is open to also<br>
implement it atop a newer more-powerful virDomainBlockCopy() once we<br>
start targetting some of qemu 1.7 or 2.0's newer features).<br>
<span class="HOEnZb"><font color="#888888"><br>
--<br>
Eric Blake   eblake redhat com    <a href="tel:%2B1-919-301-3266" value="+19193013266">+1-919-301-3266</a><br>
Libvirt virtualization library <a href="http://libvirt.org" target="_blank">http://libvirt.org</a><br>
<br>
</font></span></blockquote></div><br></div>