1. 12 6月, 2013 1 次提交
  2. 22 5月, 2013 2 次提交
    • M
      Introduce /domain/devices/interface/driver/@queues attribute · 7e744f81
      Michal Privoznik 提交于
      This attribute is going to represent number of queues for
      multique vhost network interface. This commit implements XML
      extension part of the feature and add one test as well. For now,
      we can only do xml2xml test as qemu command line generation code
      is not adapted yet.
      7e744f81
    • G
      conf: add 'sharePolicy' attribute to graphics element for vnc · 2a58d076
      Guannan Ren 提交于
       -vnc :5900,share=allow-exclusive
      allows clients to ask for exclusive access which is
      implemented by dropping other connections Connecting
      multiple clients in parallel requires all clients asking
      for a shared session (vncviewer: -shared switch)
      
       -vnc :5900,share=force-shared
      disables exclusive client access.  Useful for shared
      desktop sessions, where you don't want someone forgetting
      specify -shared disconnect everybody else.
      
       -vnc :5900,share=ignore
      completely ignores the shared flag and allows everybody
      connect unconditionally
      2a58d076
  3. 21 5月, 2013 1 次提交
    • E
      maint: use LGPL correctly · d7f53c7b
      Eric Blake 提交于
      Several files called out COPYING or COPYING.LIB instead of using
      the normal boilerplate.  It's especially important that we don't
      call out COPYING from an LGPL file, since COPYING is traditionally
      used for the GPL.  A few files were lacking copyright altogether.
      
      * src/rpc/gendispatch.pl: Add missing copyright.
      * Makefile.nonreentrant: Likewise.
      * src/check-symfile.pl: Likewise.
      * src/check-symsorting.pl: Likewise.
      * src/driver.h: Likewise.
      * src/internal.h: Likewise.
      * tools/libvirt-guests.sh.in: Likewise.
      * tools/virt-pki-validate.in: Mention copyright in comment, not just code.
      * tools/virt-sanlock-cleanup.in: Likewise.
      * src/rpc/genprotocol.pl: Spell out license terms.
      * src/xen/xend_internal.h: Likewise.
      * src/xen/xend_internal.c: Likewise.
      * Makefile.am: Likewise.
      * daemon/Makefile.am: Likewise.
      * docs/Makefile.am: Likewise.
      * docs/schemas/Makefile.am: Likewise.
      * examples/apparmor/Makefile.am: Likewise.
      * examples/domain-events/events-c/Makefile.am: Likewise.
      * examples/dominfo/Makefile.am: Likewise.
      * examples/domsuspend/Makefile.am: Likewise.
      * examples/hellolibvirt/Makefile.am: Likewise.
      * examples/openauth/Makefile.am: Likewise.
      * examples/python/Makefile.am: Likewise.
      * examples/systemtap/Makefile.am: Likewise.
      * examples/xml/nwfilter/Makefile.am: Likewise.
      * gnulib/lib/Makefile.am: Likewise.
      * gnulib/tests/Makefile.am: Likewise.
      * include/Makefile.am: Likewise.
      * include/libvirt/Makefile.am: Likewise.
      * python/Makefile.am: Likewise.
      * python/tests/Makefile.am: Likewise.
      * src/Makefile.am: Likewise.
      * tests/Makefile.am: Likewise.
      * tools/Makefile.am: Likewise.
      * configure.ac: Likewise.
      Signed-off-by: NEric Blake <eblake@redhat.com>
      d7f53c7b
  4. 17 5月, 2013 5 次提交
  5. 16 5月, 2013 1 次提交
  6. 15 5月, 2013 3 次提交
    • O
      qemu: Support discard for disk · a7c4202c
      Osier Yang 提交于
      QEMU introduced "discard" option for drive since commit a9384aff53,
      
      <...>
      @var{discard} is one of "ignore" (or "off") or "unmap" (or "on") and
      controls whether @dfn{discard} (also known as @dfn{trim} or @dfn{unmap})
      requests are ignored or passed to the filesystem.  Some machine types
      may not support discard requests.
      </...>
      
      This patch exposes the support in libvirt.
      
      QEMU supported "discard" for "-drive" since v1.5.0-rc0:
      
      % git tag --contains a9384aff53
      contains
      v1.5.0-rc0
      v1.5.0-rc1
      
      So this only detects the capability bit using virQEMUCapsProbeQMPCommandLine.
      a7c4202c
    • M
      Add VNC WebSocket support · f1ad8d20
      Martin Kletzander 提交于
      Adding support for new attribute 'websocket' in the '<graphics>'
      element, the attribute value is the port to listen on with '-1'
      meaning auto-allocation, '0' meaning no websockets.
      f1ad8d20
    • O
      qemu: New XML to disable memory merge at guest startup · 77b54b96
      Osier Yang 提交于
      QEMU introduced command line "-mem-merge=on|off" (defaults to on) to
      enable/disable the memory merge (KSM) at guest startup. This exposes
      it by new XML:
        <memoryBacking>
          <nosharepages/>
        </memoryBacking>
      
      The XML tag is same with what we used internally for old RHEL.
      77b54b96
  7. 14 5月, 2013 1 次提交
    • G
      Support for static routes on a virtual bridge · ccff335f
      Gene Czarcinski 提交于
      network: static route support for <network>
      
      This patch adds the <route> subelement of <network> to define a static
      route.  the address and prefix (or netmask) attribute identify the
      destination network, and the gateway attribute specifies the next hop
      address (which must be directly reachable from the containing
      <network>) which is to receive the packets destined for
      "address/(prefix|netmask)".
      
      These attributes are translated into an "ip route add" command that is
      executed when the network is started. The command used is of the
      following form:
      
        ip route add <address>/<prefix> via <gateway> \
                     dev <virbr-bridge> proto static metric <metric>
      
      Tests are done to validate that the input data are correct.  For
      example, for a static route ip definition, the address must be a
      network address and not a host address.  Additional checks are added
      to ensure that the specified gateway is directly reachable via this
      network (i.e. that the gateway IP address is in the same subnet as one
      of the IP's defined for the network).
      
      prefix='0' is supported for both family='ipv4' address='0.0.0.0'
      netmask='0.0.0.0' or prefix='0', and for family='ipv6' address='::',
      prefix=0', although care should be taken to not override a desired
      system default route.
      
      Anytime an attempt is made to define a static route which *exactly*
      duplicates an existing static route (for example, address=::,
      prefix=0, metric=1), the following error message will be sent to
      syslog:
      
          RTNETLINK answers: File exists
      
      This can be overridden by decreasing the metric value for the route
      that should be preferred, or increasing the metric for the route that
      shouldn't be preferred (and is thus in place only in anticipation that
      the preferred route may be removed in the future).  Caution should be
      used when manipulating route metrics, especially for a default route.
      
      Note: The use of the command-line interface should be replaced by
      direct use of libnl so that error conditions can be handled better.  But,
      that is being left as an exercise for another day.
      Signed-off-by: NGene Czarcinski <gene@czarc.net>
      Signed-off-by: NLaine Stump <laine@laine.org>
      ccff335f
  8. 13 5月, 2013 5 次提交
    • D
      Add 'nbd' as a valid filesystem driver type · 13579d45
      Daniel P. Berrange 提交于
      The <filesystem> element can now accept a <driver type='nbd'/>
      as an alternative to 'loop'. The benefit of NBD is support
      for non-raw disk image formats.
      Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
      13579d45
    • D
      Add support for storage format in FS <driver> · ada14b86
      Daniel P. Berrange 提交于
      Extend the <driver> element in filesystem devices to
      allow a storage format to be set. The new attribute
      uses 'format' to reflect the storage format. This is
      different from the <driver> element in disk devices
      which use 'type' to reflect the storage format. This
      is because the 'type' attribute on filesystem devices
      is already used for the driver backend, for which the
      disk devices use the 'name' attribute. Arggggh.
      
      Anyway for disks we have
      
         <driver name="qemu" type="raw"/>
      
      And for filesystems this change means we now have
      
         <driver type="loop" format="raw"/>
      Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
      ada14b86
    • O
      Introduce <readonly> for hostdev · f4bb7b48
      Osier Yang 提交于
      Since it's generic enough to be used by other types in future, I
      put it in <hostdev> as sub-element, though now it's only used by
      scsi host device.
      f4bb7b48
    • O
      rng: Interleave hostdev elements · dcd632af
      Osier Yang 提交于
      dcd632af
    • H
      conf: Generic XMLs for scsi hostdev · 5c811dce
      Han Cheng 提交于
      An example of the scsi hostdev XML:
      
          <hostdev mode='subsystem' type='scsi'>
            <source>
              <adapter name='scsi_host0'/>
              <address bus='0' target='0' unit='0'/>
            </source>
            <address type='drive' controller='0' bus='0' target='4' unit='8'/>
          </hostdev>
      
      Controller is implicitly added for scsi hostdev, though the scsi
      controller's model defaults to "lsilogic", which might be not what
      the user wants (same problem exists for virtio-scsi disk). It's
      the existing problem, will be addressed later.
      
      The device address must be specified manually. Later patch will let
      libvirt generate it automatically.
      
      This only introduces the generic XMLs for scsi hostdev, later patches
      will add other elements, e.g. <readonly>, <shareable>.
      Signed-off-by: NHan Cheng <hanc.fnst@cn.fujitsu.com>
      Signed-off-by: NOsier Yang <jyang@redhat.com>
      5c811dce
  9. 26 4月, 2013 1 次提交
    • L
      conf: formatter/parser/RNG/docs for hostdev <driver name='kvm|vfio'/> · c4f63ef0
      Laine Stump 提交于
      A domain's <interface> or <hostdev>, as well as a <network>'s
      <forward>, can now have an optional <driver name='kvm|vfio'/>
      element. As of this patch, there is no functionality behind this new
      knob - this patch adds support to the domain and network
      formatter/parser, and to the RNG and documentation.
      
      When the backend is added, legacy KVM PCI device assignment will
      continue to be used when no driver name is specified (or if <driver
      name='kvm'/> is specified), but if driver name is 'vfio', the new UEFI
      Secure Boot compatible VFIO device assignment will be used.
      
      Note that the parser doesn't automatically insert the current default
      value of this setting. This is done on purpose because the two
      possibilities are functionally equivalent from the guest's point of
      view, and we want to be able to automatically start using vfio as the
      default (even for existing domains) at some time in the future. This
      is similar to what was done with the "vhost" driver option in
      <interface>.
      c4f63ef0
  10. 25 4月, 2013 3 次提交
    • J
      conf: add PCI controllers · df0ebf6b
      Ján Tomko 提交于
      Add new controller type 'pci' with models 'pci-root' and 'pci-bridge'.
      df0ebf6b
    • L
      Add NVRAM device · bf188873
      Li Zhang 提交于
      For pSeries guest in QEMU, NVRAM is one kind of spapr-vio device.
      Users are allowed to specify spapr-vio devices'address.
      But NVRAM is not supported in libvirt. So this patch is to
      add NVRAM device to allow users to specify its address.
      
      In QEMU, NVRAM device's address is specified by
       "-global spapr-nvram.reg=xxxxx".
      
      In libvirt, XML file is defined as the following:
      
        <nvram>
          <address type='spapr-vio' reg='0x3000'/>
        </nvram>
      Signed-off-by: NLi Zhang <zhlcindy@linux.vnet.ibm.com>
      bf188873
    • O
      Introduce a sub-element <driver> for controller · 45d6c671
      Osier Yang 提交于
      Like what we did for "disk", "filesystem" and "interface", this
      introduces sub-element <driver> for "controller", and put the "queues"
      into it.
      45d6c671
  11. 24 4月, 2013 1 次提交
    • O
      Change the tag name "num_queues" into "queues" · 18b42898
      Osier Yang 提交于
      Instead of making a choice between the underscore and camelCase, this
      simply changes "num_queues" into "queues", which is also consistent
      with Michal's multiple queue support for interface.
      18b42898
  12. 18 4月, 2013 1 次提交
    • L
      rng: tighten up domain <controller> schema · 0f4f5cb2
      Laine Stump 提交于
      The rng schema for <controller> had been non-specific about which
      types of controllers allowed which models, and also allowed the
      num_queues attribute (since that hasn't been released yet, should we
      rename it to "numQueues"?) and <master> subelement to be included for
      any controller type. In reality, half of the models are allowed only
      for type='scsi', and the other half only for type='usb', num_queues is
      allowed only for type='scsi', and <master> only for type='usb'.
      
      This patch makes a separate <group> for type='scsi' and type='usb',
      with each group allowing only the appropriate model values, and
      allowing num_queue and <master> only when appropriate.
      
      <interleave> also hadn't been specified, forcing a specific order of
      subelements, which should never be done. (Note that the <interleave>
      had to surround the main element attributes that are in the <group>
      subelements, due to one of the <group>s containing a subelement).
      0f4f5cb2
  13. 17 4月, 2013 1 次提交
    • O
      qemu: Allow the disk wwn to have "0x" prefix · 09d2547f
      Osier Yang 提交于
      The recent qemu requires "0x" prefix for the disk wwn, this patch
      changes virValidateWWN to allow the prefix, and prepend "0x" if
      it's not specified. E.g.
      
      qemu-kvm: -device scsi-hd,bus=scsi0.0,channel=0,scsi-id=0,lun=0,\
      drive=drive-scsi0-0-0-0,id=scsi0-0-0-0,wwn=6000c60016ea71ad:
      Property 'scsi-hd.wwn' doesn't take value '6000c60016ea71ad'
      
      Though it's a qemu regression, but it's nice to allow the prefix,
      and doesn't hurt for us to always output "0x".
      09d2547f
  14. 16 4月, 2013 1 次提交
  15. 13 4月, 2013 1 次提交
  16. 09 4月, 2013 2 次提交
  17. 08 4月, 2013 4 次提交
    • O
      Support seclabels for volume type disk · 664270b8
      Osier Yang 提交于
      "seclabels" is only valid for 'file' or 'block' type storage volume.
      664270b8
    • O
      Support startupPolicy for 'volume' disk · 43404fee
      Osier Yang 提交于
      "startupPolicy" is only valid for file type storage volume, otherwise
      it fails on starting the domain.
      43404fee
    • O
      Introduce new XMLs to specify disk source using libvirt storage · 4bc331c8
      Osier Yang 提交于
      With this patch, one can specify the disk source using libvirt
      storage like:
      
        <disk type='volume' device='disk'>
          <driver name='qemu' type='raw' cache='none'/>
          <source pool='default' volume='fc18.img'/>
          <target dev='vdb' bus='virtio'/>
        </disk>
      
      "seclabels" and "startupPolicy" are not supported for this new
      disk type ("volume"). They will be supported in later patches.
      
      docs/formatdomain.html.in:
        * Add documents for new XMLs
      docs/schemas/domaincommon.rng:
        * Add rng for new XMLs;
      src/conf/domain_conf.h:
        * New struct for 'volume' type disk source (virDomainDiskSourcePoolDef)
        * Add VIR_DOMAIN_DISK_TYPE_VOLUME for enum virDomainDiskType
      src/conf/domain_conf.c:
        * New helper virDomainDiskSourcePoolDefParse to parse the 'volume'
          type disk source.
        * New helper virDomainDiskSourcePoolDefFree to free the source def
          if 'volume' type disk.
      tests/qemuxml2argvdata/qemuxml2argv-disk-source-pool.xml:
      tests/qemuxml2xmltest.c:
        * New test
      4bc331c8
    • O
      New XML attributes for storage pool source adapter · 9f781da6
      Osier Yang 提交于
      This introduces 4 new attributes for storage pool source adapter.
      E.g.
      
      <adapter type='fc_host' parent='scsi_host5' wwnn='20000000c9831b4b' wwpn='10000000c9831b4b'/>
      
      Attribute 'type' can be either 'scsi_host' or 'fc_host', and defaults
      to 'scsi_host' if attribute 'name' is specified. I.e. It's optional
      for 'scsi_host' adapter, for back-compat reason. However, mandatory
      for 'fc_host' adapter and any new future adapter types. Attribute
      'parent' is to specify the parent for the fc_host adapter.
      
      * docs/formatstorage.html.in:
        - Add documents for the 4 new attrs
      * docs/schemas/storagepool.rng:
        - Add RNG schema
      * src/conf/storage_conf.c:
        - Parse and format the new XMLs
      * src/conf/storage_conf.h:
        - New struct virStoragePoolSourceAdapter, replace "char *adapter" with it;
        - New enum virStoragePoolSourceAdapterType
      * src/libvirt_private.syms:
        - Export TypeToString and TypeFromString
      * src/phyp/phyp_driver.c:
        - Replace "adapter" with "adapter.data.name", which is member of the union
          of the new struct virStoragePoolSourceAdapter now. Later patch will
          add the checking, as "adapter.data.name" is only valid for "scsi_host"
          adapter.
      * src/storage/storage_backend_scsi.c:
        - Like above
      * tests/storagepoolxml2xmlin/pool-scsi-type-scsi-host.xml:
      * tests/storagepoolxml2xmlin/pool-scsi-type-fc-host.xml:
        - New test for 'fc_host' and "scsi_host" adapter
      * tests/storagepoolxml2xmlout/pool-scsi.xml:
        - Change the expected output, as the 'type' defaults to 'scsi_host' if 'name"
          specified now
      * tests/storagepoolxml2xmlout/pool-scsi-type-scsi-host.xml:
      * tests/storagepoolxml2xmlout/pool-scsi-type-fc-host.xml:
        - New test
      * tests/storagepoolxml2xmltest.c:
        - Include the test
      9f781da6
  18. 06 4月, 2013 1 次提交
    • O
      qemu: Support multiple queue virtio-scsi · d4bf0a93
      Osier Yang 提交于
      This introduce a new attribute "num_queues" (same with the good name
      QEMU uses) for virtio-scsi controller. An example of the XML:
      
      <controller type='scsi' index='0' model='virtio-scsi' num_queues='8'/>
      
      The corresponding QEMU command line:
      
      -device virtio-scsi-pci,id=scsi0,num_queues=8,bus=pci.0,addr=0x3 \
      d4bf0a93
  19. 05 4月, 2013 1 次提交
  20. 03 4月, 2013 1 次提交
  21. 25 3月, 2013 1 次提交
    • O
      nodedev: Dump max vports and vports in use for HBA's XML · 448be8f7
      Osier Yang 提交于
      This enrichs HBA's xml by dumping the number of max vports and
      vports in use. Format is like:
      
        <capability type='vport_ops'>
          <max_vports>164</max_vports>
          <vports>5</vports>
        </capability>
      
      * docs/formatnode.html.in: (Document the new XML)
      * docs/schemas/nodedev.rng: (Add the schema)
      * src/conf/node_device_conf.h: (New member for data.scsi_host)
      * src/node_device/node_device_linux_sysfs.c: (Collect the value of
        max_vports and vports)
      448be8f7
  22. 22 3月, 2013 2 次提交