1. 24 5月, 2016 2 次提交
    • G
      migration: regain control of images when migration fails to complete · fe904ea8
      Greg Kurz 提交于
      We currently have an error path during migration that can cause
      the source QEMU to abort:
      
      migration_thread()
        migration_completion()
          runstate_is_running() ----------------> true if guest is running
          bdrv_inactivate_all() ----------------> inactivate images
          qemu_savevm_state_complete_precopy()
           ... qemu_fflush()
                 socket_writev_buffer() --------> error because destination fails
               qemu_fflush() -------------------> set error on migration stream
        migration_completion() -----------------> set migrate state to FAILED
      migration_thread() -----------------------> break migration loop
        vm_start() -----------------------------> restart guest with inactive
                                                  images
      
      and you get:
      
      qemu-system-ppc64: socket_writev_buffer: Got err=104 for (32768/18446744073709551615)
      qemu-system-ppc64: /home/greg/Work/qemu/qemu-master/block/io.c:1342:bdrv_co_do_pwritev: Assertion `!(bs->open_flags & 0x0800)' failed.
      Aborted (core dumped)
      
      If we try postcopy with a similar scenario, we also get the writev error
      message but QEMU leaves the guest paused because entered_postcopy is true.
      
      We could possibly do the same with precopy and leave the guest paused.
      But since the historical default for migration errors is to restart the
      source, this patch adds a call to bdrv_invalidate_cache_all() instead.
      Signed-off-by: NGreg Kurz <gkurz@linux.vnet.ibm.com>
      Message-Id: <146357896785.6003.11983081732454362715.stgit@bahia.huguette.org>
      Signed-off-by: NAmit Shah <amit.shah@redhat.com>
      fe904ea8
    • G
      savevm: fail if migration blockers are present · 24f3902b
      Greg Kurz 提交于
      QEMU has currently two ways to prevent migration to occur:
      - migration blocker when it depends on runtime state
      - VMStateDescription.unmigratable when migration is not supported at all
      
      This patch gathers all the logic into a single function to be called from
      both the savevm and the migrate paths.
      
      This fixes a bug with 9p, at least, where savevm would succeed and the
      following would happen in the guest after loadvm:
      
      $ ls /host
      ls: cannot access /host: Protocol error
      
      With this patch:
      
      (qemu) savevm foo
      Migration is disabled when VirtFS export path '/' is mounted in the guest
      using mount_tag 'host'
      Signed-off-by: NGreg Kurz <gkurz@linux.vnet.ibm.com>
      Reviewed-by: NPaolo Bonzini <pbonzini@redhat.com>
      Message-Id: <146239057139.11271.9011797645454781543.stgit@bahia.huguette.org>
      
      [Update subject according to Paolo's suggestion - Amit]
      Signed-off-by: NAmit Shah <amit.shah@redhat.com>
      24f3902b
  2. 23 5月, 2016 3 次提交
  3. 20 5月, 2016 2 次提交
  4. 19 5月, 2016 33 次提交