[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [libvirt-users] Difference between function Migrate and Migrate2



On 06/10/2011 07:09 PM, Abhishek Gupta wrote:
> I was reading the API reference for the libvirt, when I came across
> the function  virDomainMigrate and virDomainMigrate2. I am unable to
> find the difference between the two. Can someone please tell the
> difference in the application of the two?

virDomainMigrate2 is the newer API with more features.  Per the comments
in libvirt.c:

 * virDomainMigrate:
 * @domain: a domain object
 * @dconn: destination host (a connection object)
 * @flags: flags
 * @dname: (optional) rename domain to this at destination
 * @uri: (optional) dest hostname/URI as seen from the source host
 * @bandwidth: (optional) specify migration bandwidth limit in Mbps

 * virDomainMigrate2:
 * @domain: a domain object
 * @dconn: destination host (a connection object)
 * @flags: flags
 * @dxml: (optional) XML config for launching guest on target
 * @dname: (optional) rename domain to this at destination
 * @uri: (optional) dest hostname/URI as seen from the source host
 * @bandwidth: (optional) specify migration bandwidth limit in Mbps

the biggest difference is the new @dxml parameter, which allows you to
make changes in the destination by passing in compatible xml to the host
for hypervisors that know how to compare two xml images (as of 0.9.2,
this is pretty much just the qemu hypervisor for kvm guests, but more
may be added later).  For example, only virDomainMigrate2 can let you
update which host resource is used for a particular guest network
interface, so that source and destination host no longer need have
exactly the same names for host resources.  But if you plan on passing
NULL for dxml (implying no changes needed), then the simpler API is
probably sufficient.

-- 
Eric Blake   eblake redhat com    +1-801-349-2682
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]