1. 11 2月, 2014 2 次提交
  2. 10 2月, 2014 2 次提交
    • P
      qemu: hyperv: Add support for timer enlightenments · 600bca59
      Peter Krempa 提交于
      Add a new <timer> for the HyperV reference time counter enlightenment
      and the iTSC reference page for Windows guests.
      
      This feature provides a paravirtual approach to track timer events for
      the guest (similar to kvmclock) with the option to use real hardware
      clock on systems with a iTSC with compensation across various hosts.
      600bca59
    • P
      schema: Fix guest timer specification schema according to the docs · bbd392ff
      Peter Krempa 提交于
      According to the documentation describing various tunables for domain
      timers not all the fields are supported by all the driver types. Express
      these in the RNG:
      
      - rtc, platform: Only these support the "track" attribute.
      - tsc: only one to support "frequency" and "mode" attributes
      - hpet, pit: tickpolicy/catchup attribute/element
      - kvmclock: no extra attributes are supported
      
      Additionally the attributes of the <catchup> element for
      tickpolicy='catchup' are optional according to the parsing code. Express
      this in the XML and fix a spurious space added while formatting the
      <catchup> element and add tests for it.
      bbd392ff
  3. 05 2月, 2014 2 次提交
    • L
      network: disallow <bandwidth>/<mac> for bridged/macvtap/hostdev networks · eafb53fe
      Laine Stump 提交于
      https://bugzilla.redhat.com/show_bug.cgi?id=1057321
      
      pointed out that we weren't honoring the <bandwidth> element in
      libvirt networks using <forward mode='bridge'/>. In fact, these
      networks are just a method of giving a libvirt network name to an
      existing Linux host bridge on the system, and libvirt doesn't have
      enough information to know where to set such limits. We are working on
      a method of supporting network bandwidths for some specific cases of
      <forward mode='bridge'/>, but currently libvirt doesn't support it. So
      the proper thing to do now is just log an error when someone tries to
      put a <bandwidth> element in that type of network. (It's unclear if we
      will be able to do proper bandwidth limiting for macvtap networks, and
      most definitely we will not be able to support it for hostdev
      networks).
      
      While looking through the network XML documentation and comparing it
      to the networkValidate function, I noticed that we also ignore the
      presence of a mac address in the config in the same cases, rather than
      failing so that the user will understand that their desired action has
      not been taken.
      
      This patch updates networkValidate() (which is called any time a
      persistent network is defined, or a transient network created) to log
      an error and fail if it finds either a <bandwidth> or <mac> element
      and the network forward mode is anything except 'route'. 'nat', or
      nothing. (Yes, neither of those elements is acceptable for any macvtap
      mode, nor for a hostdev network).
      
      NB: This does *not* cause failure to start any existing network that
      contains one of those elements, so someone might have erroneously
      defined such a network in the past, and that network will continue to
      function unmodified. I considered it too disruptive to suddenly break
      working configs on the next reboot after a libvirt upgrade.
      eafb53fe
    • J
      Fix minor typo in governance doc · a6992f60
      Justin Clift 提交于
      While at it, also relinquish active commit rights:
      [x years between commits] is probably a poster child example of inactivity :)
      Signed-off-by: NEric Blake <eblake@redhat.com>
      a6992f60
  4. 04 2月, 2014 1 次提交
  5. 30 1月, 2014 2 次提交
    • P
      docs/page.xls: remove unnecessary namespace attribute · fb321a00
      Pavel Hrdina 提交于
      It breaks the build on RHEL-5.10 and because it's only optional we
      could remove it from the code. The default namespace will be used.
      This hunk was introduced by commit 237a088b.
      Signed-off-by: NPavel Hrdina <phrdina@redhat.com>
      fb321a00
    • O
      qemu: Don't fail if the SCSI host device is shareable between domains · fd243fc4
      Osier Yang 提交于
      It doesn't make sense to fail if the SCSI host device is specified
      as "shareable" explicitly between domains (NB, it works if and only
      if the device is specified as "shareable" for *all* domains,
      otherwise it fails).
      
      To fix the problem, this patch introduces an array for virSCSIDevice
      struct, which records all the names of domain which are using the
      device (note that the recorded domains must specify the device as
      shareable).  And the change on the data struct brings on many
      subsequent changes in the code.
      
      Prior to this patch, the "shareable" tag didn't work as expected,
      it actually work like "non-shareable".  So this patch also added notes
      in formatdomain.html to declare the fact.
      
      * src/util/virscsi.h:
        - Remove virSCSIDeviceGetUsedBy
        - Change definition of virSCSIDeviceGetUsedBy and virSCSIDeviceListDel
        - Add virSCSIDeviceIsAvailable
      
      * src/util/virscsi.c:
        - struct virSCSIDevice: Change "used_by" to be an array; Add
          "n_used_by" as the array count
        - virSCSIDeviceGetUsedBy: Removed
        - virSCSIDeviceFree: frees the "used_by" array
        - virSCSIDeviceSetUsedBy: Copy the domain name to avoid potential
          memory corruption
        - virSCSIDeviceIsAvailable: New
        - virSCSIDeviceListDel: Change the logic, for device which is already
          in the list, just remove the corresponding entry in "used_by". And
          since it's only used in one place, we can safely removing the code
          to find out the dev in the list first.
        - Copyright updating
      
      * src/libvirt_private.sys:
        - virSCSIDeviceGetUsedBy: Remove
        - virSCSIDeviceIsAvailable: New
      
      * src/qemu/qemu_hostdev.c:
        - qemuUpdateActiveScsiHostdevs: Check if the device existing before
          adding it to the list;
        - qemuPrepareHostdevSCSIDevices: Error out if the not all domains
          use the device as "shareable"; Also don't try to add the device
          to the activeScsiHostdevs list if it already there; And make
          more sensible error w.r.t the current "shareable" value in
          driver->activeScsiHostdevs.
        - qemuDomainReAttachHostScsiDevices: Change the logic according
          to the changes on helpers.
      Signed-off-by: NOsier Yang <jyang@redhat.com>
      fd243fc4
  6. 29 1月, 2014 1 次提交
    • P
      snapshot: Add support for specifying snapshot disk backing type · 7076b4b7
      Peter Krempa 提交于
      Add support for specifying various types when doing snapshots. This will
      later allow to do snapshots on network backed volumes. Disks of type
      'volume' are not supported by snapshots (yet).
      
      Also amend the test suite to check parsing of the various new disk
      types that can now be specified.
      7076b4b7
  7. 27 1月, 2014 1 次提交
  8. 21 1月, 2014 1 次提交
    • F
      spice: expose the QEMU disable file transfer option · 08d07e5f
      Francesco Romani 提交于
      spice-server offers an API to disable file transfer messages
      on the agent channel between the client and the guest.
      This is supported in qemu through the disable-agent-file-xfer option.
      
      This patch exposes this option to libvirt.
      Adds a new element 'filetransfer', with one property,
      'enable', which accepts a boolean.
      Default is enabled, for backward compatibility.
      
      Depends on the capability exported in the first patch of the series.
      Signed-off-by: NFrancesco Romani <fromani@redhat.com>
      08d07e5f
  9. 20 1月, 2014 1 次提交
  10. 18 1月, 2014 1 次提交
  11. 16 1月, 2014 2 次提交
    • D
      Release of libvirt-1.2.1 · 7b84b167
      Daniel Veillard 提交于
      * docs/news.html.in libvirt.spec.in: updated for the release
      * po/*.po*: updated localization from transifex and regenerated
      7b84b167
    • E
      docs: mention maintenance branches · 908903b3
      Eric Blake 提交于
      Mitre tried to assign us two separate CVEs for the fix for
      https://bugzilla.redhat.com/show_bug.cgi?id=1047577, on the
      grounds that the fixes were separated by more than an hour
      and thus triggered different hourly snapshots.  But we
      explicitly do NOT want to treat transient security bugs as
      CVEs if they can only be triggered by patches in libvirt.git
      but where the problem is cleaned up before a formal release.
      
      Meanwhile, I noticed that while our wiki mentioned maintenance
      branches and releases, our formal documentation did not.
      
      * docs/downloads.html.in: Contrast hourly snapshots with
      maintenance branches.
      Signed-off-by: NEric Blake <eblake@redhat.com>
      908903b3
  12. 11 1月, 2014 1 次提交
    • E
      schema: fix idmap validation · dd0dda2e
      Eric Blake 提交于
      When idmap was added to LXC, we forgot to cover it in the testsuite.
      The schema was missing an <element> layer, and as a result,
      virt-xml-validate was failing on valid dumpxml output.
      
      Reported by Eduard - Gabriel Munteanu on IRC.
      
      * docs/schemas/domaincommon.rng (idmap): Include <idmap> element,
      and support interleaves.
      * tests/lxcxml2xmldata/lxc-idmap.xml: New file.
      * tests/lxcxml2xmltest.c (mymain): Test it.
      Signed-off-by: NEric Blake <eblake@redhat.com>
      dd0dda2e
  13. 08 1月, 2014 1 次提交
  14. 07 1月, 2014 2 次提交
    • E
      maint: improve VIR_ERR_INVALID_CONN usage · db3dd082
      Eric Blake 提交于
      The datatype.c object checks could result in a message like:
      
      error: invalid connection pointer in no connection
      
      This consolidates all clients of this message to have uniform contents:
      
      error: invalid connection pointer in someFunc
      
      Note that virCheckConnectReturn raises an error immediately; in
      datatypes.c, where we don't need to raise the error (but instead
      just leave it in the thread-local setting), we use
      virCheckConnectGoto and the cleanup label instead.  Then, for
      consistency in that file, all subsequent error messages are
      touched to also use the cleanup error label.
      
      * src/datatypes.h (virCheckConnectReturn)
      (virCheckConnectGoto): New macros.
      * src/datatypes.c: Use new macro.
      * src/libvirt-qemu.c (virDomainQemuAttach): Likewise.
      (virLibConnError): Delete unused macro.
      * src/libvirt-lxc.c (virLibConnError): Likewise.
      * src/libvirt.c: Use new macro throughout.
      * docs/api_extension.html.in: Modernize documentation.
      Signed-off-by: NEric Blake <eblake@redhat.com>
      db3dd082
    • P
      AArch64: Porting of armv7l conditons to run qemu for aarch64. · 27e32e0f
      Pranavkumar Sawargaonkar 提交于
      AArch64 qemu has similar behavior as armv7l, like use of mmio etc.
      This patch adds similar bypass checks what we have for armv7l to aarch64.
      E.g. we are enabling mmio transport for Nicdev.
      Making addDefaultUSB and addDefaultMemballoon to false etc.
      
      V3:
      - Adding missing domain rng schema for aarcg64 and test case in
        testutilsqemu.c which was causing test suite failure
        while running make check.
      
      V2:
      - Added testcase to qemuxml2argvtest as suggested
        during review comments of V1.
      
      V1:
      - Initial patch.
      Signed-off-by: NAnup Patel <anup.patel@linaro.org>
      Signed-off-by: NPranavkumar Sawargaonkar <pranavkumar@linaro.org>
      27e32e0f
  15. 19 12月, 2013 1 次提交
  16. 17 12月, 2013 1 次提交
  17. 13 12月, 2013 2 次提交
  18. 10 12月, 2013 1 次提交
  19. 09 12月, 2013 1 次提交
  20. 06 12月, 2013 1 次提交
  21. 03 12月, 2013 1 次提交
  22. 02 12月, 2013 4 次提交
  23. 27 11月, 2013 1 次提交
  24. 26 11月, 2013 4 次提交
    • Y
      Fix three minor typos · 73a03e30
      Yuri Chornoivan 提交于
      73a03e30
    • E
      storage: add network-dir as new storage volume type · ecd881b7
      Eric Blake 提交于
      In the 'directory' and 'netfs' storage pools, a user can see
      both 'file' and 'dir' storage volume types, to know when they
      can descend into a subdirectory.  But in a network-based storage
      pool, such as the upcoming 'gluster' pool, we use 'network'
      instead of 'file', and did not have any counterpart for a
      directory until this patch.  Adding a new volume type
      'network-dir' is better than reusing 'dir', because it makes
      it clear that the only way to access 'network' volumes within
      that container is through the network mounting (leaving 'dir'
      for something accessible in the local file system).
      
      * include/libvirt/libvirt.h.in (virStorageVolType): Expand enum.
      * docs/formatstorage.html.in: Document it.
      * docs/schemasa/storagevol.rng (vol): Allow new value.
      * src/conf/storage_conf.c (virStorageVol): Use new value.
      * src/qemu/qemu_command.c (qemuBuildVolumeString): Fix client.
      * src/qemu/qemu_conf.c (qemuTranslateDiskSourcePool): Likewise.
      * tools/virsh-volume.c (vshVolumeTypeToString): Likewise.
      * src/storage/storage_backend_fs.c
      (virStorageBackendFileSystemVolDelete): Likewise.
      Signed-off-by: NEric Blake <eblake@redhat.com>
      ecd881b7
    • E
      storage: document gluster pool · ed5fa7f3
      Eric Blake 提交于
      Add support for a new <pool type='gluster'>, similar to
      RBD and Sheepdog.  Terminology wise, a gluster volume
      forms a libvirt storage pool, within the gluster volume,
      individual files are treated as libvirt storage volumes.
      
      * docs/schemas/storagepool.rng (poolgluster): New pool type.
      * docs/formatstorage.html.in: Document gluster.
      * docs/storage.html.in: Likewise, and contrast it with netfs.
      * tests/storagepoolxml2xmlin/pool-gluster.xml: New test.
      * tests/storagepoolxml2xmlout/pool-gluster.xml: Likewise.
      * tests/storagepoolxml2xmltest.c (mymain): Likewise.
      Signed-off-by: NEric Blake <eblake@redhat.com>
      ed5fa7f3
    • E
      storage: expose volume meta-type in XML · 1b5c8d4c
      Eric Blake 提交于
      I got annoyed at having to use both 'virsh vol-list $pool --details'
      AND 'virsh vol-dumpxml $vol $pool' to learn if I had populated
      the volume correctly.  Since two-thirds of the data present in
      virStorageVolGetInfo() already appears in virStorageVolGetXMLDesc(),
      this just adds the remaining piece of information, as:
      
      <volume type='...'>
        ...
      </volume>
      
      * docs/formatstorage.html.in: Document new <volume type=...>.
      * docs/schemas/storagevol.rng (vol): Add it to RelaxNG.
      * src/conf/storage_conf.h (virStorageVolTypeToString): Declare.
      * src/conf/storage_conf.c (virStorageVolTargetDefFormat): Output
      the metatype.
      (virStorageVolDefParseXML): Parse it, for unit tests.
      * tests/storagevolxml2xmlout/vol-*.xml: Update tests to match.
      Signed-off-by: NEric Blake <eblake@redhat.com>
      1b5c8d4c
  25. 25 11月, 2013 1 次提交
    • E
      storage: allow interleave in volume XML · f5580bd6
      Eric Blake 提交于
      The RNG grammar did not allow arbitrary interleaving, which makes
      it harder than necessary to create a new volume from handwritten XML.
      (Compare also to commit caf516db for pools).
      
      * docs/schemas/storagevol.rng: Support interleaving.
      * tests/storagevolxml2xmlin/vol-file-backing.xml: Test it.
      Signed-off-by: NEric Blake <eblake@redhat.com>
      f5580bd6
  26. 22 11月, 2013 2 次提交
    • M
      build: Don't fail on '&lt;' or '&gt;' with old xmllint · d96b08bb
      Martin Kletzander 提交于
      Older xmllint version don't allow such characters in datatype anyURI.
      In order not to change too much, I'm suggesting making a choice of
      anyURI or 'absPathName' which should be fine (checked with upstream
      and that old xmllint, both work fine).
      Signed-off-by: NMartin Kletzander <mkletzan@redhat.com>
      d96b08bb
    • E
      storage: use valid XML for awkward volume names · 6cc4d6a3
      Eric Blake 提交于
      $ touch /var/lib/libvirt/images/'a<b>c'
      $ virsh pool-refresh default
      $ virsh vol-dumpxml 'a<b>c' default | head -n2
      <volume>
        <name>a<b>c</name>
      
      Oops.  That's not valid XML.  And when we fix the XML
      generation, it fails RelaxNG validation.
      
      I'm also tired of seeing <key>(null)</key> in the example
      output for volume xml; while we used NULLSTR() to avoid
      a NULL deref rather than relying on glibc's printf
      extension behavior, it's even better if we avoid the issue
      in the first place.  But this requires being careful that
      we don't invalidate any storage backends that were relying
      on key being unassigned during virStoragVolCreateXML[From].
      
      I would have split this into two patches (one for escaping,
      one for avoiding <key>(null)</key>), but since they both
      end up touching a lot of the same test files, I ended up
      merging it into one.
      
      Note that this patch allows pretty much any volume name
      that can appear in a directory (excluding . and .. because
      those are special), but does nothing to change the current
      (unenforced) RelaxNG claim that pool names will consist
      only of letters, numbers, _, -, and +.  Tightening the C
      code to match RelaxNG patterns and/or relaxing the grammar
      to match the C code for pool names is a task for another
      day (but remember, we DID recently tighten C code for
      domain names to exclude a leading '.').
      
      * src/conf/storage_conf.c (virStoragePoolSourceFormat)
      (virStoragePoolDefFormat, virStorageVolTargetDefFormat)
      (virStorageVolDefFormat): Escape user-controlled strings.
      (virStorageVolDefParseXML): Parse key, for use in unit tests.
      * src/storage/storage_driver.c (storageVolCreateXML)
      (storageVolCreateXMLFrom): Ensure parsed key doesn't confuse
      volume creation.
      * docs/schemas/basictypes.rng (volName): Relax definition.
      * tests/storagepoolxml2xmltest.c (mymain): Test it.
      * tests/storagevolxml2xmltest.c (mymain): Likewise.
      * tests/storagepoolxml2xmlin/pool-dir-naming.xml: New file.
      * tests/storagepoolxml2xmlout/pool-dir-naming.xml: Likewise.
      * tests/storagevolxml2xmlin/vol-file-naming.xml: Likewise.
      * tests/storagevolxml2xmlout/vol-file-naming.xml: Likewise.
      * tests/storagevolxml2xmlout/vol-*.xml: Fix fallout.
      Signed-off-by: NEric Blake <eblake@redhat.com>
      6cc4d6a3