1. 11 2月, 2014 1 次提交
  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. 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
  4. 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
  5. 20 1月, 2014 1 次提交
  6. 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
  7. 07 1月, 2014 1 次提交
  8. 19 12月, 2013 1 次提交
  9. 13 12月, 2013 2 次提交
  10. 06 12月, 2013 1 次提交
  11. 26 11月, 2013 3 次提交
    • 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
  12. 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
  13. 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
  14. 14 11月, 2013 1 次提交
    • E
      storage: fix RNG validation of gluster via netfs · 887dd362
      Eric Blake 提交于
      While trying to compare netfs against my new gluster pool, I
      discovered two things:
      
      virt-xml-validate chokes on valid xml produced by 'virsh pool-dumpxml'
      [yet another reason that ALL patches that add new xml should be adding
      corresponding tests]
      
      When using glusterfs FUSE mounts, you cannot access a subdirectory
      of a gluster volume.  The recommended workaround in the gluster
      community is to mount the volume to an intermediate location, then
      bind-mount the desired subdirectory to the final location.  Maybe
      we should teach libvirt to do bind-mounting, but for now I chose to
      just document the limitation.
      
      * docs/storage.html.in: Improve documentation.
      * docs/schemas/storagepool.rng (sourcefmtnetfs): Allow all
      formats, and drop redundant info-vendor.
      * tests/storagepoolxml2xmltest.c (mymain): New test.
      * tests/storagepoolxml2xmlin/pool-netfs-gluster.xml: New file.
      * tests/storagepoolxml2xmlout/pool-netfs-gluster.xml: Likewise.
      Signed-off-by: NEric Blake <eblake@redhat.com>
      887dd362
  15. 08 11月, 2013 2 次提交
  16. 29 10月, 2013 1 次提交
    • G
      capabilities: add baselabel per sec driver/virt type to secmodel · b51038a4
      Giuseppe Scrivano 提交于
      Expand the "secmodel" XML fragment of "host" with a sequence of
      baselabel's which describe the default security context used by
      libvirt with a specific security model and virtualization type:
      
      <secmodel>
        <model>selinux</model>
        <doi>0</doi>
        <baselabel type='kvm'>system_u:system_r:svirt_t:s0</baselabel>
        <baselabel type='qemu'>system_u:system_r:svirt_tcg_t:s0</baselabel>
      </secmodel>
      <secmodel>
        <model>dac</model>
        <doi>0</doi>
        <baselabel type='kvm'>107:107</baselabel>
        <baselabel type='qemu'>107:107</baselabel>
      </secmodel>
      
      "baselabel" is driver-specific information, e.g. in the DAC security
      model, it indicates USER_ID:GROUP_ID.
      Signed-off-by: NGiuseppe Scrivano <gscrivan@redhat.com>
      Signed-off-by: NEric Blake <eblake@redhat.com>
      b51038a4
  17. 17 10月, 2013 1 次提交
    • E
      storage: allow interleave in pool XML · caf516db
      Eric Blake 提交于
      The RNG grammar did not allow arbitrary interleaving, which makes
      it harder than necessary to create a new pool from handwritten XML.
      
      * docs/schemas/storagepool.rng: Allow interleaving.
      * tests/storagepoolxml2xmlin/pool-sheepdog.xml: Test interleave.
      * tests/storagepoolxml2xmlin/pool-iscsi-auth.xml: Likewise.
      Signed-off-by: NEric Blake <eblake@redhat.com>
      caf516db
  18. 16 10月, 2013 1 次提交
  19. 15 10月, 2013 1 次提交
  20. 09 10月, 2013 1 次提交
    • J
      LXC: Fix handling of RAM filesystem size units · 3f029fb5
      Ján Tomko 提交于
      Since 76b644c3 when the support for RAM filesystems was introduced,
      libvirt accepted the following XML:
      <source usage='1024' unit='KiB'/>
      
      This was parsed correctly and internally stored in bytes, but it
      was formatted as (with an extra 's'):
      <source usage='1024' units='KiB'/>
      When read again, this was treated as if the units were missing,
      meaning libvirt was unable to parse its own XML correctly.
      
      The usage attribute was documented as being in KiB, but it was not
      scaled if the unit was missing. Transient domains still worked,
      because this was balanced by an extra 'k' in the mount options.
      
      This patch:
      Changes the parser to use 'units' instead of 'unit', as the latter
      was never documented (fixing persistent domains) and some programs
      (libvirt-glib, libvirt-sandbox) already parse the 'units' attribute.
      
      Removes the extra 'k' from the tmpfs mount options, which is needed
      because now we parse our own XML correctly.
      
      Changes the default input unit to KiB to match documentation, fixing:
      https://bugzilla.redhat.com/show_bug.cgi?id=1015689
      3f029fb5
  21. 04 10月, 2013 1 次提交
    • J
      nodedev: Resolve Relax-NG validity error · 0bdefd9b
      John Ferlan 提交于
      Commit id 'c4a4603d' added an output <path> to the nodedev xml, but
      did not update the schema.
      
      This resulted in the failure of the 'virt-xml-validate' on a file
      generated by 'virsh nodedev-dumpxml pci_0000_00_00_0' (for example).
      
      This was found/seen by running autotest on my host.
      0bdefd9b
  22. 25 9月, 2013 1 次提交
  23. 18 9月, 2013 2 次提交
  24. 17 9月, 2013 3 次提交
  25. 05 9月, 2013 1 次提交
  26. 03 9月, 2013 2 次提交
  27. 02 9月, 2013 1 次提交
    • F
      qemu: Support setting the 'removable' flag for USB disks · feba2feb
      Fred A. Kemp 提交于
      Add an attribute named 'removable' to the 'target' element of disks,
      which controls the removable flag. For instance, on a Linux guest it
      controls the value of /sys/block/$dev/removable. This option is only
      valid for USB disks (i.e. bus='usb'), and its default value is 'off',
      which is the same behaviour as before.
      
      To achieve this, 'removable=on' (or 'off') is appended to the '-device
      usb-storage' parameter sent to qemu when adding a USB disk via
      '-disk'. A capability flag QEMU_CAPS_USB_STORAGE_REMOVABLE was added
      to keep track if this option is supported by the qemu version used.
      
      Bug: https://bugzilla.redhat.com/show_bug.cgi?id=922495Signed-off-by: NPeter Krempa <pkrempa@redhat.com>
      feba2feb
  28. 27 8月, 2013 3 次提交
    • J
      Add pcihole64 element to root PCI controllers · 01cda918
      Ján Tomko 提交于
      <controller type='pci' index='0' model='pci-root'>
        <pcihole64 unit='KiB'>1048576</pcihole64>
      </controller>
      
      It can be used to adjust (or disable) the size of the 64-bit
      PCI hole. The size attribute is in kilobytes (different unit
      can be specified on input), but it gets rounded up to
      the nearest GB by QEMU.
      
      Disabling it will be needed for guests that crash with the
      64-bit PCI hole (like Windows XP), see:
      https://bugzilla.redhat.com/show_bug.cgi?id=990418
      01cda918
    • A
      Add ftp protocol support for cdrom disk · 796513d7
      Aline Manera 提交于
      The ftp protocol is already recognized by qemu/KVM so add this support to
      libvirt as well.
      The xml should be as following:
      
           <disk type='network' device='cdrom'>
             <source protocol='ftp' name='/url/path'>
               <host name='host.name' port='21'/>
             </source>
           </disk>
      Signed-off-by: NAline Manera <alinefm@br.ibm.com>
      796513d7
    • A
      Add http protocol support for cdrom disk · 3485ce4e
      Aline Manera 提交于
      QEMU/KVM already allows a HTTP URL for the cdrom ISO image so add this support
      to libvirt as well.
      The xml should be as following:
      
          <disk type='network' device='cdrom'>
            <source protocol='http' name='/url/path'>
              <host name='host.name' port='80'/>
            </source>
          </disk>
      Signed-off-by: NAline Manera <alinefm@br.ibm.com>
      3485ce4e