Bug 728341 - stopping src libvirtd during migration pauses the guest being migrated
Summary: stopping src libvirtd during migration pauses the guest being migrated
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: libvirt
Version: 7.0
Hardware: All
OS: All
Target Milestone: rc
: ---
Assignee: Jiri Denemark
QA Contact: Virtualization Bugs
Depends On:
TreeView+ depends on / blocked
Reported: 2011-08-04 18:45 UTC by Dave Allan
Modified: 2016-04-26 14:47 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Last Closed: 2014-08-07 12:31:23 UTC
Target Upstream Version:

Attachments (Terms of Use)

Description Dave Allan 2011-08-04 18:45:16 UTC
In one shell, I started a migration with:

virsh migrate --live --desturi 'qemu+ssh://root@hybrid0/system' spice

In a second shell, I stopped libvirtd:

service libvirtd stop

The guest remained running during the migration until I stopped the source libvirtd at which point it became paused until I started libvirtd again.  I think the guest should continue to run while libvirtd is stopped, as it would if no migration had been taking place.

Comment 1 Jiri Denemark 2011-08-18 09:48:09 UTC
It's because in normal (non-tunneled) migration libvirtd is not involved in the actual migration process. It just sets everything up, tells qemu to start migration and once that ends (successfully or not), libvirt resumes one of the domains and kills the other one. When the live migration enters its last phase, qemu pauses the domain and transfers the rest of its state. And it stays paused until libvirtd starts and notices that the domain is paused for migration couldn't successfully finish without libvirtd and resumes it.

IMHO the only way to fix this is to route migration data through libvirt so that if libvirtd crashes or is stopped, the migration is automatically canceled since qemu will not be able to send migration data.

Comment 2 Jiri Denemark 2011-08-18 09:49:31 UTC
Actually, there might be another solution. Qemu could be patched to cancel migration in case the monitor connection that requested it is closed. But I have no idea how feasible this is.

Comment 5 Jiri Denemark 2014-08-07 12:31:23 UTC
This is not an issue in practice since a crashed libvirtd will be followed by its restart (systemd restarts the daemon automatically and so does RHEV on RHEL-6 via upstart) and libvirtd will cancel the migration when it starts. I think there's no need to spend time on this bug.

Note You need to log in before you can comment on or make changes to this bug.