[libvirt] why doesn't libvirt let qemu autostart live-migrated VMs?

Chris Friesen chris.friesen at windriver.com
Tue Apr 15 15:09:55 UTC 2014


On 04/15/2014 02:28 AM, Daniel P. Berrange wrote:
> On Mon, Apr 14, 2014 at 05:50:07PM -0600, Chris Friesen wrote:
>> Hi,
>>
>> I've been digging through the libvirt code and something that struck
>> me was that it appears that when using qemu libvirt will migrate the
>> instance with autostart disabled, then sit on the source host
>> periodically polling for migration completion, then once the host
>> detects that migration is completed it will tell the destination to
>> start up the VM.
>>
>> Why don't we let the destination autostart the VM once migration is
>> complete?
>
> Libvirt has to have synchronization point on the target machine, so
> that we can acquire any disk leases associated with the VM before
> the CPUs are started.

Where does that happen?  I'm looking at libvirt/qemu, specifically this 
code path on the target:


remoteDispatchDomainMigrateFinish3ParamsHelper
remoteDispatchDomainMigrateFinish3Params
virDomainMigrateFinish3Params
qemuDomainMigrateFinish3Params
qemuMigrationFinish
qemuProcessStartCPUs
qemuMonitorStartCPUs

Thanks,
Chris




More information about the libvir-list mailing list