1. 20 8月, 2010 1 次提交
    • P
      storage: add support for Vendor and Model in XML · 20be699e
      Patrick Dignan 提交于
      I wrote a patch to add support for listing the Vendor and Model of a
      storage pool in the storage pool XML.  This would allow vendor
      extensions of specific devices.  The patch includes a test for the new
      attributes as well.
      
      Patrick Dignan
      20be699e
  2. 18 8月, 2010 1 次提交
  3. 13 8月, 2010 1 次提交
  4. 11 8月, 2010 1 次提交
    • D
      allow memballoon type of none to desactivate it · 79c27a62
      Daniel Veillard 提交于
        The balloon device is automatically added to qemu guests if supported,
      but it may be useful to desactivate it. The simplest to not change the
      existing behaviour is to allow
        <memballoon type="none"/>
      as an extra option to desactivate it (it is automatically added if the
      memballoon construct is missing for the domain).
      The following simple patch just adds the extra option and does not
      change the default behaviour but avoid creating a balloon device if
      type="none" is used.
      
      * docs/schemas/domain.rng: add the extra type attribute value
      * src/conf/domain_conf.c src/conf/domain_conf.h: add the extra enum
        value
      * src/qemu/qemu_conf.c: if enum is NONE, don't activate the device,
        i.e. don't pass the args to qemu/kvm
      79c27a62
  5. 03 8月, 2010 1 次提交
  6. 02 8月, 2010 3 次提交
  7. 29 7月, 2010 5 次提交
  8. 28 7月, 2010 1 次提交
    • C
      qemu: Allow setting boot menu on/off · 4f24ca01
      Cole Robinson 提交于
      Add a new element to the <os> block:
      
        <bootmenu enable="yes|no"/>
      
      Which maps to -boot,menu=on|off on the QEMU command line.
      
      I decided to use an explicit 'enable' attribute rather than just make the
      bootmenu element boolean. This allows us to treat lack of a bootmenu element
      as 'use hypervisor default'.
      4f24ca01
  9. 24 7月, 2010 3 次提交
  10. 21 7月, 2010 2 次提交
    • D
      Explicitly represent balloon device in XML and handle PCI address · b2f18635
      Daniel P. Berrange 提交于
      To allow compatibility with older QEMU PCI device slot assignment
      it is necessary to explicitly track the balloon device in the
      XML. This introduces a new device
      
         <memballoon model='virtio|xen'/>
      
      It can also have a PCI address, auto-assigned if necessary.
      
      The memballoon will be automatically added to all Xen and QEMU
      guests by default.
      
      * docs/schemas/domain.rng: Add <memballoon> element
      * src/conf/domain_conf.c, src/conf/domain_conf.h: parsing
        and formatting for memballoon device. Always add a memory
        balloon device to Xen/QEMU if none exists in XML
      * src/libvirt_private.syms: Export memballoon model APIs
      * src/qemu/qemu_conf.c, src/qemu/qemu_conf.h: Honour the
        PCI device address in memory balloon device
      * tests/*: Update to test new functionality
      b2f18635
    • D
      Remove bogus free of static strings · 4d134188
      Daniel P. Berrange 提交于
      Remove bogus free of statically allocated strings introduced
      in 03ca4204
      
      * src/conf/capabilities.c: Don't free static strings for
        default disk driver type/name
      4d134188
  11. 20 7月, 2010 2 次提交
    • D
      Add ability to set a default driver name/type when parsing disks · 03ca4204
      Daniel P. Berrange 提交于
      Record a default driver name/type in capabilities struct. Use this
      when parsing disks if value is not set in XML config.
      
      * src/conf/capabilities.h: Record default driver name/type for disks
      * src/conf/domain_conf.c: Fallback to default driver name/type
        when parsing disks
      * src/qemu/qemu_driver.c: Set default driver name/type to raw
      03ca4204
    • D
      Add an API for iterating over disk paths · 9d0a630f
      Daniel P. Berrange 提交于
      There is duplicated code which iterates over disk backing stores
      performing some action. Provide a convenient helper for doing
      this to eliminate duplication & risk of mistakes with disk format
      probing
      
      * src/conf/domain_conf.c, src/conf/domain_conf.h,
        src/libvirt_private.syms: Add virDomainDiskDefForeachPath()
      9d0a630f
  12. 13 7月, 2010 1 次提交
    • J
      cpu: Fail when CPU type cannot be detected from XML · 517aba9f
      Jiri Denemark 提交于
      When autodetecting whether XML describes guest or host CPU, the presence
      of <arch> element is checked. If it's present, we treat the XML as host
      CPU definition. Which is right, since guest CPU definitions do not
      contain <arch> element. However, if at the same time the root <cpu>
      element contains `match' attribute, we would silently ignore it and
      still treat the XML as host CPU. We should rather refuse such invalid
      XML.
      517aba9f
  13. 07 7月, 2010 1 次提交
    • J
      cpu: Add support for CPU vendor · af53714f
      Jiri Denemark 提交于
      By specifying <vendor> element in CPU requirements a guest can be
      restricted to run only on CPUs by a given vendor. Host CPU vendor is
      also specified in capabilities XML.
      
      The vendor is checked when migrating a guest but it's not forced, i.e.,
      guests configured without <vendor> element can be freely migrated.
      af53714f
  14. 25 6月, 2010 1 次提交
    • D
      Add API for iterating over all character devices · bf1f3f7a
      Daniel P. Berrange 提交于
      The parallel, serial, console and channel devices are all just
      character devices. A lot of code needs todo the same thing to
      all these devices. This provides an convenient API for iterating
      over all of them.
      
      * src/conf/domain_conf.c, src/conf/domain_conf.c,
        src/libvirt_private.syms: Add virDomainChrDefForeach
      bf1f3f7a
  15. 24 6月, 2010 2 次提交
  16. 22 6月, 2010 1 次提交
    • S
      nwfilter: fix loadable module support · cab5a52a
      Stefan Berger 提交于
      Following Daniel Berrange's multiple helpful suggestions for improving
      this patch and introducing another driver interface, I now wrote the
      below patch where the nwfilter driver registers the functions to
      instantiate and teardown the nwfilters with a function in
      conf/domain_nwfilter.c called virDomainConfNWFilterRegister. Previous
      helper functions that were called from qemu_driver.c and qemu_conf.c
      were move into conf/domain_nwfilter.h with slight renaming done for
      consistency. Those functions now call the function expored by
      domain_nwfilter.c, which in turn call the functions of the new driver
      interface, if available.
      cab5a52a
  17. 18 6月, 2010 1 次提交
    • S
      nwfilter: add XML attribute to control iptables state match · 51d3fb02
      Stefan Berger 提交于
      This patch adds an optional XML attribute to a nwfilter rule to give the user control over whether the rule is supposed to be using the iptables state match or not. A rule may now look like shown in the XML below with the statematch attribute either having value '0' or 'false' (case-insensitive).
      
      [...]
      <rule action='accept' direction='in' statematch='false'>
      <tcp srcmacaddr='1:2:3:4:5:6'
                 srcipaddr='10.1.2.3' srcipmask='32'
                 dscp='33'
                 srcportstart='20' srcportend='21'
                 dstportstart='100' dstportend='1111'/>
      </rule>
      [...]
      
      I am also extending the nwfilter schema and add this attribute to a test case.
      51d3fb02
  18. 09 6月, 2010 1 次提交
  19. 08 6月, 2010 4 次提交
    • D
      Network duplicate UUID/name checking · 3bb37439
      Daniel P. Berrange 提交于
      The network driver is not doing correct checking for
      duplicate UUID/name values. This introduces a new method
      virNetworkObjIsDuplicate, based on the previously
      written virDomainObjIsDuplicate.
      
      * src/conf/network_conf.c, src/conf/network_conf.c,
        src/libvirt_private.syms: Add virNetworkObjIsDuplicate,
      * src/network/bridge_driver.c: Call virNetworkObjIsDuplicate
        for checking uniqueness of uuid/names
      3bb37439
    • D
      Storage pool duplicate UUID/name checking · e9364d9f
      Daniel P. Berrange 提交于
      The storage pool driver is not doing correct checking for
      duplicate UUID/name values. This introduces a new method
      virStoragePoolObjIsDuplicate, based on the previously
      written virDomainObjIsDuplicate.
      
      * src/conf/storage_conf.c, src/conf/storage_conf.c,
        src/libvirt_private.syms: Add virStoragePoolObjIsDuplicate,
      * src/storage/storage_driver.c: Call virStoragePoolObjIsDuplicate
        for checking uniqueness of uuid/names
      e9364d9f
    • D
      Fix auto-adding of virtio serial controllers · f4f91e7b
      Daniel P. Berrange 提交于
      The domain parsing code would auto-add a virtio serial controller
      if it saw any virtio serial channel defined. Unfortunately it
      always added a controller with index=0, even if the channel address
      specified an index != 0. It only added one controller, even if
      multiple controllers were referenced by channels. Finally, it let
      the ports+vectors parameters initialize to zero instead of -1, which
      prevented the controllers accepting any ports.
      
      * src/conf/domain_conf.c: Initialize ports+vectors when adding
        virtio serial controllers. Add all neccessary virtio serial
        controllers, instead of hardcoding controller 0
      * qemuxml2argvdata/qemuxml2argv-channel-virtio.args,
        qemuxml2argvdata/qemuxml2argv-channel-virtio.xml: Expand to
        test controller auto-add behaviour
      f4f91e7b
    • D
      Include port number with virtio serial devices · 2e56cfa7
      Daniel P. Berrange 提交于
      To ensure that the device addressing scheme is stable across
      hotplug/unplug, all virtio serial channels needs to have an
      associated port number in their address. This is then specified
      to QEMU using the nr=NNN parameter
      
      * src/conf/domain_conf.c, src/conf/domain_conf.h: Parsing
        for port number in vioserial address types.
      * src/qemu/qemu_conf.c: Set 'nr=NNN' parameter with virtio
        serial port number
      * tests/qemuxml2argvdata/qemuxml2argv-channel-virtio.args,
        tests/qemuxml2argvdata/qemuxml2argv-channel-virtio.xml: Expand
        data set to ensure coverage of port addressing
      2e56cfa7
  20. 03 6月, 2010 1 次提交
  21. 29 5月, 2010 1 次提交
    • S
      macvtap: cannot support target device name · ca1b7cc8
      Stefan Berger 提交于
      Since the macvtap device needs active tear-down and the teardown logic
      is based on the interface name, it can happen that if for example 1 out
      of 3 interfaces was successfully created, that during the failure path
      the macvtap's target device name is used to tear down an interface that
      is doesn't own (owned by another VM).
      
      So, in this patch, the target interface name is reset so that there is
      no target interface name and the interface name is always cleared after
      a tear down.
      ca1b7cc8
  22. 26 5月, 2010 4 次提交
    • M
      xen-proxy build broken · 33737db1
      Matthias Bolte 提交于
      The virVirtualPortProfileFormat just went below the
      virVirtualPortProfileParamsParseXML function and got inside the
      
      The attached patch moves virVirtualPortProfileFormat below the #ifndef
      PROXY block.
      33737db1
    • S
      vepa: parsing for 802.1Qb{g|h} XML · a8f75d2c
      Stefan Berger 提交于
      This patch parses the following two XML descriptions, one for
      802.1Qbg and one for 802.1Qbh, and stores the data internally.
      The actual triggering of the switch setup protocol has not been
      implemented here but the relevant code to do that should go into
      the functions associatePortProfileId() and disassociatePortProfileId().
      
         <interface type='direct'>
            <source dev='eth0.100' mode='vepa'/>
            <model type='virtio'/>
            <virtualport type='802.1Qbg'>
              <parameters managerid='12' typeid='0x123456' typeidversion='1'
               instanceid='fa9b7fff-b0a0-4893-8e0e-beef4ff18f8f'/>
            </virtualport>
            <filterref filter='clean-traffic'/>
          </interface>
      
          <interface type='direct'>
            <source dev='eth0.100' mode='vepa'/>
            <model type='virtio'/>
            <virtualport type='802.1Qbh'>
              <parameters profileid='my_profile'/>
            </virtualport>
          </interface>
      
      I'd suggest to use this patch as a base for triggering the setup
      protocol with the 802.1Qb{g|h} switch.
      
      Several rounds of changes were made to this patch. The
      following is a list of these changes.
      - Renamed structure virVirtualPortProfileDef to virVirtualPortProfileParams
        as per Daniel Berrange's request
      - Addressing Daniel Berrange's comments:
       - removing macvtap.h's dependency on domain_conf.h by
         moving the virVirtualPortProfileDef structure into macvtap.h
         and not passing virtDomainNetDefPtr to any functions in
         macvtap.c
      - Addressed most of Chris Wright's comments:
        - indicating error in case virtualport XML node cannot be parsed
          properly
        - parsing hex and decimal numbers using virStrToLong_ui() with
          parameter '0' for base
        - tgifname (target interface name) variable wasn't necessary
          to pass to openMacvtapTap function anymore
      - assigning the virtual port data structure to the virDomainNetDef
        only if it was previously parsed
      - make sure that the error code returned by openMacvtapTap() is a negative n
        in case the associatePortProfileId() function failed.
      - renaming vsi in the XML to virtualport
      - replace all occurrences of vsi in the source as well
      - removing mode and MAC address parameters from the functions that
        will communicate with the hareware diretctly or indirectly
      - moving the associate and disassociate functions to the end of the
        file for subsequent patches to easier make them generally available
        for export
      - passing the macvtap interface name rather than the link device since
        this otherwise gives funny side effects when using netlink messages
        where IFLA_IFNAME and IFLA_ADDRESS are specified and the link dev
        all of a sudden gets the MAC address of the macvtap interface.
      - Removing rc = -1 error indications in the case of 802.1Qbg|h setup in case
        we wanted to use hook scripts for the setup and so the setup doesn't fail
        here.
      - if instance ID UUID is not supplied it will automatically be generated
        - adapted schema to make instance ID UUID optional
        - added test case
      - parser and XML generator have been separated into their own
        functions so they can be re-used elsewhere (passthrough case
        for example)
      - Adapted XML parser and generator support the above shown type
        (802.1Qbg, 802.1Qbh).
      - Adapted schema to above XML
      - Adapted test XML to above XML
      - Passing through the VM's UUID which seems to be necessary for
        802.1Qbh -- sorry no host UUID
      - adding virtual function ID to association function, in case it's
        necessary to use (for SR-IOV)
      a8f75d2c
    • C
      storage: Sanitize pool target paths · a7fb2258
      Cole Robinson 提交于
      Spurious / in a pool target path makes life difficult for apps using the
      GetVolByPath, and doing other path based comparisons with pools. This
      has caused a few issues for virt-manager users:
      
      https://bugzilla.redhat.com/show_bug.cgi?id=494005
      https://bugzilla.redhat.com/show_bug.cgi?id=593565
      
      Add a new util API which removes spurious /, virFileSanitizePath. Sanitize
      target paths when parsing pool XML, and for paths passed to GetVolByPath.
      
      v2: Leading // must be preserved, properly sanitize path=/, sanitize
          away /./ -> /
      
      v3: Properly handle starting ./ and ending /.
      
      v4: Drop all '.' handling, just sanitize / for now.
      a7fb2258
    • D
      Expose a host UUID in the capabilities XML · 60881161
      Daniel P. Berrange 提交于
      Allow for a host UUID in the capabilities XML. Local drivers
      will initialize this from the SMBIOS data. If a sanity check
      shows SMBIOS uuid is invalid, allow an override from the
      libvirtd.conf configuration file
      
      * daemon/libvirtd.c, daemon/libvirtd.conf: Support a host_uuid
        configuration option
      * docs/schemas/capability.rng: Add optional host uuid field
      * src/conf/capabilities.c, src/conf/capabilities.h: Include
        host UUID in XML
      * src/libvirt_private.syms: Export new uuid.h functions
      * src/lxc/lxc_conf.c, src/qemu/qemu_driver.c,
        src/uml/uml_conf.c: Set host UUID in capabilities
      * src/util/uuid.c, src/util/uuid.h: Support for host UUIDs
      * src/node_device/node_device_udev.c: Use the host UUID functions
      * tests/confdata/libvirtd.conf, tests/confdata/libvirtd.out: Add
        new host_uuid config option to test
      60881161
  23. 21 5月, 2010 1 次提交