• D
    Support a new peer-to-peer migration mode & public API · fae0da5c
    Daniel P. Berrange 提交于
    Introduces several new public API options for migration
    
     - VIR_MIGRATE_PEER2PEER: With this flag the client only
       invokes the virDomainMigratePerform method, expecting
       the source host driver to do whatever is required to
       complete the entire migration process.
     - VIR_MIGRATE_TUNNELLED: With this flag the actual data
       for migration will be tunnelled over the libvirtd RPC
       channel. This requires that VIR_MIGRATE_PEER2PEER is
       also set.
     - virDomainMigrateToURI: This is variant of the existing
       virDomainMigrate method which does not require any
       virConnectPtr for the destination host. Given suitable
       driver support, this allows for all the same modes as
       virDomainMigrate()
    
    The URI for VIR_MIGRATE_PEER2PEER must be a valid libvirt
    URI. For non-p2p migration a hypervisor specific migration
    URI is used.
    
    virDomainMigrateToURI without a PEER2PEER flag is only
    support for Xen currently, and it involves XenD talking
    directly to XenD, no libvirtd involved at all.
    
    * include/libvirt/libvirt.h.in: Add VIR_MIGRATE_PEER2PEER
      flag for migration
    * src/libvirt_internal.h: Add feature flags for peer to
      peer migration (VIR_FEATURE_MIGRATE_P2P) and direct
      migration (VIR_MIGRATE_PEER2PEER mode)
    * src/libvirt.c: Implement support for VIR_MIGRATE_PEER2PEER
      and virDomainMigrateToURI APIs.
    * src/xen/xen_driver.c: Advertise support for DIRECT migration
    * src/xen/xend_internal.c: Add TODO item for p2p migration
    * src/libvirt_public.syms: Export virDomainMigrateToURI
      method
    * src/qemu/qemu_driver.c: Add support for PEER2PEER and
      migration, and adapt TUNNELLED migration.
    * tools/virsh.c: Add --p2p and --direct args and use the
      new virDomainMigrateToURI method where possible.
    fae0da5c
libvirt.c 276.8 KB