1. 07 7月, 2014 1 次提交
  2. 05 7月, 2014 2 次提交
  3. 04 7月, 2014 1 次提交
    • J
      formatdomain: Fix issues found describing auth · f1aa00b4
      John Ferlan 提交于
      Fix a couple of typos ('chap' should have been 'iscsi' and there was
      a stray 'iqn.2013-07.com.example:iscsi-pool' entry.  Clean up the
      description of the <auth> element for the disk
      f1aa00b4
  4. 03 7月, 2014 2 次提交
    • M
      Introduce domain_capabilities · 614581f3
      Michal Privoznik 提交于
      This new module holds and formats capabilities for emulator. If you
      are about to create a new domain, you may want to know what is the
      host or hypervisor capable of. To make sure we don't regress on the
      XML, the formatting is not something left for each driver to
      implement, rather there's general format function.
      
      The domain capabilities is a lockable object (even though the locking
      is not necessary yet) which uses reference counter.
      Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
      614581f3
    • J
      Introduce virBufferCheckError · 058d89b9
      Ján Tomko 提交于
      Check if the buffer is in error state and report an error if it is.
      
      This replaces the pattern:
      if (virBufferError(buf)) {
          virReportOOMError();
          goto cleanup;
      }
      with:
      
      if (virBufferCheckError(buf) < 0)
          goto cleanup;
      
      Document typical buffer usage to favor this.
      Also remove the redundant FreeAndReset - if an error has
      been set via virBufferSetError, the content is already freed.
      058d89b9
  5. 02 7月, 2014 2 次提交
  6. 27 6月, 2014 1 次提交
    • E
      docs: publish correct enum values · 9b291bbe
      Eric Blake 提交于
      We publish libvirt-api.xml for others to use, and in fact, the
      libvirt-python bindings use it to generate python constants that
      correspond to our enum values.  However, we had an off-by-one bug
      that any enum that relied on C's rules for implicit initialization
      of the first enum member to 0 got listed in the xml as having a
      value of 1 (and all later members of the enum were equally
      botched).
      
      The fix is simple - since we add one to the previous value when
      encountering an enum without an initializer, the previous value
      must start at -1 so that the first enum member is assigned 0.
      
      The python generator code has had the off-by-one ever since DV
      first wrote it years ago, but most of our public enums were immune
      because they had an explicit = 0 initializer.  The only affected
      enums are:
      - virDomainEventGraphicsAddressType (such as
      VIR_DOMAIN_EVENT_GRAPHICS_ADDRESS_IPV4), since commit 987e31ed
      (libvirt v0.8.0)
      - virDomainCoreDumpFormat (such as VIR_DOMAIN_CORE_DUMP_FORMAT_RAW),
      since commit 9fbaff00 (libvirt v1.2.3)
      - virIPAddrType (such as VIR_IP_ADDR_TYPE_IPV4), since commit
      03e0e79e (not yet released)
      
      Thanks to Nehal J Wani for reporting the problem on IRC, and
      for helping me zero in on the culprit function.
      
      * docs/apibuild.py (CParser.parseEnumBlock): Fix implicit enum
      values.
      Signed-off-by: NEric Blake <eblake@redhat.com>
      9b291bbe
  7. 20 6月, 2014 1 次提交
    • L
      interface: report link state for bonds and vlans too · 69db5f92
      Laine Stump 提交于
      The interface state for bonds and vlans does seem to reflect the state
      of the underlying physical devices, at least in some cases, so it
      makes sense to allow reporting it (netcf now does).
      
      The link state/speed for bridge devices is meaningless though, so we
      don't even look for it.
      69db5f92
  8. 19 6月, 2014 3 次提交
    • L
      interface: allow reordering of elements in xml · a341fc73
      Laine Stump 提交于
      The interface xml schema was written with strict rules about the
      ordering of the elements. This was never intentional, but just due to
      omission of <interleave> in the appropriate places. This patch just
      adds in <interleave> wherever there is more than one element, and
      re-indents everything else appropriately.
      a341fc73
    • J
      docs: fix some typos in formatdomain.html · d98a60c2
      Jincheng Miao 提交于
      In section "Block / character devices" of "Host device assignment",
      the description of hostdev element has some error:
      
      For a block device, the type should be "storage", not "block";
      For a character device, the type should be "misc", not "char".
      Signed-off-by: NJincheng Miao <jmiao@redhat.com>
      d98a60c2
    • M
      virCaps: expose pages info · 02129b7c
      Michal Privoznik 提交于
      There are two places where you'll find info on page sizes. The first
      one is under <cpu/> element, where all supported pages sizes are
      listed. Then the second one is under each <cell/> element which refers
      to concrete NUMA node. At this place, the size of page's pool is
      reported. So the capabilities XML looks something like this:
      
      <capabilities>
      
        <host>
          <uuid>01281cda-f352-cb11-a9db-e905fe22010c</uuid>
          <cpu>
            <arch>x86_64</arch>
            <model>Westmere</model>
            <vendor>Intel</vendor>
            <topology sockets='1' cores='1' threads='1'/>
            ...
            <pages unit='KiB' size='4'/>
            <pages unit='KiB' size='2048'/>
            <pages unit='KiB' size='1048576'/>
          </cpu>
          ...
          <topology>
            <cells num='4'>
              <cell id='0'>
                <memory unit='KiB'>4054408</memory>
                <pages unit='KiB' size='4'>1013602</pages>
                <pages unit='KiB' size='2048'>3</pages>
                <pages unit='KiB' size='1048576'>1</pages>
                <distances/>
                <cpus num='1'>
                  <cpu id='0' socket_id='0' core_id='0' siblings='0'/>
                </cpus>
              </cell>
              <cell id='1'>
                <memory unit='KiB'>4071072</memory>
                <pages unit='KiB' size='4'>1017768</pages>
                <pages unit='KiB' size='2048'>3</pages>
                <pages unit='KiB' size='1048576'>1</pages>
                <distances/>
                <cpus num='1'>
                  <cpu id='1' socket_id='0' core_id='0' siblings='1'/>
                </cpus>
              </cell>
              ...
            </cells>
          </topology>
          ...
        </host>
      
        <guest/>
      
      </capabilities>
      Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
      02129b7c
  9. 17 6月, 2014 1 次提交
    • E
      blockjob: don't remove older-style mirror XML · b50e1049
      Eric Blake 提交于
      Commit 7c6fc394 introduced a regression in the XML produced for older
      clients.  The argument at the time was that clients shouldn't be
      depending on output-only data for something that is only going to
      be triggered for a transient guest; but John Ferlan reported that
      the automated testsuite was such a client.  It's better to be safe
      than sorry by guaranteeing back-compat cruft.  Note that later
      patches will be using <mirror> for active block commit, but there
      we don't have to worry about back-compat.
      
      * src/conf/domain_conf.c (virDomainDiskDefFormat): Restore old
      style output when necessary.
      * docs/schemas/domaincommon.rng: Validate back-compat style.
      * docs/formatdomain.html.in: Update the documentation.
      * tests/qemuxml2xmloutdata/qemuxml2xmlout-disk-mirror-old.xml:
      Update tests.
      * tests/qemuxml2argvdata/qemuxml2argv-disk-mirror.xml: Likewise.
      Signed-off-by: NEric Blake <eblake@redhat.com>
      b50e1049
  10. 16 6月, 2014 1 次提交
  11. 11 6月, 2014 2 次提交
    • M
      node_device: Expose link state & speed · 0311ef3d
      Michal Privoznik 提交于
      While exposing the info under <interface/> in previous patch works, it
      may work only in cases where interface is configured on the host.
      However, orchestrating application may want to know the link state and
      speed even in that case. That's why we ought to expose this in nodedev
      XML too:
      
      virsh # nodedev-dumpxml net_eth0_f0_de_f1_2b_1b_f3
      <device>
        <name>net_eth0_f0_de_f1_2b_1b_f3</name>
        <path>/sys/devices/pci0000:00/0000:00:19.0/net/eth0</path>
        <parent>pci_0000_00_19_0</parent>
        <capability type='net'>
          <interface>eth0</interface>
          <address>f0:de:f1:2b:1b:f3</address>
          <link speed='1000' state='up'/>
          <capability type='80203'/>
        </capability>
      </device>
      Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
      0311ef3d
    • M
      virInterface: Expose link state & speed · 3db89662
      Michal Privoznik 提交于
      Currently it is not possible to determine the speed of an interface
      and whether a link is actually detected from the API. Orchestrating
      platforms want to be able to determine when the link has failed and
      where multiple speeds may be available which one the interface is
      actually connected at. This commit introduces an extension to our
      interface XML (without implementation to interface driver backends):
      
        <interface type='ethernet' name='eth0'>
          <start mode='none'/>
          <mac address='aa:bb:cc:dd:ee:ff'/>
          <link speed='1000' state='up'/>
          <mtu size='1492'/>
          ...
        </interface>
      
      Where @speed is negotiated link speed in Mbits per second, and state
      is the current NIC state (can be one of the following:  "unknown",
      "notpresent", "down", "lowerlayerdown","testing", "dormant", "up").
      Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
      3db89662
  12. 10 6月, 2014 1 次提交
  13. 07 6月, 2014 1 次提交
    • E
      conf: alter disk mirror xml output · 7c6fc394
      Eric Blake 提交于
      Now that we track a disk mirror as a virStorageSource, we might
      as well update the XML to theoretically allow any type of
      mirroring destination (not just a local file).  A later patch
      will also be reusing <mirror> to track the block commit of the
      top layer of a chain, which is another case where libvirt needs
      to update the backing chain after the job is finally pivoted,
      and since backing chains can have network backing files as the
      destination to commit into, it makes more sense to display that
      in the XML.
      
      This patch changes output-only XML; it was already documented
      that <mirror> does not affect a domain definition at this point
      (because qemu doesn't provide persistent bitmaps yet).  Any
      application that was starting a block copy job with older libvirt
      and then relying on the domain XML to determine if it was
      complete will no longer be able to access the file= and format=
      attributes of mirror that were previously used.  However, this is
      not going to be a problem in practice: the only time a block copy
      job works is on a transient domain, and any app that is managing
      a transient domain probably already does enough of its own
      bookkeeping to know which file it is mirroring into without
      having to re-read it from the libvirt XML.  The one thing that
      was likely to be used in a mirroring job was the ready=
      attribute, which is unchanged.  Meanwhile, I made sure the schema
      and parser still accept the old format, even if we no longer
      output it, so that upgrading from an older version of libvirt is
      seamless.
      
      * docs/schemas/domaincommon.rng (diskMirror): Alter definition.
      * src/conf/domain_conf.c (virDomainDiskDefParseXML): Parse two
      styles of mirror elements.
      (virDomainDiskDefFormat): Output new style.
      * tests/qemuxml2argvdata/qemuxml2argv-disk-mirror-old.xml: New
      file, copied from...
      * tests/qemuxml2argvdata/qemuxml2argv-disk-mirror.xml: ...here
      before modernizing.
      * tests/qemuxml2xmloutdata/qemuxml2xmlout-disk-mirror-old*: New
      files.
      * tests/qemuxml2xmltest.c (mymain): Test both styles.
      Signed-off-by: NEric Blake <eblake@redhat.com>
      7c6fc394
  14. 06 6月, 2014 2 次提交
  15. 05 6月, 2014 1 次提交
  16. 04 6月, 2014 1 次提交
    • M
      virCaps: Expose distance between host NUMA nodes · 8ba0a58f
      Michal Privoznik 提交于
      If user or management application wants to create a guest,
      it may be useful to know the cost of internode latencies
      before the guest resources are pinned. For example:
      
      <capabilities>
      
        <host>
          ...
          <topology>
            <cells num='2'>
              <cell id='0'>
                <memory unit='KiB'>4004132</memory>
                <distances>
                  <sibling id='0' value='10'/>
                  <sibling id='1' value='20'/>
                </distances>
                <cpus num='2'>
                  <cpu id='0' socket_id='0' core_id='0' siblings='0'/>
                  <cpu id='2' socket_id='0' core_id='2' siblings='2'/>
                </cpus>
              </cell>
              <cell id='1'>
                <memory unit='KiB'>4030064</memory>
                <distances>
                  <sibling id='0' value='20'/>
                  <sibling id='1' value='10'/>
                </distances>
                <cpus num='2'>
                  <cpu id='1' socket_id='0' core_id='0' siblings='1'/>
                  <cpu id='3' socket_id='0' core_id='2' siblings='3'/>
                </cpus>
              </cell>
            </cells>
          </topology>
          ...
        </host>
        ...
      </capabilities>
      
      We can see the distance from node1 to node0 is 20 and within nodes 10.
      Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
      8ba0a58f
  17. 02 6月, 2014 2 次提交
  18. 27 5月, 2014 1 次提交
  19. 19 5月, 2014 1 次提交
  20. 13 5月, 2014 3 次提交
  21. 06 5月, 2014 1 次提交
  22. 05 5月, 2014 1 次提交
  23. 04 5月, 2014 1 次提交
    • D
      Release of libvirt-1.2.4 · 791fb3f6
      Daniel Veillard 提交于
      * docs/news.html.in libvirt.spec.in: updates for release
      * po/*.po*: fetched new localization and regenerated
      791fb3f6
  24. 29 4月, 2014 1 次提交
  25. 24 4月, 2014 2 次提交
    • R
      docs: document nmdm type console · 6d0a6175
      Roman Bogorodskiy 提交于
      * Add nmdm type device to domain format documnetation
      * Add a section about nmdm console usage to the bhyve driver
        documentation
      6d0a6175
    • J
      conf: Output disk backing store details in domain XML · a2e369bc
      Jiri Denemark 提交于
      The XML for quite a longish backing chain is shown below:
      
        <disk type='network' device='disk'>
          <driver name='qemu' type='qcow2'/>
          <source protocol='nbd' name='bar'>
            <host transport='unix' socket='/var/run/nbdsock'/>
          </source>
          <backingStore type='block' index='1'>
            <format type='qcow2'/>
            <source dev='/dev/HostVG/QEMUGuest1'/>
            <backingStore type='file' index='2'>
              <format type='qcow2'/>
              <source file='/tmp/image2.qcow'/>
              <backingStore type='file' index='3'>
                <format type='qcow2'/>
                <source file='/tmp/image3.qcow'/>
                <backingStore type='file' index='4'>
                  <format type='qcow2'/>
                  <source file='/tmp/image4.qcow'/>
                  <backingStore type='file' index='5'>
                    <format type='qcow2'/>
                    <source file='/tmp/image5.qcow'/>
                    <backingStore type='file' index='6'>
                      <format type='raw'/>
                      <source file='/tmp/Fedora-17-x86_64-Live-KDE.iso'/>
                      <backingStore/>
                    </backingStore>
                  </backingStore>
                </backingStore>
              </backingStore>
            </backingStore>
          </backingStore>
          <target dev='vdb' bus='virtio'/>
        </disk>
      
      Various disk types and formats can be mixed in one chain. The
      <backingStore/> empty element marks the end of the backing chain and it
      is there mostly for future support of parsing the chain provided by a
      user. If it's missing, we are supposed to probe for the rest of the
      chain ourselves, otherwise complete chain was provided by the user. The
      index attributes of backingStore elements can be used to unambiguously
      identify a specific part of the image chain.
      Signed-off-by: NJiri Denemark <jdenemar@redhat.com>
      a2e369bc
  26. 22 4月, 2014 1 次提交
  27. 18 4月, 2014 1 次提交
    • L
      docs: document that vfio is default for hostdev networks too · 668bf07f
      Laine Stump 提交于
      When the default was changed from kvm to vfio, the documentation for
      hostdev and interface was changed, but the documentation in <network>
      was forgotten.
      
      Also document when the default was changed from "always kvm" to "vfio
      if available, else kvm" (1.0.5).
      668bf07f
  28. 16 4月, 2014 2 次提交
    • E
      conf: fix omission of <driver> in domain dumpxml · 8fb44675
      Eric Blake 提交于
      I noticed that depending on the <driver> attributes the user passed
      in, the output may omit the <driver> element altogether.  For example,
      the rerror_policy has had this problem since commit 4bb4109f in Oct
      2011.  But in adding testsuite coverage to expose it, I found another
      problem: the C code is just fine without a driver name, but the
      XML validator required either a name or a cache mode.
      
      * src/conf/domain_conf.c (virDomainDiskDefFormat): Update
      conditional.
      * docs/schemas/domaincommon.rng (diskDriver): Simplify.
      * tests/qemuxml2argvdata/qemuxml2argv-disk-drive-copy-on-read.xml:
      * tests/qemuxml2argvdata/qemuxml2argv-disk-drive-copy-on-read.args:
      New files.
      * tests/qemuxml2argvdata/qemuxml2argv-disk-drive-discard.xml:
      Enhance test.
      * tests/qemuxml2xmloutdata/qemuxml2xmlout-disk-drive-discard.xml:
      Likewise.
      * tests/qemuxml2argvtest.c (mymain): New test.
      * tests/qemuxml2xmltest.c (mymain): Likewise.
      Signed-off-by: NEric Blake <eblake@redhat.com>
      Signed-off-by: NJiri Denemark <jdenemar@redhat.com>
      8fb44675
    • E
      conf: split <disk> schema into more pieces · fec1a939
      Eric Blake 提交于
      To make <disk> schema more maintainable and to allow for moving the
      pieces to a common file in the future. It relies on the ability to
      override definitions as part of an include, set up in the previous
      patch.
      
      The diff is a bit hard to read, because it mixes reindentation
      with refactoring; 'git diff -b --patience' may help.
      
      * docs/schemas/domaincommon.rng (disk): Refactor into pieces.
      (diskSource, diskSourceFile, diskSourceBlock, diskSourceDir)
      (diskSourceVolume: New defines.
      (diskSourceNetwork): Revise scope.
      * docs/schemas/domainsnapshot.rng (disksnapshot): Adjust.
      * tests/domainsnapshotxml2xmlin/disk-seclabel-invalid.xml,
      tests/domainsnapshotxml2xmlin/disk-network-seclabel-invalid.xml: New
      tests to check seclabel is forbidden in domain snapshot by schema.
      Signed-off-by: NEric Blake <eblake@redhat.com>
      Signed-off-by: NJiri Denemark <jdenemar@redhat.com>
      fec1a939