1. 22 9月, 2016 29 次提交
  2. 21 9月, 2016 7 次提交
    • M
      migration: Document we don't copy storage during offline migration · f6160483
      Michal Privoznik 提交于
      https://bugzilla.redhat.com/show_bug.cgi?id=1322717
      
      During offline migration, no storage is copied. Nor disks, nor
      NVRAM file, nor anything. We use qemu for that and because domain
      is not running there's nobody to copy that for us.
      We should document this to avoid confusing users.
      Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
      f6160483
    • P
      qemu: driver: Don't return automatic NUMA emulator pinning data for persistentDef · 006a532c
      Peter Krempa 提交于
      Calling virDomainGetEmulatorPinInfo on a live VM with automatic NUMA
      pinning and VIR_DOMAIN_AFFECT_CONFIG would return the automatic pinning
      data in some cases which is bogus. Use the autoCpuset property only when
      called on a live definition.
      
      Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1365779
      006a532c
    • P
      qemu: driver: Don't return automatic NUMA vCPU pinning data for persistentDef · 552892c5
      Peter Krempa 提交于
      Calling virDomainGetVcpuPinInfo on a live VM with automatic NUMA pinning
      and VIR_DOMAIN_AFFECT_CONFIG would return the automatic pinning data
      in some cases which is bogus. Use the autoCpuset property only when
      called on a live definition.
      
      Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1365779
      552892c5
    • P
      qemu: domain: Add macro to simplify access to vm private data · 63aac8c2
      Peter Krempa 提交于
      Sometimes adding a separate variable to access vm->privateData is not
      necessary. Add a macro that will do the typecasting rather than having
      to add a temp variable to force the compiler to typecast it.
      63aac8c2
    • P
      conf: Introduce virDomainObjGetOneDefState · 4cc65b49
      Peter Krempa 提交于
      Return whether the live or persistent definition was returned. Sometimes
      it's necessary to base the decisions on this.
      4cc65b49
    • J
      qemu: Ignore graphics cookie if port == 0 · 2e164b45
      Jiri Denemark 提交于
      Old libvirt represents
      
          <graphics type='spice'>
            <listen type='none'/>
          </graphics>
      
      as
      
          <graphics type='spice' autoport='no'/>
      
      In this mode, QEMU doesn't listen for SPICE connection anywhere and
      clients have to use virDomainOpenGraphics* APIs to attach to the domain.
      That is, the client has to run on the same host where the domains runs
      and it's impossible to tell the client to reconnect to the destination
      QEMU during migration (unless there is some kind of proxy on the host).
      
      While current libvirt correctly ignores such graphics devices when
      creating graphics migration cookie, old libvirt just sends
      
          <graphics type='spice' port='0' listen='0.0.0.0' tlsPort='-1'/>
      
      in the cookie. After seeing this cookie, we happily would call
      client_migrate_info QMP command and wait for SPICE_MIGRATE_COMPLETED
      event, which is quite pointless since the doesn't know where to connecti
      anyway. We should just ignore such cookies.
      
      https://bugzilla.redhat.com/show_bug.cgi?id=1376083Signed-off-by: NJiri Denemark <jdenemar@redhat.com>
      2e164b45
    • J
      qemuDomainOpenGraphics: Start job early · 53ae58b0
      Jiri Denemark 提交于
      Checking if a domain's definition or if it is active before we got a job
      is pointless since the domain might have changed in the meantime.
      
      Luckily libvirtd didn't crash when the API tried to talk to an inactive
      domain:
      
      debug : qemuDomainObjBeginJobInternal:2914 : Started job: modify
          (async=none vm=0x7f8f340140c0 name=ble)
      debug : qemuDomainObjEnterMonitorInternal:3137 : Entering monitor
          (mon=(nil) vm=0x7f8f340140c0 name=ble)
      warning : virObjectLock:319 : Object (nil) ((unknown)) is not a
          virObjectLockable instance
      debug : qemuMonitorOpenGraphics:3505 : protocol=spice fd=27
          fdname=graphicsfd skipauth=1
      error : qemuMonitorOpenGraphics:3508 : invalid argument: monitor must
          not be NULL
      debug : qemuDomainObjExitMonitorInternal:3160 : Exited monitor
          (mon=(nil) vm=0x7f8f340140c0 name=ble)
      debug : qemuDomainObjEndJob:3068 : Stopping job: modify (async=none
          vm=0x7f8f340140c0 name=ble)
      Signed-off-by: NJiri Denemark <jdenemar@redhat.com>
      53ae58b0
  3. 20 9月, 2016 4 次提交
    • N
      qemu: agent: give better error messages whe agent monitor is down · 6bff9c03
      Nikolay Shirokovskiy 提交于
      We can receive NULL as sync reply in two situations. First
      is garbage sync reply and this situation is handled by
      resending sync message. Second is different cases
      of rebooting guest, destroing domain etc and we can
      give more meaningful error message. Actually we have
      this error message in qemuAgentCommand already which checks
      for the same sitatuion. AFAIK case with mon->running
      is just to be safe on adding some future(?) cases of
      returning NULL reply.
      6bff9c03
    • N
      qemu: agent: reissue sync on garbage sync reply · 3f90a1aa
      Nikolay Shirokovskiy 提交于
      We can easily handle receiving garbage on sync. We don't
      have to make client deal with this situation. We just
      need to resend sync command but this time garbage is
      not be possible.
      3f90a1aa
    • N
      qemu: agent: skip outdated sync replies · 5e5019bf
      Nikolay Shirokovskiy 提交于
      When we wait for sync reply we can receive delayed
      reply to syncs or commands that were sent erlier. We can
      safely skip them until we receive sync reply with correct id.
      There is no much sense report this situation to client.
      Actually with a bit of "luck" if we involve client into
      this the play can go on forever: send sync 0, receive
      sync reply -1, send sync 1, receive reply 0 ...
      5e5019bf
    • N
      qemu: agent: ignore garbage while waiting for sync reply · 832d48d7
      Nikolay Shirokovskiy 提交于
      After sync is sent we can receive garbare and this is not error.
      Consider next regular case:
      
      1. libvirtd sends sync
      2. qga sends partial sync reply and die
      3. libvirtd sends sync
      4. qga sends sync reply
      5. libvirtd receives garbage
        (half of first reply and second reply together)
      
      We should handle this situation as it is recoverable.
      Next sync can succeed. Let's report reply is NULL,
      it will be converted to the VIR_ERR_AGENT_UNSYNCED
      which signals client to retry.
      832d48d7