]> git.proxmox.com Git - qemu.git/commitdiff
spice: adding seamless-migration option to the command line
authorYonit Halperin <yhalperi@redhat.com>
Tue, 21 Aug 2012 08:51:59 +0000 (11:51 +0300)
committerGerd Hoffmann <kraxel@redhat.com>
Wed, 5 Sep 2012 15:11:55 +0000 (17:11 +0200)
The seamless-migration flag is required in order to identify
whether libvirt supports the new QEVENT_SPICE_MIGRATE_COMPLETED or not
(by default the flag is off).
New libvirt versions that wait for QEVENT_SPICE_MIGRATE_COMPLETED should turn on this flag.
When this flag is off, spice fallbacks to its old migration method, which
can result in data loss.

Signed-off-by: Yonit Halperin <yhalperi@redhat.com>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
qemu-config.c
qemu-options.hx
ui/spice-core.c

index c05ffbc444ed50abaf69b343efb3d790b9757fa7..eba977ebca452de316d2d47c8d9d1f450dec0511 100644 (file)
@@ -537,6 +537,9 @@ QemuOptsList qemu_spice_opts = {
         },{
             .name = "playback-compression",
             .type = QEMU_OPT_BOOL,
+        }, {
+            .name = "seamless-migration",
+            .type = QEMU_OPT_BOOL,
         },
         { /* end of list */ }
     },
index 3c411c427e853b8584209de543ddd7a695f0d006..96a7bb192e82163182f1a3ec7323a58cbb60b7c7 100644 (file)
@@ -920,6 +920,9 @@ Enable/disable passing mouse events via vdagent.  Default is on.
 @item playback-compression=[on|off]
 Enable/disable audio stream compression (using celt 0.5.1).  Default is on.
 
+@item seamless-migration=[on|off]
+Enable/disable spice seamless migration. Default is off.
+
 @end table
 ETEXI
 
index ab069c5b6917204f6924cfbfe49a73328f4b22d7..ba0d0bdbc25a1554dbd9d98598cd9d25a06b541e 100644 (file)
@@ -585,6 +585,9 @@ void qemu_spice_init(void)
     int port, tls_port, len, addr_flags;
     spice_image_compression_t compression;
     spice_wan_compression_t wan_compr;
+#if SPICE_SERVER_VERSION >= 0x000b02 /* 0.11.2 */
+    bool seamless_migration;
+#endif
 
     qemu_thread_get_self(&me);
 
@@ -728,6 +731,10 @@ void qemu_spice_init(void)
     spice_server_set_uuid(spice_server, qemu_uuid);
 #endif
 
+#if SPICE_SERVER_VERSION >= 0x000b02 /* 0.11.2 */
+    seamless_migration = qemu_opt_get_bool(opts, "seamless-migration", 0);
+    spice_server_set_seamless_migration(spice_server, seamless_migration);
+#endif
     if (0 != spice_server_init(spice_server, &core_interface)) {
         error_report("failed to initialize spice server");
         exit(1);