1. 22 1月, 2013 1 次提交
  2. 19 1月, 2013 1 次提交
  3. 18 1月, 2013 3 次提交
  4. 14 1月, 2013 4 次提交
    • D
      Introduce an LXC specific public API & library · 3d1596b0
      Daniel P. Berrange 提交于
      This patch introduces support for LXC specific public APIs. In
      common with what was done for QEMU, this creates a libvirt_lxc.so
      library and libvirt/libvirt-lxc.h header file.
      
      The actual APIs are
      
        int virDomainLxcOpenNamespace(virDomainPtr domain,
                                      int **fdlist,
                                      unsigned int flags);
      
        int virDomainLxcEnterNamespace(virDomainPtr domain,
                                       unsigned int nfdlist,
                                       int *fdlist,
                                       unsigned int *noldfdlist,
                                       int **oldfdlist,
                                       unsigned int flags);
      
      which provide a way to use the setns() system call to move the
      calling process into the container's namespace. It is not
      practical to write in a generically applicable manner. The
      nearest that we could get to such an API would be an API which
      allows to pass a command + argv to be executed inside a
      container. Even if we had such a generic API, this LXC specific
      API is still useful, because it allows the caller to maintain
      the current process context, in particular any I/O streams they
      have open.
      
      NB the virDomainLxcEnterNamespace() API is special in that it
      runs client side, so does not involve the internal driver API.
      Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
      3d1596b0
    • D
      Convert HAVE_NUMACTL to WITH_NUMACTL · 6f736c83
      Daniel P. Berrange 提交于
      Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
      6f736c83
    • C
      docs: restrict the set of characters for info keys · bf1786b6
      Claudio Bley 提交于
      When parsing the top level comment of a file, apibuild.py used
      to split on any ':' character of a line regarding the first part
      as a key for a setting, e.g. "Summary". The second part would then
      be assigned as the value for that key.
      
      This means you could not use a ':' character inside those comments
      without ill effects.
      
      Now, a key must consist solely of alphanumeric characters, '_' or '.'.
      bf1786b6
    • C
      docs: simplify code · 833e1493
      Claudio Bley 提交于
      833e1493
  5. 12 1月, 2013 2 次提交
  6. 11 1月, 2013 1 次提交
  7. 10 1月, 2013 2 次提交
    • G
      network: fix typos and docs · 29d37818
      Guannan Ren 提交于
      29d37818
    • G
      qemu: add usb-serial support · e3a04455
      Guannan Ren 提交于
      Add an optional 'type' attribute to <target> element of serial port
      device. There are two choices for its value, 'isa-serial' and
      'usb-serial'. For backward compatibility, when attribute 'type' is
      missing the 'isa-serial' will be chosen as before.
      
      Libvirt XML sample
      
          <serial type='pty'>
            <target type='usb-serial' port='0'/>
            <address type='usb' bus='0' port='1'/>
          </serial>
      
      qemu commandline:
      
      qemu ${other_vm_args}              \
          -chardev pty,id=charserial0    \
          -device usb-serial,chardev=charserial0,id=serial0,bus=usb.0,port=1
      e3a04455
  8. 09 1月, 2013 1 次提交
    • C
      docs: break longer text into paragraphs in HTML · 3b54b2e3
      Claudio Bley 提交于
      Libvirt's HTML documentation is not as easy to the eyes as it could
      be since long text has no visual breaks.
      
      Take advantage of the formatting in documentation comments and wrap
      each part separated by two consecutive \n into a HTML <p> element.
      3b54b2e3
  9. 08 1月, 2013 2 次提交
  10. 07 1月, 2013 1 次提交
    • O
      docs: Add docs and rng schema for new XML tag sgio · b9c57e7b
      Osier Yang 提交于
      This introduces new XML tag "sgio" for disk, its valid values
      are "filtered" and "unfiltered", setting it as "filtered" will
      set the disk's unpriv_sgio to 0, and "unfiltered" to set it
      as 1, which allows the unprivileged SG_IO commands.
      b9c57e7b
  11. 21 12月, 2012 1 次提交
  12. 18 12月, 2012 2 次提交
    • J
      docs: Fix documentation for readonly element · 4ed80c76
      Jiri Denemark 提交于
      4ed80c76
    • D
      Add support for <hostdev mode="capabilities"> · aae0fc2a
      Daniel P. Berrange 提交于
      The <hostdev> device type has long had a redundant "mode"
      attribute, which has always been "subsys". This finally
      introduces a new mode "capabilities", which will be used
      by the LXC driver for device assignment. Since container
      based virtualization uses a single kernel, the idea of
      assigning physical PCI devices doesn't make sense. It is
      still reasonable to assign USB devices, but for assigning
      arbitrary nodes in /dev, the new 'capabilities' mode is
      to be used.
      
      The first capability support is 'storage', which is for
      assignment of block devices. Functionally this is really
      pretty similar to the <disk> support. The only difference
      is the device node name is identical in both host and
      container namespaces.
      
          <hostdev mode='capabilities' type='storage'>
            <source>
              <block>/dev/sdf1</block>
            </source>
          </hostdev>
      
      The second capability support is 'misc', which is for
      assignment of character devices. There is no existing
      parallel to this. Again the device node is the same
      inside & outside the container.
      
          <hostdev mode='capabilities' type='misc'>
            <source>
              <char>/dev/input/event3</char>
            </source>
          </hostdev>
      
      The reason for keeping the char & storage devices
      separate in the domain XML, is to mirror the split
      in the node device XML. NB the node device XML does
      not yet report character devices, but that's another
      new patch to come
      Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
      aae0fc2a
  13. 17 12月, 2012 3 次提交
    • P
      docs: Replace </br> with <br/> in docs/news.html.in · c17b16d1
      Peter Krempa 提交于
      c17b16d1
    • G
      conf: add optional attribte primary to video <model> element · 09938bb3
      Guannan Ren 提交于
      If there are multiple video devices
      primary = 'yes' marks this video device as the primary one.
      The rest are secondary video devices. No more than one could be
      mark as primary. If none of them has primary attribute, the first
      one will be the primary by default like what it was.
      The reason of this changing is that for qemu, only one primary video
      device is permitted which can be of any type. For secondary video
      devices, only qxl is allowd. Primary attribute removes the restriction
      that the first have to be the primary one.
      
      We always put the primary video device into the first position of
      video device structure array after parsing.
      09938bb3
    • D
      Release of libvirt-1.0.1 · 34ca5684
      Daniel Veillard 提交于
      - configure.ac docs/news.html.in: update for the release
      - po/*.po: updated from transifex
      34ca5684
  14. 14 12月, 2012 2 次提交
  15. 12 12月, 2012 2 次提交
    • J
      docs: Document offline migration · 748f6dd0
      Jiri Denemark 提交于
      748f6dd0
    • M
      bandwidth: add new 'floor' attribute · ec6474b2
      Michal Privoznik 提交于
      This is however supported only on domain interfaces with
      type='network'. Moreover, target network needs to have at least
      inbound QoS set. This is required by hierarchical traffic shaping.
      
      From now on, the required attribute for <inbound/> is either 'average'
      (old) or 'floor' (new). This new attribute can be used just for
      interfaces type of network (<interface type='network'/>) currently.
      ec6474b2
  16. 11 12月, 2012 1 次提交
    • G
      network: add support for DHCPv6 · 2d5cd1d7
      Gene Czarcinski 提交于
      The DHCPv6 support includes IPV6 dhcp-range and dhcp-host for one
      IPv6 subnetwork on one interface.  This support will only work
      if dnsmasq version >= 2.64; otherwise an error occurs if
      dhcp-range or dhcp-host is specified for an IPv6 address.
      
      Essentially, this change provides the same DHCP support for IPv6
      that has been available for IPv4.
      
      With dnsmasq >= 2.64, support for the RA service is also now provided
      by dnsmasq (radvd is no longer used/started). (Although at least one
      version of dnsmasq prior to 2.64 "supported" IPv6 Router
      Advertisement, there were bugs (fixed in 2.64) that rendered it
      unusable.)
      
      Documentation and the network schema has been updated
      to reflect the new support.
      2d5cd1d7
  17. 07 12月, 2012 2 次提交
  18. 06 12月, 2012 1 次提交
    • G
      network: allow guest to guest IPv6 without gateway definition · 705e67d4
      Gene Czarcinski 提交于
      This patch adds the capability for virtual guests to do IPv6
      communication via a virtual network interface with no IPv6 (gateway)
      addresses specified.  This capability has always been enabled by
      default for IPv4, but disabled for IPv6 for security concerns, and
      because it requires the ip6tables command to be operational (which
      isn't the case on a system with the ipv6 module completely disabled).
      
      This patch adds a new attribute "ipv6" at the toplevel of a <network>
      object.  If ipv6='yes', the extra ip6tables rules required to permite
      inter-guest communications are added when the network is started. If
      it is 'no', or not present, those rules will not be added; thus the
      default behavior doesn't change, so there should be no compatibility
      issues with any existing installations.
      
      Note that virtual guests cannot communication with the virtualization
      host via this interface, because the following kernel tunable has
      been set:
      
         net.ipv6.conf.<bridge_interface_name>.disable_ipv6 = 1
      
      This assures that the bridge interface will not have an IPv6
      link-local (fe80::) address.
      
      To control this behavior so that it is not enabled by default, the parameter
      ipv6='yes' on the <network> statement has been added.
      
      Documentation related to this patch has been updated.
      The network schema has also been updated.
      705e67d4
  19. 27 11月, 2012 1 次提交
    • H
      Add Gluster protocol as supported network disk backend · a2d2b80f
      Harsh Prateek Bora 提交于
      This patch introduces the RNG schema and updates necessary data strucutures
      to allow various hypervisors to make use of Gluster protocol as one of the
      supported network disk backend. Next patch will add support to make use of
      this feature in Qemu since it now supports Gluster protocol as one of the
      network based storage backend.
      
      Two new optional attributes for <host> element are introduced - 'transport'
      and 'socket'. Valid transport values are tcp, unix or rdma. If none specified,
      tcp is assumed. If transport is unix, socket specifies path to unix socket.
      
      This patch allows users to specify disks on gluster backends like this:
      
          <disk type='network' device='disk'>
            <driver name='qemu' type='raw'/>
            <source protocol='gluster' name='Volume1/image'>
              <host name='example.org' port='6000' transport='tcp'/>
            </source>
            <target dev='vda' bus='virtio'/>
          </disk>
      
          <disk type='network' device='disk'>
            <driver name='qemu' type='raw'/>
            <source protocol='gluster' name='Volume2/image'>
              <host transport='unix' socket='/path/to/sock'/>
            </source>
            <target dev='vdb' bus='virtio'/>
          </disk>
      Signed-off-by: NHarsh Prateek Bora <harsh@linux.vnet.ibm.com>
      a2d2b80f
  20. 22 11月, 2012 2 次提交
  21. 15 11月, 2012 1 次提交
  22. 02 11月, 2012 3 次提交
    • E
      snapshot: new XML for external system checkpoint · 4201a7ea
      Eric Blake 提交于
      Each <domainsnapshot> can now contain an optional <memory>
      element that describes how the VM state was handled, similar
      to disk snapshots.  The new element will always appear in
      output; for back-compat, an input that lacks the element will
      assume 'no' or 'internal' according to the domain state.
      
      Along with this change, it is now possible to pass <disks> in
      the XML for an offline snapshot; this also needs to be wired up
      in a future patch, to make it possible to choose internal vs.
      external on a per-disk basis for each disk in an offline domain.
      At that point, using the --disk-only flag for an offline domain
      will be able to work.
      
      For some examples below, remember that qemu supports the
      following snapshot actions:
      
      qemu-img: offline external and internal disk
      savevm: online internal VM and disk
      migrate: online external VM
      transaction: online external disk
      
      =====
      <domainsnapshot>
        <memory snapshot='no'/>
        ...
      </domainsnapshot>
      
      implies that there is no VM state saved (mandatory for
      offline and disk-only snapshots, not possible otherwise);
      using qemu-img for offline domains and transaction for online.
      
      =====
      <domainsnapshot>
        <memory snapshot='internal'/>
        ...
      </domainsnapshot>
      
      state is saved inside one of the disks (as in qemu's 'savevm'
      system checkpoint implementation).  If needed in the future,
      we can also add an attribute pointing out _which_ disk saved
      the internal state; maybe disk='vda'.
      
      =====
      <domainsnapshot>
        <memory snapshot='external' file='/path/to/state'/>
        ...
      </domainsnapshot>
      
      This is not wired up yet, but future patches will allow this to
      control a combination of 'virsh save /path/to/state' plus disk
      snapshots from the same point in time.
      
      =====
      
      So for 1.0.1 (and later, as needed), I plan to implement this table
      of combinations, with '*' designating new code and '+' designating
      existing code reached through new combinations of xml and/or the
      existing DISK_ONLY flag:
      
      domain  memory  disk   disk-only | result
      -----------------------------------------
      offline omit    omit   any       | memory=no disk=int, via qemu-img
      offline no      omit   any       |+memory=no disk=int, via qemu-img
      offline omit/no no     any       | invalid combination (nothing to snapshot)
      offline omit/no int    any       |+memory=no disk=int, via qemu-img
      offline omit/no ext    any       |*memory=no disk=ext, via qemu-img
      offline int/ext any    any       | invalid combination (no memory to save)
      online  omit    omit   off       | memory=int disk=int, via savevm
      online  omit    omit   on        | memory=no disk=default, via transaction
      online  omit    no/ext off       | unsupported for now
      online  omit    no     on        | invalid combination (nothing to snapshot)
      online  omit    ext    on        | memory=no disk=ext, via transaction
      online  omit    int    off       |+memory=int disk=int, via savevm
      online  omit    int    on        | unsupported for now
      online  no      omit   any       |+memory=no disk=default, via transaction
      online  no      no     any       | invalid combination (nothing to snapshot)
      online  no      int    any       | unsupported for now
      online  no      ext    any       |+memory=no disk=ext, via transaction
      online  int/ext any    on        | invalid combination (disk-only vs. memory)
      online  int     omit   off       |+memory=int disk=int, via savevm
      online  int     no/ext off       | unsupported for now
      online  int     int    off       |+memory=int disk=int, via savevm
      online  ext     omit   off       |*memory=ext disk=default, via migrate+trans
      online  ext     no     off       |+memory=ext disk=no, via migrate
      online  ext     int    off       | unsupported for now
      online  ext     ext    off       |*memory=ext disk=ext, via migrate+transaction
      
      * docs/schemas/domainsnapshot.rng (memory): New RNG element.
      * docs/formatsnapshot.html.in: Document it.
      * src/conf/snapshot_conf.h (virDomainSnapshotDef): New fields.
      * src/conf/domain_conf.c (virDomainSnapshotDefFree)
      (virDomainSnapshotDefParseString, virDomainSnapshotDefFormat):
      Manage new fields.
      * tests/domainsnapshotxml2xmltest.c: New test.
      * tests/domainsnapshotxml2xmlin/*.xml: Update existing tests.
      * tests/domainsnapshotxml2xmlout/*.xml: Likewise.
      4201a7ea
    • D
      Document bracket whitespace rules & add syntax-check rule · a3e95abe
      Daniel P. Berrange 提交于
      This documents the following whitespace rules
      
            if(foo)   // Bad
            if (foo)  // Good
      
            int foo (int wizz)  // Bad
            int foo(int wizz)   // Good
      
            bar = foo (wizz);  // Bad
            bar = foo(wizz);   // Good
      
            typedef int (*foo) (int wizz);  // Bad
            typedef int (*foo)(int wizz);   // Good
      
            int foo( int wizz );  // Bad
            int foo(int wizz);    // Good
      
      There is a syntax-check rule extension to validate all these rules.
      Checking for 'function (...args...)' is quite difficult since it
      needs to ignore valid usage with keywords like 'if (...test...)'
      and while/for/switch. It must also ignore source comments and
      quoted strings.
      
      It is not possible todo this with a simple regex in the normal
      syntax-check style. So a short Perl script is created instead
      to analyse the source. In practice this works well enough. The
      only thing it can't cope with is multi-line quoted strings of
      the form
      
       "start of string\
      more lines\
      more line\
      the end"
      
      but this can and should be written as
      
       "start of string"
       "more lines"
       "more line"
       "the end"
      
      with this simple change, the bracket checking script does not
      have any false positives across libvirt source, provided it
      is only run against .c files. It is not practical to run it
      against .h files, since those use whitespace extensively to
      get alignment (though this is somewhat inconsistent and could
      arguably be fixed).
      
      The only limitation is that it cannot detect a violation where
      the first arg starts with a '*', eg
      
         foo(*wizz);
      
      since this generates too many false positives on function
      typedefs which can't be supressed efficiently.
      Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
      a3e95abe
    • D
      Release of libvirt-1.0.0 · 2b435c15
      Daniel Veillard 提交于
      * configure.ac docs/news.html.in libvirt.spec.in: update for the new release
      * po/*.po*: update from transifex, a lot of added support e.g. Indian
        languages, and regenerate
      2b435c15
  23. 30 10月, 2012 1 次提交