1. 23 6月, 2010 1 次提交
    • D
      Add '-nodefconfig' command line arg to QEMU · f310b253
      Daniel P. Berrange 提交于
      We already use the '-nodefaults' command line arg with QEMU to stop
      it adding any default devices to guests. Unfortunately, QEMU will
      load global config files from /etc/qemu that may also add default
      devices. These aren't blocked by '-nodefaults', so we need to also
      add the '-nodefconfig' arg to prevent that.
      
      Unfortunately these global config files are also used to define
      custom CPU models. So in blocking global hardware device addition
      we also block definitions of new CPU models. Libvirt doesn't know
      about these custom CPU models though, so it would never make use
      of them anyway. Thus blocking them via -nodefconfig isn't a show
      stopping problem. We would need to expand libvirt's own CPU model
      XML database to support these instead.
      
      * src/qemu/qemu_conf.c: Add '-nodefconfig' if available
      * tests/qemuxml2argvdata/: Add '-nodefconfig' to all data files which
        have '-nodefaults' present
      f310b253
  2. 18 6月, 2010 2 次提交
    • 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
    • J
      virsh: ensure persistence and autostart are shown for dominfo and pool-info · c2160b13
      Justin Clift 提交于
      This patch adds the persistence status (yes/no) to the output of the virsh
      dominfo and pool-info commands.  This patch also adds the autostart status
      to the output of the virsh pool-info command.
      
      Red Hat BZ for this:
      
        https://bugzilla.redhat.com/show_bug.cgi?id=603696
      c2160b13
  3. 17 6月, 2010 1 次提交
  4. 15 6月, 2010 1 次提交
    • E
      maint: simplify some ignore files · fb8552f8
      Eric Blake 提交于
      * .hgignore: Delete, no longer used.
      * examples/python/.gitignore: Delete, covered globally.
      * include/.gitignore: Likewise.
      * python/tests/.gitignore: Likewise.
      * docs/schemas/.gitignore: Likewise.
      * tests/xml2sexprdata/.gitignore: Likewise.
      * tests/sexpr2xmldata/.gitignore: Likewise.
      * tests/confdata/.gitignore: Likewise.
      * tests/xencapsdata/.gitignore: Likewise.
      * tests/xmconfigdata/.gitignore: Likewise.
      * tests/xml2sexprdata/.gitignore: Likewise.
      fb8552f8
  5. 09 6月, 2010 1 次提交
  6. 08 6月, 2010 3 次提交
    • D
      Fix test breakage from virtio serial changes · 9cb08020
      Daniel P. Berrange 提交于
      The virtio serial changes broke the test suite because they forgot
      to add the new address attribute to the domain XML schema. The
      xml2xml test also broke because the XML no longer roundtrips. This
      is due to testing of auto-addition of <controller> elements. Split
      that test case off into a separate XML file to avoid breakage
      
      * docs/schemas/domain.rng: Allow port number for virtio serial addresses
      * tests/qemuxml2argvdata/qemuxml2argv-channel-virtio.args,
        tests/qemuxml2argvdata/qemuxml2argv-channel-virtio.xml: Revert to
        a simple config to avoid breaking xml2xml test
      * tests/qemuxml2argvdata/qemuxml2argv-channel-virtio-auto.xml,
        tests/qemuxml2argvdata/qemuxml2argv-channel-virtio-auto.args: Add
        complex test case for auto-controller addition for xml2argv test
      * tests/qemuxml2argvtest.c: Add channel-virtio-auto test
      9cb08020
    • 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
  7. 28 5月, 2010 1 次提交
  8. 26 5月, 2010 4 次提交
    • J
      tests: avoid new failure of the daemon-conf test · 572c6cc1
      Jim Meyering 提交于
      * tests/daemon-conf: Accommodate the fact that out template,
      daemon/libvirtd.conf now contains an invalid host_uuid.
      Convert it to a valid one before the final libvirtd-running
      test that must terminate normally.
      572c6cc1
    • 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
  9. 22 5月, 2010 1 次提交
  10. 21 5月, 2010 1 次提交
  11. 20 5月, 2010 1 次提交
    • E
      build: distribute missing file · 92036c2e
      Eric Blake 提交于
      Commit f30ccb24 was incomplete.
      
      * .gitignore: Ignore intermediate directory during failed 'make
      distcheck'.
      * tests/Makefile.am (qemuhelpdata): Distribute new file.
      92036c2e
  12. 19 5月, 2010 2 次提交
    • J
      tests: do not ignore virInitialize failure · 6ab131ba
      Jim Meyering 提交于
      * tests/nodeinfotest.c (mymain): Do not ignore virInitialize failure.
      Most other callers of virInitialize test for failure.
      6ab131ba
    • J
      linuxNodeInfoCPUPopulate: avoid used-uninitialized via a test · 43beb82e
      Jim Meyering 提交于
      * tests/nodeinfotest.c (linuxTestCompareFiles): Don't use
      nodeinfo->member uninitialized.  linuxNodeInfoCPUPopulate requires
      that some of its nodeinfo members (including threads) be initialized
      upon input.  The nodeinfotest.c program lacked the initialization,
      while the only other use (nodeGetInfo) did perform it.
      It's not trivial to move the initialization into the function,
      since nodeGetInfo sets at least one member after clearing the
      buffer but before calling linuxNodeInfoCPUPopulate.
      43beb82e
  13. 18 5月, 2010 2 次提交
    • E
      qemu_conf: fix flag value · f30ccb24
      Eric Blake 提交于
      (gdb) p/x QEMUD_CMD_FLAG_VNET_HOST
      $7 = 0xffffffff80000000
      
      Oops - that meant we were incorrectly setting QEMU_CMD_FLAG_RTC_TD_HACK
      for qemu-kvm-0.12.3 (and probably botching a few other settings as well).
      
      Fixes Red Hat BZ#592070
      
      * src/qemu/qemu_conf.h (QEMUD_CMD_FLAG_VNET_HOST): Avoid sign
      extension.
      * tests/qemuhelpdata/qemu-kvm-0.12.3: New file.
      * tests/qemuhelptest.c (mymain): Add another case.
      f30ccb24
    • C
      tests: Skip daemon-conf test if dir exceeds UNIX_PATH_MAX · df5944ff
      Cole Robinson 提交于
      The max path length for unix sockets is pretty small (108, see man 7 unix).
      If 'make check' is run from a directory that exceeds this, one of the tests
      will fail, and in such a way that requires manually editting the test to
      determine why.
      
      There are certainly other ways to handle this, but I've chosen just to skip
      the offending test if we will exceed the length limitation.
      
      v2: Drop bashism, use test infrastructure to warn and skip
      df5944ff
  14. 12 5月, 2010 2 次提交
    • J
      tests: use GPLv2+, not GPLv3 · c2c4abb4
      Jim Meyering 提交于
      * tests/cpuset: Change from GPLv3 to GPLv2+
      * tests/read-bufsiz: Likewise.
      * tests/read-non-seekable: Likewise.
      * tests/start: Likewise.
      * tests/undefine: Likewise.
      * tests/vcpupin: Likewise.
      * tests/virsh-all: Likewise.
      * tests/virsh-schedinfo: Likewise.
      * tests/virsh-synopsis: Likewise.
      c2c4abb4
    • J
      tests: correct PATH in new test, for when running manually · e915962a
      Jim Meyering 提交于
      * tests/virsh-schedinfo: This test sets PATH internally, just in
      case you're running it manually.  Normally, the PATH setting from
      tests/Makefile.am's TESTS_ENVIRONMENT is sufficient.  Prepend the
      correct directory, and take advantage of the PATH setting in one
      more case.
      e915962a
  15. 11 5月, 2010 2 次提交
  16. 27 4月, 2010 3 次提交
    • S
      nwfilter: add support for RAPR protocol · aea68ce9
      Stefan Berger 提交于
      This patch adds support for the RARP protocol. This may be needed due to
      qemu sending out a RARP packet (at least that's what it seems to want to
      do even though the protocol id is wrong) when migration finishes and
      we'd need a rule to let the packets pass.
      
      Unfortunately my installation of ebtables does not understand -p RARP
      and also seems to otherwise depend on strings in /etc/ethertype
      translated to protocol identifiers. Therefore I need to pass -p 0x8035
      for RARP. To generally get rid of the dependency of that file I switch
      all so far supported protocols to use their protocol identifier in the
      -p parameter rather than the string.
      
      I am also extending the schema and added a test case.
      
      changes from v1 to v2:
      - added test case into patch
      aea68ce9
    • D
      Fix indentation for storage conf XML · 1b9347b5
      David Allan 提交于
      * virStorageEncryptionFormat is called from both
        virDomainDiskDefFormat and virStorageVolTargetDefFormat.  The proper
        indentation in the generated XML depends on the caller.  My earlier
        patch to fix the incorrect indentation for the domain XML broke the
        indentation for the storage XML.  This patch adopts Laine's
        suggestion of requring the caller of virStorageEncryptionFormat to
        provide an unsigned int with the number of spaces the output should
        be indented.  The patch modifies both callers to provide the
        additional argument.
      
      * Add a regression test for the domain XML
      
      * src/conf/domain_conf.c src/conf/storage_conf.c
        src/conf/storage_encryption_conf.c src/conf/storage_encryption_conf.h:
        change the indentation code
      * tests/qemuxml2xmltest.c
        tests/qemuxml2argvdata/qemuxml2argv-encrypted-disk.args
        tests/qemuxml2argvdata/qemuxml2argv-encrypted-disk.xml: add a regression test
      1b9347b5
    • S
      nwfilter: enable hex number inputs in filter XML · 5c7c755f
      Stefan Berger 提交于
      With this patch I want to enable hex number inputs in the filter XML. A
      number that was entered as hex is also printed as hex unless a string
      representing the meaning can be found.
      
      I am also extending the schema and adding a test case. A problem with
      the DSCP value is fixed on the way as well.
      
      Changes from V1 to V2:
      
      - using asHex boolean in all printf type of functions to select the
      output format in hex or decimal format
      5c7c755f
  17. 23 4月, 2010 1 次提交
  18. 22 4月, 2010 2 次提交
  19. 21 4月, 2010 2 次提交
  20. 15 4月, 2010 1 次提交
  21. 14 4月, 2010 1 次提交
  22. 13 4月, 2010 1 次提交
    • D
      Fix nodeinfotest on NUMA machines · e7ebe9f3
      Daniel P. Berrange 提交于
      The nodeinfotest was reliant on the host NUMA topology, but all
      the test data files assumed 1 single NUMA node. This test thus
      failed on any NUMA machine with > 1 node
      
      * tests/nodeinfotest.c: Hardcode 1 single numa node
      e7ebe9f3
  23. 09 4月, 2010 3 次提交
  24. 08 4月, 2010 1 次提交
    • M
      esx: Allow 'lsisas1068' as SCSI controller type · 4acab37f
      Matthias Bolte 提交于
      Extend tests to cover all SCSI controller types and document the
      new type.
      
      The lsisas1068 SCSI controller type was added in ESX 4.0. The VMX
      parser reports an error when this controller type is present. This
      makes virsh dumpxml fail for every domain that uses this controller
      type.
      
      This patch fixes this and adds lsisas1068 to the list of accepted
      SCSI controller types.
      
      Reported by Jonathan Kelley.
      4acab37f