1. 08 3月, 2012 2 次提交
    • E
      xml: share 'unit' in RNG · cb7583e1
      Eric Blake 提交于
      The code supported unit='E' for "exabyte", but the RNG did not;
      conversely, the RNG supported "z" and "y" but the code did not
      (I'm jealous if you have that much storage, particularly since
      it won't fit in 64-bit off_t).  Also, the code supported
      <allocation unit='...'>, but not the RNG.
      
      In an effort to make 'unit' more worthwhile in future patches,
      it's easier to share it between files.
      
      In making this factorization, note that absFilePath is more
      permissive than 'path', so storage pools and storage volumes
      will now validate with a wider set of file names than before.
      I don't think this should be a problem in practice.
      
      * docs/schemas/storagepool.rng: Include basic types, rather than
      repeating things here.
      * docs/schemas/storagevol.rng: Likewise.
      * docs/schemas/basictypes.rng: Add 'unsignedLong', 'unit', and fix
      to match storage code.
      cb7583e1
    • E
      docs: use correct terminology for 1024 bytes · 9dfdeadc
      Eric Blake 提交于
      Yes, I like kilobytes better than kibibytes (when I say kilobytes,
      I generally mean 1024).  But since the term is ambiguous, it can't
      hurt to say what we mean, by using both the correct name and
      calling out the numeric equivalent.
      
      * src/libvirt.c (virDomainGetMaxMemory, virDomainSetMaxMemory)
      (virDomainSetMemory, virDomainSetMemoryFlags)
      (virNodeGetFreeMemory): Tweak wording.
      * docs/formatdomain.html.in: Likewise.
      * docs/formatstorage.html.in: Likewise.
      9dfdeadc
  2. 07 3月, 2012 1 次提交
    • O
      docs: Fix typo · b340994b
      Osier Yang 提交于
      It used "&lt" for ">", reported by Kyla Zhang <weizhan@redhat.com>
      b340994b
  3. 06 3月, 2012 1 次提交
    • L
      conf: parse/format type='hostdev' network interfaces · 3b1c191f
      Laine Stump 提交于
      This is the new interface type that sets up an SR-IOV PCI network
      device to be assigned to the guest with PCI passthrough after
      initializing some network device-specific things from the config
      (e.g. MAC address, virtualport profile parameters). Here is an example
      of the syntax:
      
        <interface type='hostdev' managed='yes'>
          <source>
            <address type='pci' domain='0' bus='0' slot='4' function='3'/>
          </source>
          <mac address='00:11:22:33:44:55'/>
          <address type='pci' domain='0' bus='0' slot='7' function='0'/>
        </interface>
      
      This would assign the PCI card from bus 0 slot 4 function 3 on the
      host, to bus 0 slot 7 function 0 on the guest, but would first set the
      MAC address of the card to 00:11:22:33:44:55.
      
      NB: The parser and formatter don't care if the PCI card being
      specified is a standard single function network adapter, or a virtual
      function (VF) of an SR-IOV capable network adapter, but the upcoming
      code that implements the back end of this config will work *only* with
      SR-IOV VFs. This is because modifying the mac address of a standard
      network adapter prior to assigning it to a guest is pointless - part
      of the device reset that occurs during that process will reset the MAC
      address to the value programmed into the card's firmware.
      
      Although it's not supported by any of libvirt's hypervisor drivers,
      usb network hostdevs are also supported in the parser and formatter
      for completeness and consistency. <source> syntax is identical to that
      for plain <hostdev> devices, except that the <address> element should
      have "type='usb'" added if bus/device are specified:
      
        <interface type='hostdev'>
          <source>
            <address type='usb' bus='0' device='4'/>
          </source>
          <mac address='00:11:22:33:44:55'/>
        </interface>
      
      If the vendor/product form of usb specification is used, type='usb'
      is implied:
      
        <interface type='hostdev'>
          <source>
            <vendor id='0x0012'/>
            <product id='0x24dd'/>
          </source>
          <mac address='00:11:22:33:44:55'/>
        </interface>
      
      Again, the upcoming patch to fill in the backend of this functionality
      will log an error and fail with "Unsupported Config" if you actually
      try to assign a USB network adapter to a guest using <interface
      type='hostdev'> - just use a standard <hostdev> entry in that case
      (and also for single-port PCI adapters).
      3b1c191f
  4. 01 3月, 2012 1 次提交
  5. 29 2月, 2012 2 次提交
  6. 28 2月, 2012 3 次提交
  7. 24 2月, 2012 1 次提交
    • D
      Update bug reporting page · 751fec35
      Dave Allan 提交于
      Remove suggestion that people file bugs against RHEL 5 and add a
      suggestion that people increase the visibility of their bugs by
      mentioning them on libvir-list.
      751fec35
  8. 15 2月, 2012 1 次提交
    • D
      Install API XML desc to a standard location · c95c90ee
      Daniel P. Berrange 提交于
      Language bindings may well want to use the libvirt-api.xml and
      libvirt-qemu-api.xml files to either auto-generate themselves,
      or sanity check the manually written bindings for completeness.
      Currently these XML files are not installed as standard, merely
      ending up as a %doc file in the RPM.
      
      This changes them to be installed into $prefix/share/libvirt/apis/
      The *-refs.xml files are not installed, since those are only
      useful during generation of the online API doc files.
      
      The pkg-config file is enhanced so that you can query the install
      location of the API files. eg
      
        # pkg-config --variable=libvirt_qemu_api libvirt
        /home/berrange/builder/i686-pc-mingw32/sys-root/mingw/share/libvirt/libvirt-qemu-api.xml
      
      * docs/Makefile.am: Install libvirt-api.xml & libvirt-qemu-api.xml
      * libvirt.pc.in: Add vars for querying API install location
      * libvirt.spec.in, mingw32-libvirt.spec.in: Include API XML files
      c95c90ee
  9. 13 2月, 2012 3 次提交
  10. 10 2月, 2012 1 次提交
  11. 07 2月, 2012 2 次提交
    • D
      Clarify the purpose of domxml-from-native · 10cc08ee
      Dave Allan 提交于
      Someone mentioned to me that they interpreted this section of the KVM
      driver page as suggesting that new guests should be created by
      creating a qemu commandline and converting it to XML with
      domxml-from-native.  I don't think that's the intent of
      domxml-from-native, so I added that clarification.
      10cc08ee
    • E
      seclabel: make code and RNG match · c052d8a8
      Eric Blake 提交于
      Commit b170eb99 introduced a bug: domains that had an explicit
      <seclabel type='none'/> when started would not be reparsed if
      libvirtd restarted.  It turns out that our testsuite was not
      exercising this because it never tried anything but inactive
      parsing.  Additionally, the live XML for such a domain failed
      to re-validate.  Applying just the tests/ portion of this patch
      will expose the bugs that are fixed by the other two files.
      
      * docs/schemas/domaincommon.rng (seclabel): Allow relabel under
      type='none'.
      * src/conf/domain_conf.c (virSecurityLabelDefParseXML): Per RNG,
      presence of <seclabel> with no type implies dynamic.  Don't
      require sub-elements for type='none'.
      * tests/qemuxml2xmltest.c (mymain): Add test.
      * tests/qemuxml2argvtest.c (mymain): Likewise.
      * tests/qemuxml2argvdata/qemuxml2argv-seclabel-none.xml: Add file.
      * tests/qemuxml2argvdata/qemuxml2argv-seclabel-none.args: Add file.
      Reported by Ansis Atteka.
      c052d8a8
  12. 06 2月, 2012 1 次提交
  13. 04 2月, 2012 3 次提交
    • E
      maint: consolidate several .gitignore files · 8f00276c
      Eric Blake 提交于
      Unlike .cvsignore under CVS, git allows for ignoring nested
      names.  We weren't very consistent where new tests were
      being ignored (some in .gitignore, some in tests/.gitignore),
      and I found it easier to just consolidate everything.
      
      * .gitignore: Subsume entries from subdirectories.
      * daemon/.gitignore: Delete.
      * docs/.gitignore: Likewise.
      * docs/devhelp/.gitignore: Likewise.
      * docs/html/.gitignore: Likewise.
      * examples/dominfo/.gitignore: Likewise.
      * examples/domsuspend/.gitignore: Likewise.
      * examples/hellolibvirt/.gitignore: Likewise.
      * examples/openauth/.gitignore: Likewise.
      * examples/domain-events/events-c/.gitignore: Likewise.
      * include/libvirt/.gitignore: Likewise.
      * src/.gitignore: Likewise.
      * src/esx/.gitignore: Likewise.
      * tests/.gitignore: Likewise.
      * tools/.gitignore: Likewise.
      8f00276c
    • P
      virterror.c: Fix several spelling mistakes · 99d24ab2
      Philipp Hahn 提交于
      compat{a->i}bility
      erron{->e}ous
      nec{c->}essary.
      Either "the" or "a".
      Signed-off-by: NPhilipp Hahn <hahn@univention.de>
      99d24ab2
    • E
      command: allow merging stdout and stderr in string capture · c9ace552
      Eric Blake 提交于
      Sometimes, its easier to run children with 2>&1 in shell notation,
      and just deal with stdout and stderr interleaved.  This was already
      possible for fd handling; extend it to also work when doing string
      capture of a child process.
      
      * docs/internals/command.html.in: Document this.
      * src/util/command.c (virCommandSetErrorBuffer): Likewise.
      (virCommandRun, virExecWithHook): Implement it.
      * tests/commandtest.c (test14): Test it.
      * daemon/remote.c (remoteDispatchAuthPolkit): Use new command
      feature.
      c9ace552
  14. 03 2月, 2012 2 次提交
    • D
      Add two new security label types · b170eb99
      Daniel P. Berrange 提交于
      Curently security labels can be of type 'dynamic' or 'static'.
      If no security label is given, then 'dynamic' is assumed. The
      current code takes advantage of this default, and avoids even
      saving <seclabel> elements with type='dynamic' to disk. This
      means if you temporarily change security driver, the guests
      can all still start.
      
      With the introduction of sVirt to LXC though, there needs to be
      a new default of 'none' to allow unconfined LXC containers.
      
      This patch introduces two new security label types
      
       - default:  the host configuration decides whether to run the
                   guest with type 'none' or 'dynamic' at guest start
       - none:     the guest will run unconfined by security policy
      
      The 'none' label type will obviously be undesirable for some
      deployments, so a new qemu.conf option allows a host admin to
      mandate confined guests. It is also possible to turn off default
      confinement
      
        security_default_confined = 1|0  (default == 1)
        security_require_confined = 1|0  (default == 0)
      
      * src/conf/domain_conf.c, src/conf/domain_conf.h: Add new
        seclabel types
      * src/security/security_manager.c, src/security/security_manager.h:
        Set default sec label types
      * src/security/security_selinux.c: Handle 'none' seclabel type
      * src/qemu/qemu.conf, src/qemu/qemu_conf.c, src/qemu/qemu_conf.h,
        src/qemu/libvirtd_qemu.aug: New security config options
      * src/qemu/qemu_driver.c: Tell security driver about default
        config
      b170eb99
    • D
      Add detail to documentation on storage pools and volumes. · e68f22ae
      Dave Allan 提交于
      The storage pools page contains details about the capabilities of the
      various pool types, but not an overview of how they are intended to be
      used.  This patch adds some explanation of what pools and volumes can
      be used for and why an administrator might want to use them.
      e68f22ae
  15. 02 2月, 2012 3 次提交
    • P
      xen_xs: name xendConfigVersion magic numbers · 184fc07f
      Philipp Hahn 提交于
      libvirt supports 4 different versions of the user-land XenD daemon. When
      queried the daemon just returns its generation number, which is hard to
      match to the version of the Xen tools.
      
      Replace the magic generation numbers by named enum definitions to
      improve code readability.
      Signed-off-by: NPhilipp Hahn <hahn@univention.de>
      184fc07f
    • E
      block rebase: add new API virDomainBlockRebase · 99fd69c3
      Eric Blake 提交于
      Qemu is adding the ability to do a partial rebase.  That is, given:
      
      base <- intermediate <- current
      
      virDomainBlockPull will produce:
      
      current
      
      but qemu now has the ability to leave base in the chain, to produce:
      
      base <- current
      
      Note that current qemu can only do a forward merge, and only with
      the current image as the destination, which is fully described by
      this API without flags.  But in the future, it may be possible to
      enhance this API for additional scenarios by using flags:
      
      Merging the current image back into a previous image (that is,
      undoing a live snapshot), could be done by passing base as the
      destination and flags with a bit requesting a backward merge.
      
      Merging any other part of the image chain, whether forwards (the
      backing image contents are pulled into the newer file) or backwards
      (the deltas recorded in the newer file are merged back into the
      backing file), could also be done by passing a new flag that says
      that base should be treated as an XML snippet rather than an
      absolute path name, where the XML could then supply the additional
      instructions of which part of the image chain is being merged into
      any other part.
      
      * include/libvirt/libvirt.h.in (virDomainBlockRebase): New
      declaration.
      * src/libvirt.c (virDomainBlockRebase): Implement it.
      * src/libvirt_public.syms (LIBVIRT_0.9.10): Export it.
      * src/driver.h (virDrvDomainBlockRebase): New driver callback.
      * src/rpc/gendispatch.pl (long_legacy): Add exemption.
      * docs/apibuild.py (long_legacy_functions): Likewise.
      99fd69c3
    • P
      xml: Add element <title> to allow short description of domains · b79ba838
      Peter Krempa 提交于
      This patch adds a new element <title> to the domain XML. This attribute
      can hold a short title defined by the user to ease the identification of
      domains. The title may not contain newlines and should be reasonably short.
      
       *docs/formatdomain.html.in
       *docs/schemas/domaincommon.rng
              - add schema grammar for the new element and documentation
        *src/conf/domain_conf.c
        *src/conf/domain_conf.h
              - add field to hold the new attribute
              - add code to parse and create XML with the new attribute
      b79ba838
  16. 01 2月, 2012 3 次提交
    • E
      build: fix text regression · c3c2cc65
      Eric Blake 提交于
      Commit 8a09ee41 tickles a bug in libxml2-2.7.6 on RHEL 6.2,
      where libxml2 treats the pattern [^\n] as excluding literal
      backslash and n, instead of the intended newline, thus failing
      to validate any domain name containing 'n'.
      
      * docs/schemas/domaincommon.rng: Use literal newline instead.
      c3c2cc65
    • L
      docs: fill out rawio description · b303465d
      Laine Stump 提交于
      The original doc entry for rawio didn't mention the values it could
      have, the default, or the fact that setting it to "yes" for one disk
      effectively set it to "yes" for all disks in the domain.
      b303465d
    • T
      conf: add rawio attribute to disk element of domain XML · 397e6a70
      Taku Izumi 提交于
       This patch adds a new attribute "rawio" to the "disk" element
       of domain XML. Valid values of "rawio" attribute are "yes"
       and "no".
       rawio='yes' indicates the disk is desirous of CAP_SYS_RAWIO.
      
       If you specify the following XML:
      
       <disk type='block' device='lun' rawio='yes'>
        ...
       </disk>
      
       the domain will be granted CAP_SYS_RAWIO.
       (of course, the domain have to be executed with root privilege)
      
      NOTE:
         - "rawio" attribute is only valid when device='lun'
         - At the moment, any other disks you won't use rawio can use rawio.
      Signed-off-by: NTaku Izumi <izumi.taku@jp.fujitsu.com>
      397e6a70
  17. 31 1月, 2012 2 次提交
    • L
      qemu: add "romfile" support to specify device boot ROM · 3801831c
      Laine Stump 提交于
      This patch addresses: https://bugzilla.redhat.com/show_bug.cgi?id=781562
      
      Along with the "rombar" option that controls whether or not a boot rom
      is made visible to the guest, qemu also has a "romfile" option that
      allows specifying a binary file to present as the ROM BIOS of any
      emulated or passthrough PCI device. This patch adds support for
      specifying romfile to both passthrough PCI devices, and emulated
      network devices that attach to the guest's PCI bus (just about
      everything other than ne2k_isa).
      
      One example of the usefulness of this option is described in the
      bugzilla report: 82576 sriov network adapters don't provide a ROM BIOS
      for the cards virtual functions (VF), but an image of such a ROM is
      available, and with this ROM visible to the guest, it can PXE boot.
      
      In libvirt's xml, the new option is configured like this:
      
         <hostdev>
           ...
           <rom file='/etc/fake/boot.bin'/>
           ...
         </hostdev
      
      (similarly for <interface>).
      3801831c
    • L
      qemu: (and conf) support rombar for network devices · 3284ac04
      Laine Stump 提交于
      When support for the rombar option was added, it was only added for
      PCI passthrough devices, configured with <hostdev>. The same option is
      available for any network device that is attached to the guest's PCI
      bus. This patch allows setting rombar for any PCI network device type.
      
      After adding cases to test this to qemuxml2argv-hostdev-pci-rombar.*,
      I decided to rename those files (to qemuxml2argv-pci-rom.*) to more
      accurately reflect the additional tests, and also noticed that up to
      now we've only been performing a domainschematest for that case, so I
      added the "pci-rom" test to both qemuxml2argv and qemuxml2xml (and in
      the process found some bugs whose fixes I squashed into previous
      commits of this series).
      3284ac04
  18. 27 1月, 2012 1 次提交
  19. 26 1月, 2012 2 次提交
  20. 25 1月, 2012 3 次提交
    • L
      docs: fix a few small typos in formatdomain.html.in · 0ad35376
      Laine Stump 提交于
      0ad35376
    • E
      metadata: group metadata next to description · 4d71ff45
      Eric Blake 提交于
      It's better to group all the metadata together.  This is a
      cosmetic output change; since the RNG allows interleave, it
      doesn't matter where the user stuck it on input, and an XPath
      query will find the same information when parsing the output.
      
      * src/conf/domain_conf.c (virDomainDefFormatInternal): Output
      metadata earlier.
      * docs/formatdomain.html.in: Update documentation.
      * tests/domainsnapshotxml2xmlout/metadata.xml: Update test.
      * tests/qemuxml2xmloutdata/qemuxml2xmlout-metadata.xml: Likewise.
      4d71ff45
    • Z
      Allow custom metadata in domain configuration XML · fa981fc9
      Zeeshan Ali (Khattak) 提交于
      Applications can now insert custom nodes and hierarchies into domain
      configuration XML. Although currently not enforced, applications are
      required to use their own namespaces on every custom node they insert,
      with only one top-level element per namespace.
      fa981fc9
  21. 24 1月, 2012 1 次提交
    • D
      QEMU guest agent support · c160ce33
      Daniel P. Berrange 提交于
      There is now a standard QEMU guest agent that can be installed
      and given a virtio serial channel
      
          <channel type='unix'>
            <source mode='bind' path='/var/lib/libvirt/qemu/f16x86_64.agent'/>
            <target type='virtio' name='org.qemu.guest_agent.0'/>
          </channel>
      
      The protocol that runs over the guest agent is JSON based and
      very similar to the JSON monitor. We can't use exactly the same
      code because there are some odd differences in the way messages
      and errors are structured. The qemu_agent.c file is based on
      a combination and simplification of qemu_monitor.c and
      qemu_monitor_json.c
      
      * src/qemu/qemu_agent.c, src/qemu/qemu_agent.h: Support for
        talking to the agent for shutdown
      * src/qemu/qemu_domain.c, src/qemu/qemu_domain.h: Add thread
        helpers for talking to the agent
      * src/qemu/qemu_process.c: Connect to agent whenever starting
        a guest
      * src/qemu/qemu_monitor_json.c: Make variable static
      c160ce33
  22. 18 1月, 2012 1 次提交
    • D
      Add new attribute wrpolicy to <driver> element · d9e0d820
      Deepak C Shetty 提交于
      This introduces new attribute wrpolicy with only supported
      value as immediate. This will be an optional
      attribute with no defaults. This helps specify whether
      to skip the host page cache.
      
      When wrpolicy is specified, meaning when wrpolicy=immediate
      a writeback is explicitly initiated for the dirty pages in
      the host page cache as part of the guest file write operation.
      
      Usage:
      <filesystem type='mount' accessmode='passthrough'>
        <driver type='path' wrpolicy='immediate'/>
        <source dir='/export/to/guest'/>
        <target dir='mount_tag'/>
      </filesystem>
      
      Currently this only works with type='mount' for the QEMU/KVM driver.
      Signed-off-by: NDeepak C Shetty <deepakcs@linux.vnet.ibm.com>
      d9e0d820