Skip to contentSkip to conversation

status of non-live migration of HVM with libvirt

DISCUSSION Olaf Hering 2 participants 6 messages Jan 4, 2019 – Apr 10, 2019

lore
Share & tools
lore
#0 lore raw

With 'xl migrate' the migration is always live, while 'virsh migrate' will do an offline migration unless '--live' is used. Such non-live migration will break with HVM because the sending side does not seem to unlock the qcow2 image.

I wonder if its worth keeping (and fixing) the concept of an "offline migration", or if libvirt should be changed to either require '--live' or silently always do live migrations.

Olaf

_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel

#1 lore raw

Am Fri, 4 Jan 2019 16:57:55 +0100
schrieb Olaf Hering <[email protected]>:

Quoted 1 line

worth keeping (and fixing) the concept of an "offline migration"

And regarding the fix, it looks like qmp_xen_save_devices_state does not need the concept of "live". Just shutdown the blockdevices and be done with it?

+++ b/migration/savevm.c
@@ -2293,7 +2293,7 @@ void qmp_xen_save_devices_state(const char *filename, bool has_live, bool live,
* So call bdrv_inactivate_all (release locks) here to let the other
* side of the migration take controle of the images.
*/
- if (live && !saved_vm_running) {

+        if (!saved_vm_running) {
             ret = bdrv_inactivate_all();
             if (ret) {
                 error_setg(errp, "%s: bdrv_inactivate_all() failed (%d)",

Olaf

_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel

#2 lore raw

Am Fri, 4 Jan 2019 17:48:31 +0100
schrieb Olaf Hering <[email protected]>:

Quoted 6 lines

Am Fri, 4 Jan 2019 16:57:55 +0100
schrieb Olaf Hering <[email protected]>:

Quoted 1 line

worth keeping (and fixing) the concept of an "offline migration"

And regarding the fix, it looks like qmp_xen_save_devices_state does not need the concept of "live". Just shutdown the blockdevices and be done with it?

Anthony, it looks like 5d6c599fe1 ("migration, xen: Fix block image lock issue on live migration") went too far. Why does stopping the disks at the very end of the save/migrate process depend on "live"? During a migration the disks have to be released either way. During "xl save" the domU may continue to run, if '-c' was specified.

It seems the 'live' parameter for xen-save-devices-state is not needed.

Olaf

_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel

#3 lore raw

Anthony,

looks like this fix missed qemu-4.0.

What is your opinion on this fix? I think there was zero reply...

Olaf

Quoted 8 lines · Olaf Hering

Am Fri, 4 Jan 2019 17:48:31 +0100
schrieb Olaf Hering <[email protected]>:

Quoted 5 lines

Am Fri, 4 Jan 2019 16:57:55 +0100
schrieb Olaf Hering <[email protected]>:

Quoted 1 line

worth keeping (and fixing) the concept of an "offline migration"

Quoted 7 lines
Quoted 1 line

And regarding the fix, it looks like qmp_xen_save_devices_state does not need the concept of "live". Just shutdown the blockdevices and be done with it?

Anthony, it looks like 5d6c599fe1 ("migration, xen: Fix block image lock issue on live migration") went too far. Why does stopping the disks at the very end of the save/migrate process depend on "live"? During a migration the disks have to be released either way. During "xl save" the domU may continue to run, if '-c' was specified.

It seems the 'live' parameter for xen-save-devices-state is not needed.

Olaf

_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel

#4 lore raw
In reply to Olaf Hering
Quoted 6 lines · Olaf Hering

Am Fri, 4 Jan 2019 17:48:31 +0100
schrieb Olaf Hering <[email protected]>:

Quoted 3 lines

Am Fri, 4 Jan 2019 16:57:55 +0100
schrieb Olaf Hering <[email protected]>:

Quoted 7 lines
Quoted 3 lines
Quoted 1 line

worth keeping (and fixing) the concept of an "offline migration"

And regarding the fix, it looks like qmp_xen_save_devices_state does not need the concept of "live". Just shutdown the blockdevices and be done with it?

Anthony, it looks like 5d6c599fe1 ("migration, xen: Fix block image lock issue on live migration") went too far. Why does stopping the disks at the very end of the save/migrate process depend on "live"?

Because "Snapshots don't need to inactivate images", see:
https://lists.xenproject.org/archives/html/xen-devel/2017-10/msg02782.html

I had to add the `live' parameter to fix the lock issue.

Quoted 1 line

During a migration the disks have to be released either way. During "xl save" the domU may continue to run, if '-c' was specified.

xl save -c is a snapshot, right? There isn't a second QEMU process that is going to read/write the same disk.

Quoted 3 lines

It seems the 'live' parameter for xen-save-devices-state is not needed.

Olaf

Signature · 6 lines
Anthony PERARD

_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel
#5 lore raw

Am Wed, 10 Apr 2019 17:25:04 +0100
schrieb Anthony PERARD <[email protected]>:

Quoted 4 lines

Because "Snapshots don't need to inactivate images", see:
https://lists.xenproject.org/archives/html/xen-devel/2017-10/msg02782.html

I had to add the `live' parameter to fix the lock issue.

Thanks, I will double check this part.

Olaf

_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel