1. 26 3月, 2015 3 次提交
  2. 25 3月, 2015 3 次提交
  3. 24 3月, 2015 1 次提交
    • L
      qemu: change accidental VIR_WARNING back to VIR_DEBUG · dae3e246
      Laine Stump 提交于
      While debugging the support for responding to qemu RX_FILTER_CHANGED
      events, I had changed the "ignoring this event" log message from
      VIR_DEBUG to VIR_WARN, but forgot to change it back before
      pushing. Since many guest OSes make enough changes to multicast lists
      and/or promiscuous mode settings to trigger this message, it's
      starting to show up as a red herring in bug reports.
      dae3e246
  4. 23 3月, 2015 5 次提交
  5. 19 3月, 2015 1 次提交
    • J
      qemu: Fix two issues in qemuDomainSetVcpus error handling · e06e6f1e
      John Ferlan 提交于
      Issue #1 - A call to virBitmapNew did not check if the allocation
      failed which could lead to a NULL dereference
      
      Issue #2 - When deleting the pin entries from the config file, the
      code loops from the number of elements down to the "new" vcpu count;
      however, the pin id values are numbered 0..n-1 not 1..n, so the "first"
      pin attempt would never work. Luckily the check was for whether the
      incoming 'n' (vcpu id) matched the entry in the array from 0..arraysize
      rather than a dereference of the 'n' entry
      e06e6f1e
  6. 18 3月, 2015 3 次提交
    • M
      qemuGetDHCPInterfaces: Don't leak @network · 3353c7c4
      Michal Privoznik 提交于
      The function needs a pointer to the network to get list of DHCP
      leases. The pointer is obtained via virNetworkLookupByName() which
      requires callers to free the returned network once no longer needed.
      Otherwise it's leaked.
      Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
      3353c7c4
    • E
      qemu: read backing chain names from qemu · f9ea3d60
      Eric Blake 提交于
      https://bugzilla.redhat.com/show_bug.cgi?id=1199182 documents that
      after a series of disk snapshots into existing destination images,
      followed by active commits of the top image, it is possible for
      qemu 2.2 and earlier to end up tracking a different name for the
      image than what it would have had when opening the chain afresh.
      That is, when starting with the chain 'a <- b <- c', the name
      associated with 'b' is how it was spelled in the metadata of 'c',
      but when starting with 'a', taking two snapshots into 'a <- b <- c',
      then committing 'c' back into 'b', the name associated with 'b' is
      now the name used when taking the first snapshot.
      
      Sadly, older qemu doesn't know how to treat different spellings of
      the same filename as identical files (it uses strcmp() instead of
      checking for the same inode), which means libvirt's attempt to
      commit an image using solely the names learned from qcow2 metadata
      fails with a cryptic:
      
      error: internal error: unable to execute QEMU command 'block-commit': Top image file /tmp/images/c/../b/b not found
      
      even though the file exists.  Trying to teach libvirt the rules on
      which name qemu will expect is not worth the effort (besides, we'd
      have to remember it across libvirtd restarts, and track whether a
      file was opened via metadata or via snapshot creation for a given
      qemu process); it is easier to just always directly ask qemu what
      string it expects to see in the first place.
      
      As a safety valve, we validate that any name returned by qemu
      still maps to the same local file as we have tracked it, so that
      a compromised qemu cannot accidentally cause us to act on an
      incorrect file.
      
      * src/qemu/qemu_monitor.h (qemuMonitorDiskNameLookup): New
      prototype.
      * src/qemu/qemu_monitor_json.h (qemuMonitorJSONDiskNameLookup):
      Likewise.
      * src/qemu/qemu_monitor.c (qemuMonitorDiskNameLookup): New function.
      * src/qemu/qemu_monitor_json.c (qemuMonitorJSONDiskNameLookup)
      (qemuMonitorJSONDiskNameLookupOne): Likewise.
      * src/qemu/qemu_driver.c (qemuDomainBlockCommit)
      (qemuDomainBlockJobImpl): Use it.
      Signed-off-by: NEric Blake <eblake@redhat.com>
      f9ea3d60
    • P
      qemu: driver: Fix cold-update of removable storage devices · d0dc6c03
      Peter Krempa 提交于
      Only selected fields from the disk source were copied when cold updating
      source in a CDROM drive. When such drive was backed by a network file
      this resulted into corruption of the definition:
      
          <disk type='network' device='cdrom'>
            <driver name='qemu' type='raw' cache='none'/>
            <source protocol='gluster' name='gluster-vol1(null)'>
              <host name='localhost'/>
            </source>
            <target dev='vdc' bus='virtio'/>
            <readonly/>
            <address type='pci' domain='0x0000' bus='0x00' slot='0x0a' function='0x0'/>
          </disk>
      
      Update the whole source instead of cherry-picking elements.
      
      Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1166024
      d0dc6c03
  7. 17 3月, 2015 2 次提交
    • N
      domifaddr: Implement the API for qemu · 0977b8aa
      Nehal J Wani 提交于
      By querying the qemu guest agent with the QMP command
      "guest-network-get-interfaces" and converting the received JSON
      output to structured objects.
      
      Although "ifconfig" is deprecated, IP aliases created by "ifconfig"
      are supported by this API. The legacy syntax of an IP alias is:
      "<ifname>:<alias-name>". Since we want all aliases to be clubbed
      under parent interface, simply stripping ":<alias-name>" suffices.
      Note that IP aliases formed by "ip" aren't visible to "ifconfig",
      and aliases created by "ip" do not have any specific name. But
      we are lucky, as qemu guest agent detects aliases created by both.
      
      src/qemu/qemu_agent.h:
        * Define qemuAgentGetInterfaces
      
      src/qemu/qemu_agent.c:
        * Implement qemuAgentGetInterface
      
      src/qemu/qemu_driver.c:
        * New function qemuGetDHCPInterfaces
        * New function qemuDomainInterfaceAddresses
      
      src/remote_protocol-sructs:
        * Define new structs
      
      tests/qemuagenttest.c:
        * Add new test: testQemuAgentGetInterfaces
          Test cases for IP aliases, 0 or multiple ipv4/ipv6 address(es)
      Signed-off-by: NNehal J Wani <nehaljw.kkd1@gmail.com>
      0977b8aa
    • P
      qemu: block-commit: Mark disk in block jobs only on successful command · ee744b5b
      Peter Krempa 提交于
      Patch 51f9f03a introduces a regression
      where if a blockCommit operation fails the disk is still marked as being
      part of a block job but can't be unmarked later.
      ee744b5b
  8. 16 3月, 2015 13 次提交
  9. 12 3月, 2015 1 次提交
  10. 11 3月, 2015 5 次提交
  11. 09 3月, 2015 3 次提交