Re: Difference between function Migrate and Migrate2

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

 



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@xxxxxxxxxx    +1-801-349-2682
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature


[Index of Archives]     [Virt Tools]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [KDE Users]

  Powered by Linux