1. 03 7月, 2012 1 次提交
  2. 06 4月, 2012 1 次提交
    • E
      tests: avoid compiler warnings · 72505073
      Eric Blake 提交于
      gcc 4.7 warns about uninitialized struct members
      
      * tests/testutilsqemu.c (testQemuCapsInit): Populate new members.
      * tests/viruritest.c (mymain): Likewise.
      72505073
  3. 17 1月, 2012 2 次提交
    • J
      Add support for cpu mode attribute · f7dd3a4e
      Jiri Denemark 提交于
      The mode can be either of "custom" (default), "host-model",
      "host-passthrough". The semantics of each mode is described in the
      following examples:
      
      - guest CPU is a default model with specified topology:
          <cpu>
            <topology sockets='1' cores='2' threads='1'/>
          </cpu>
      
      - guest CPU matches selected model:
          <cpu mode='custom' match='exact'>
            <model>core2duo</model>
          </cpu>
      
      - guest CPU should be a copy of host CPU as advertised by capabilities
        XML (this is a short cut for manually copying host CPU specification
        from capabilities to domain XML):
          <cpu mode='host-model'/>
      
        In case a hypervisor does not support the exact host model, libvirt
        automatically falls back to a closest supported CPU model and
        removes/adds features to match host. This behavior can be disabled by
          <cpu mode='host-model'>
            <model fallback='forbid'/>
          </cpu>
      
      - the same as previous returned by virDomainGetXMLDesc with
        VIR_DOMAIN_XML_UPDATE_CPU flag:
          <cpu mode='host-model' match='exact'>
            <model fallback='allow'>Penryn</model>       --+
            <vendor>Intel</vendor>                         |
            <topology sockets='2' cores='4' threads='1'/>  + copied from
            <feature policy='require' name='dca'/>         | capabilities XML
            <feature policy='require' name='xtpr'/>        |
            ...                                          --+
          </cpu>
      
      - guest CPU should be exactly the same as host CPU even in the aspects
        libvirt doesn't model (such domain cannot be migrated unless both
        hosts contain exactly the same CPUs):
          <cpu mode='host-passthrough'/>
      
      - the same as previous returned by virDomainGetXMLDesc with
        VIR_DOMAIN_XML_UPDATE_CPU flag:
          <cpu mode='host-passthrough' match='minimal'>
            <model>Penryn</model>                        --+ copied from caps
            <vendor>Intel</vendor>                         | XML but doesn't
            <topology sockets='2' cores='4' threads='1'/>  | describe all
            <feature policy='require' name='dca'/>         | aspects of the
            <feature policy='require' name='xtpr'/>        | actual guest CPU
            ...                                          --+
          </cpu>
      f7dd3a4e
    • J
      cpu: Optionally forbid fallback CPU models · a6f88cbd
      Jiri Denemark 提交于
      In case a hypervisor doesn't support the exact CPU model requested by a
      domain XML, we automatically fallback to a closest CPU model the
      hypervisor supports (and make sure we add/remove any additional features
      if needed). This patch adds 'fallback' attribute to model element, which
      can be used to disable this automatic fallback.
      a6f88cbd
  4. 21 12月, 2011 1 次提交
  5. 03 11月, 2011 1 次提交
    • D
      Fix default console type setting · 209c2880
      Daniel P. Berrange 提交于
      The default console type may vary based on the OS type. ie a Xen
      paravirt guests wants a 'xen' console, while a fullvirt guests
      wants a 'serial' console.
      
      A plain integer default console type in the capabilities does
      not suffice. Instead introduce a callback that is passed the
      OS type.
      
      * src/conf/capabilities.h: Use a callback for default console
        type
      * src/conf/domain_conf.c, src/conf/domain_conf.h: Use callback
        for default console type. Add missing LXC/OpenVZ console types.
      * src/esx/esx_driver.c, src/libxl/libxl_conf.c,
        src/lxc/lxc_conf.c, src/openvz/openvz_conf.c,
        src/phyp/phyp_driver.c, src/qemu/qemu_capabilities.c,
        src/uml/uml_conf.c, src/vbox/vbox_tmpl.c,
        src/vmware/vmware_conf.c, src/xen/xen_hypervisor.c,
        src/xenapi/xenapi_driver.c: Set default console type callback
      209c2880
  6. 16 2月, 2011 1 次提交
  7. 18 12月, 2010 1 次提交
  8. 19 11月, 2010 1 次提交
    • E
      capabilities, cpu: use new array API · aca20efb
      Eric Blake 提交于
      * src/conf/capabilities.h (_virCaps, _virCapsHost, _virCapsGuest)
      (_virCapsGuestArch): Add additional fields.
      * src/conf/cpu_conf.h (_virCPUDef): Likewise.
      * src/conf/capabilities.c (virCapabilitiesFormatXML): Reflect
      updated type.
      (virCapabilitiesAddGuest, virCapabilitiesAddHostFeature)
      (virCapabilitiesAddHostMigrateTransport)
      (virCapabilitiesAddHostNUMACell, virCapabilitiesAddGuestFeature)
      (virCapabilitiesAddGuestDomain): Use new array APIs.
      * src/conf/cpu_conf.c (virCPUDefAddFeature, virCPUDefCopy)
      (virCPUDefParseXML): Likewise.
      * tests/testutilsqemu.c (testQemuCapsInit): Adjust test.
      aca20efb
  9. 24 7月, 2010 1 次提交
    • C
      Add tests for the new Qemu namespace XML. · a71be01f
      Chris Lalancette 提交于
      Thanks to DV for knocking together the Relax-NG changes
      quickly for me.
      
      Changes since v1:
       - Change the domain.rng to correspond to the new schema
       - Don't allocate caps->ns in testQemuCapsInit since it is a static table
      
      Changes since v2:
       - Change domain.rng to add restrictions on allowed environment names
      
      Changes since v3:
       - Remove a bogus comment in the tests
      Signed-off-by: NChris Lalancette <clalance@redhat.com>
      a71be01f
  10. 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
  11. 22 4月, 2010 2 次提交
  12. 10 3月, 2010 1 次提交
  13. 16 1月, 2010 1 次提交
    • D
      Make test suite output less verbose · e8ac4a79
      Daniel P. Berrange 提交于
      Only print out '.' for each test case, full test output can be
      re-enabled with VIR_TEST_VERBOSE=1, or VIR_TEST_DEBUG=XXXX
      
      Sample output now looks like
      
        TEST: statstest
              ........................................ 40
              ...................................      75  OK
        PASS: statstest
        TEST: qparamtest
              ................................         32  OK
        PASS: qparamtest
        TEST:
              ............                             12  OK
      e8ac4a79
  14. 21 10月, 2009 1 次提交
    • C
      tests: Centralize VIR_TEST_DEBUG lookup, and document it · 9710856b
      Cole Robinson 提交于
      Provide a simple interface for other tests to lookup the testDebug variable.
      Also remove a redundant error message in interface tests.
      
      If anyone feels inclined to change this env variable to match the existing
      LIBVIRT_* format, it should now be easier to do so.
      9710856b
  15. 10 9月, 2009 4 次提交
    • M
      Test that domain-specific qemu machine types are used correctly · e52d608d
      Mark McLoughlin 提交于
      * tests/testutilsqemu.c: add a machine types list for /usr/bin/kvm
        which doesn't have any aliases, while the guest has aliases
      
      * tests/qemuxml2argvdata/qemuxml2argv-machine-aliases2.*,
        tests/qemuxml2argvtest.c: add a test using /usr/bin/kvm and make
        sure that 'pc' machine type doesn't get canonicalized using the
        aliases in the guest machine type list
      e52d608d
    • M
      Test qemu machine aliases · aa67241b
      Mark McLoughlin 提交于
      * tests/testutilsqemu.c: make 'pc' an alias for qemu-system-x86_64
      
      * tests/qemuxml2argvdata/qemuxml2argv-machine-aliases1.*,
        tests/qemuxml2argvtest.c: add a test which uses qemu-system-x86_64
        and make sure the machine type is canonicalized.
      aa67241b
    • M
      Re-factor qemu test machine allocation code · d4c032d0
      Mark McLoughlin 提交于
      * test/testutilsqemu.c: split out code to testQemuAllocMachines()
        and make use of the ARRAY_CARDINALITY macro
      d4c032d0
    • M
      Dump qemu driver capabilities if test debugging enabled · d7ed2c18
      Mark McLoughlin 提交于
      * src/testutils.[ch]: make testDebug externally available
      
      * src/testutilsqemu.c: if VIR_TEST_DEBUG is set, dump the qemu
        driver capabilities to stderr
      d7ed2c18
  16. 27 7月, 2009 1 次提交
    • M
      Add virCapsGuestMachine structure · 38fd207e
      Mark McLoughlin 提交于
      A subsequent commit will add a "canonical" field to this structure,
      this patch basically just prepares the way for that.
      
      The new type is added, along with virCapabilitiesAlloc/FreeMachines()
      helpers and a whole bunch of code to make the transition.
      
      One quirk is that virCapabilitiesAddGuestDomain() and
      virCapabilitiesAddGuest() take ownership of the machine list rather
      than duping it. This makes sense to avoid needless copying.
      
      * src/capabilities.h: add the virCapsGuestMachine struct and use it
        in virCapsGuestDomainInfo, add prototypes for new functions and
        update the AddGuest() prototypes
      
      * src/capabilities.c: add code for allocating and freeing the new
        type, change the machines parameter to AddGuest() etc.
      
      * src/libvirt_private.syms: export the new helpers
      
      * src/qemu_conf.c: update all the machine type code to use the new
        struct
      
      * src/xen_internal.c: ditto
      
      * tests/testutilsqemu.c: ditto
      38fd207e
  17. 26 6月, 2008 1 次提交
  18. 23 5月, 2008 1 次提交
  19. 17 5月, 2008 1 次提交