1. 06 3月, 2015 2 次提交
    • M
      domain_conf: Format <pvpanic/> without address correctly · b39b1397
      Michal Privoznik 提交于
      We have something like pvpanic device. However, in some cases it does
      not have any address assigned, in which case we produce this ugly XML
      (still valid though):
      
        <devices>
          <emulator>/usr/bin/qemu</emulator>
          ...
          <panic>
          </panic>
        </devices>
      
      Lets format "<panic/>" instead.
      Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
      b39b1397
    • P
      memtune: change the way how we store unlimited value · cf521fc8
      Pavel Hrdina 提交于
      There was a mess in the way how we store unlimited value for memory
      limits and how we handled values provided by user.  Internally there
      were two possible ways how to store unlimited value: as 0 value or as
      VIR_DOMAIN_MEMORY_PARAM_UNLIMITED.  Because we chose to store memory
      limits as unsigned long long, we cannot use -1 to represent unlimited.
      It's much easier for us to say that everything greater than
      VIR_DOMAIN_MEMORY_PARAM_UNLIMITED means unlimited and leave 0 as valid
      value despite that it makes no sense to set limit to 0.
      
      Remove unnecessary function virCompareLimitUlong.  The update of test
      is to prevent the 0 to be miss-used as unlimited in future.
      
      Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1146539Signed-off-by: NPavel Hrdina <phrdina@redhat.com>
      cf521fc8
  2. 05 3月, 2015 3 次提交
  3. 04 3月, 2015 2 次提交
  4. 03 3月, 2015 3 次提交
    • P
      8672a1e4
    • P
      schema: Fix interface link state schema · 8eb907b8
      Peter Krempa 提交于
      In commit edd1295e I've introduced an
      XML element that allows to configure state of the network interface
      link. Somehow the RNG schema hunk ended up in a weird place in the
      network schema definition. Move it to the right place and add a test
      case.
      
      Note that the link state is set up via the monitor at VM startup so I
      originally didn't think of adding a test case.
      
      Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1173468
      8eb907b8
    • J
      disk: Disallow duplicated target 'dev' values · e0e29055
      John Ferlan 提交于
      https://bugzilla.redhat.com/show_bug.cgi?id=1142631
      
      This patch resolves a situation where the same "<target dev='$name'...>"
      can be used for multiple disks in the domain.
      
      While the $name is "mostly" advisory regarding the expected order that
      the disk is added to the domain and not guaranteed to map to the device
      name in the guest OS, it still should be unique enough such that other
      domblk* type operations can be performed.
      
      Without the patch, the domblklist will list the same Target twice:
      
      $ virsh domblklist $dom
      Target     Source
      ------------------------------------------------
      sda        /var/lib/libvirt/images/file.qcow2
      sda        /var/lib/libvirt/images/file.img
      
      Additionally, getting domblkstat, domblkerror, domblkinfo, and other block*
      type calls will not be able to reference the second target.
      
      Fortunately, hotplug disallows adding a "third" sda value:
      
      $ qemu-img create -f raw /var/lib/libvirt/images/file2.img 10M
      $ virsh attach-disk $dom /var/lib/libvirt/images/file2.img sda
      error: Failed to attach disk
      error: operation failed: target sda already exists
      
      $
      
      BUT, it since 'sdb' doesn't exist one would get the following on the same
      hotplug attempt, but changing to use 'sdb' instead of 'sda'
      
      $ virsh attach-disk $dom /var/lib/libvirt/images/file2.img sdb
      error: Failed to attach disk
      error: internal error: unable to execute QEMU command 'device_add': Duplicate ID 'scsi0-0-1' for device
      
      $
      
      Since we cannot fix this issue at parsing time, the best that can be done so
      as to not "lose" a domain is to make the check prior to starting the guest
      with the results as follows:
      
      $ virsh start $dom
      error: Failed to start domain $dom
      error: XML error: target 'sda' duplicated for disk sources '/var/lib/libvirt/images/file.qcow2' and '/var/lib/libvirt/images/file.img'
      
      $
      
      Running 'make check' found a few more instances in the tests where this
      duplicated target dev value was being used. These also exhibited some
      duplicated 'id=' values (negating the uniqueness argument of aliases) in
      the corresponding .args file and of course the *xmlout version of a few
      input XML files.
      e0e29055
  5. 02 3月, 2015 6 次提交
  6. 26 2月, 2015 1 次提交
    • L
      qemu: fix ifindex array reported to systemd · 4bbe1029
      Laine Stump 提交于
      Commit f7afeddc added code to report to systemd an array of interface
      indexes for all tap devices used by a guest. Unfortunately it not only
      didn't add code to report the ifindexes for macvtap interfaces
      (interface type='direct') or the tap devices used by type='ethernet',
      it ended up sending "-1" as the ifindex for each macvtap or hostdev
      interface. This resulted in a failure to start any domain that had a
      macvtap or hostdev interface (or actually any type other than
      "network" or "bridge").
      
      This patch does the following with the nicindexes array:
      
      1) Modify qemuBuildInterfaceCommandLine() to only fill in the
      nicindexes array if given a non-NULL pointer to an array (and modifies
      the test jig calls to the function to send NULL). This is because
      there are tests in the test suite that have type='ethernet' and still
      have an ifname specified, but that device of course doesn't actually
      exist on the test system, so attempts to call virNetDevGetIndex() will
      fail.
      
      2) Even then, only add an entry to the nicindexes array for
      appropriate types, and to do so for all appropriate types ("network",
      "bridge", and "direct"), but only if the ifname is known (since that
      is required to call virNetDevGetIndex().
      4bbe1029
  7. 25 2月, 2015 2 次提交
  8. 24 2月, 2015 1 次提交
  9. 21 2月, 2015 6 次提交
  10. 20 2月, 2015 2 次提交
    • P
      virsh: fix vcpupin info · 81dd81e4
      Pavel Hrdina 提交于
      The "virDomainGetInfo" will get for running domain only live info and for
      offline domain only config info. There was no way how to get config info
      for running domain. We will use "vshCPUCountCollect" instead to get the
      correct cpu count that we need to pass to "virDomainGetVcpuPinInfo".
      
      Also cleanup some unnecessary variables and checks that are done by
      drivers.
      
      Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1160559Signed-off-by: NPavel Hrdina <phrdina@redhat.com>
      81dd81e4
    • M
      virQEMUCapsCacheLookupCopy: Filter qemuCaps based on machineType · af204232
      Michal Privoznik 提交于
      Not all machine types support all devices, device properties, backends,
      etc. So until we create a matrix of [machineType, qemuCaps], lets just
      filter out some capabilities before we return them to the consumer
      (which is going to make decisions based on them straight away).
      Currently, as qemu is unable to tell which capabilities are (not)
      enabled for given machine types, it's us who has to hardcode the matrix.
      One day maybe the hardcoding will go away and we can create the matrix
      dynamically on the fly based on a few monitor calls.
      Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
      af204232
  11. 17 2月, 2015 2 次提交
    • M
      qemuBuildMemoryBackendStr: Report backend requirement more appropriately · 7832fac8
      Michal Privoznik 提交于
      So, when building the '-numa' command line, the
      qemuBuildMemoryBackendStr() function does quite a lot of checks to
      chose the best backend, or to check if one is in fact needed. However,
      it returned that backend is needed even for this little fella:
      
        <numatune>
          <memory mode="strict" nodeset="0,2"/>
        </numatune>
      
      This can be guaranteed via CGroups entirely, there's no need to use
      memory-backend-ram to let qemu know where to get memory from. Well, as
      long as there's no <memnode/> element, which explicitly requires the
      backend. Long story short, we wouldn't have to care, as qemu works
      either way. However, the problem is migration (as always). Previously,
      libvirt would have started qemu with:
      
        -numa node,memory=X
      
      in this case and restricted memory placement in CGroups. Today, libvirt
      creates more complicated command line:
      
        -object memory-backend-ram,id=ram-node0,size=X
        -numa node,memdev=ram-node0
      
      Again, one wouldn't find anything wrong with these two approaches.
      Both work just fine. Unless you try to migrated from the older libvirt
      into the newer one. These two approaches are, unfortunately, not
      compatible. My suggestion is, in order to allow users to migrate, lets
      use the older approach for as long as the newer one is not needed.
      Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
      7832fac8
    • M
      qemuxml2argvtest: Fake response from numad · 38064806
      Michal Privoznik 提交于
      Well, we can pretend that we've asked numad for its suggestion and let
      qemu command line be built with that respect. Again, this alone has no
      big value, but see later commits which build on the top of this.
      Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
      38064806
  12. 13 2月, 2015 1 次提交
  13. 12 2月, 2015 1 次提交
  14. 11 2月, 2015 3 次提交
  15. 10 2月, 2015 3 次提交
  16. 06 2月, 2015 1 次提交
  17. 04 2月, 2015 1 次提交