1. 02 11月, 2012 1 次提交
    • 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
  2. 20 10月, 2012 1 次提交
    • E
      storage: match RNG to supported driver types · e2c41e48
      Eric Blake 提交于
      At one point, the code passed through arbitrary strings for file
      formats, which supposedly lets qemu handle a new file type even
      before libvirt has been taught to handle it.  However, to properly
      label files, libvirt has to learn the file type anyway, so we
      might as well make our life easier by only accepting file types
      that we are prepared to handle.  This patch lets the RNG validation
      ensure that only known strings are let through.
      
      * docs/schemas/domaincommon.rng (driverFormat): Limit to list of
      supported strings.
      * docs/schemas/domainsnapshot.rng (driver): Likewise.
      e2c41e48
  3. 18 10月, 2012 1 次提交
    • P
      conf: Add support for HyperV Enlightenment features · cc922fdd
      Peter Krempa 提交于
      Hypervisors are starting to support HyperV Enlightenment features that
      improve behavior of guests running Microsoft Windows operating systems.
      
      This patch adds support for the "relaxed" feature that improves timer
      behavior and also establishes a framework to add these features in
      future.
      cc922fdd
  4. 12 10月, 2012 1 次提交
    • J
      conf: Mark missing optional USB devices in domain XML · f95560b3
      Jiri Denemark 提交于
      When startupPolicy set for a USB devices allows such device to be
      missing, there was no way this could be detected from domain XML. With
      this patch, libvirt emits a new missing='yes' attribute for such devices
      when active domain XML is generated.
      f95560b3
  5. 11 10月, 2012 3 次提交
    • J
      conf: Add support for startupPolicy for USB devices · e658daeb
      Jiri Denemark 提交于
      USB devices can disappear without OS being mad about it, which makes
      them ideal for startupPolicy. With this attribute, USB devices can be
      configured to be mandatory (the default), requisite (will disappear
      during migration if they cannot be found), or completely optional.
      e658daeb
    • J
      conf: Add on_lockfailure event configuration · 76f5bcab
      Jiri Denemark 提交于
      Using this new element, one can configure an action that should be
      performed when resource locks are lost.
      76f5bcab
    • J
      conf: Rename life cycle actions to event actions · d0ea530b
      Jiri Denemark 提交于
      While current on_{poweroff,reboot,crash} action configuration is about
      configuring life cycle actions, they can all be considered events and
      actions that need to be done on a particular event. Let's generalize the
      code by renaming life cycle actions to event actions so that it can be
      reused later for non-lifecycle events.
      d0ea530b
  6. 21 9月, 2012 1 次提交
  7. 20 9月, 2012 2 次提交
    • M
      Add support for limiting guest coredump · 78f3666f
      Martin Kletzander 提交于
      Sometimes when guest machine crashes, coredump can get huge due to the
      guest memory. This can be limited using madvise(2) system call and is
      being used in QEMU hypervisor. This patch adds an option for configuring
      that in the domain XML and related documentation.
      78f3666f
    • M
      Add support for reboot-timeout · c33a922f
      Martin Kletzander 提交于
      Whenever the guest machine fails to boot, new parameter (reboot-timeout)
      controls whether it should reboot and after how many ms it should do so.
      
      Docs included.
      c33a922f
  8. 18 9月, 2012 1 次提交
    • O
      schema: Add schema for disk <wwn> · dbb7df1f
      Osier Yang 提交于
      * docs/formatdomain.html.in: Add document.
      * docs/schemas/nodedev.rng: Move definition of "wwn" to ...
      * docs/schemas/basictypes.rng: ...Here
      * docs/schemas/domaincommon.rng: Add schema for disk <wwn>
      dbb7df1f
  9. 14 9月, 2012 1 次提交
    • M
      Add support for EOI with APIC · 4a8b7cba
      Martin Kletzander 提交于
      New options is added to support EOI (End of Interrupt) exposure for
      guests. As it makes sense only when APIC is enabled, I added this into
      the <apic> element in <features> because this should be tri-state
      option (cannot be handled as standalone feature).
      4a8b7cba
  10. 13 9月, 2012 1 次提交
  11. 04 9月, 2012 1 次提交
    • V
      Rename iolimit to blockio. · 72f1f220
      Viktor Mihajlovski 提交于
      After discussion with DB we decided to rename the new iolimit
      element as it creates the impression it would be there to
      limit (i.e. throttle) I/O instead of specifying immutable
      characteristics of a block device.
      This is also backed by the fact that the term I/O Limits has
      vanished from newer storage admin documentation.
      Signed-off-by: NViktor Mihajlovski <mihajlov@linux.vnet.ibm.com>
      72f1f220
  12. 03 9月, 2012 1 次提交
    • M
      Add per-guest S3/S4 state configuration · 09cd8f2d
      Martin Kletzander 提交于
      There is a new <pm/> element implemented that can control what ACPI
      sleeping states will be advertised by BIOS and allowed to be switched
      to by libvirt. The default keeps defaults on hypervisor, otherwise
      forces chosen setting.
      The documentation of the pm element is added as well.
      09cd8f2d
  13. 01 9月, 2012 1 次提交
  14. 31 8月, 2012 1 次提交
  15. 22 8月, 2012 3 次提交
  16. 21 8月, 2012 1 次提交
  17. 18 8月, 2012 1 次提交
  18. 16 8月, 2012 2 次提交
    • L
      conf: add <vlan> element to network and domain interface elements · 3f9274a5
      Laine Stump 提交于
      The following config elements now support a <vlan> subelements:
      
      within a domain: <interface>, and the <actual> subelement of <interface>
      within a network: the toplevel, as well as any <portgroup>
      
      Each vlan element must have one or more <tag id='n'/> subelements.  If
      there is more than one tag, it is assumed that vlan trunking is being
      requested. If trunking is required with only a single tag, the
      attribute "trunk='yes'" should be added to the toplevel <vlan>
      element.
      
      Some examples:
      
        <interface type='hostdev'/>
          <vlan>
            <tag id='42'/>
          </vlan>
          <mac address='52:54:00:12:34:56'/>
          ...
        </interface>
      
        <network>
          <name>vlan-net</name>
          <vlan trunk='yes'>
            <tag id='30'/>
          </vlan>
          <virtualport type='openvswitch'/>
        </network>
      
        <interface type='network'/>
          <source network='vlan-net'/>
          ...
        </interface>
      
        <network>
          <name>trunk-vlan</name>
          <vlan>
            <tag id='42'/>
            <tag id='43'/>
          </vlan>
          ...
        </network>
      
        <network>
          <name>multi</name>
          ...
          <portgroup name='production'/>
            <vlan>
              <tag id='42'/>
            </vlan>
          </portgroup>
          <portgroup name='test'/>
            <vlan>
              <tag id='666'/>
            </vlan>
          </portgroup>
        </network>
      
        <interface type='network'/>
          <source network='multi' portgroup='test'/>
          ...
        </interface>
      
      IMPORTANT NOTE: As of this patch there is no backend support for the
      vlan element for *any* network device type. When support is added in
      later patches, it will only be for those select network types that
      support setting up a vlan on the host side, without the guest's
      involvement. (For example, it will be possible to configure a vlan for
      a guest connected to an openvswitch bridge, but it won't be possible
      to do that for one that is connected to a standard Linux host bridge.)
      3f9274a5
    • L
      schema: fix some problems in network/interface schemas · e4a199a1
      Laine Stump 提交于
      <portgroup> allows a <bandwidth> element, but the schema didn't have
      this. Since this makes for multiple elements in portgroup, they must
      be interleaved.
      
      <interface type='bridge'> needs to allow <virtualport> elements
      for openvswitch, but the schema didn't allow this.
      e4a199a1
  19. 15 8月, 2012 3 次提交
    • D
      9700ca82
    • L
      network: add connections counter to networks · 300bcdb6
      Laine Stump 提交于
      Just as each physical device used by a network has a connections
      counter, now each network has a connections counter which is
      incremented once for each guest interface that connects using this
      network.
      
      The count is output in the live network XML, like this:
      
         <network connections='20'>
         ...
         </network>
      
      It is read-only, and for informational purposes only - it isn't used
      internally anywhere by libvirt.
      300bcdb6
    • L
      conf: support partially-specified <virtualport> in parser and formatter · 4af3cbaf
      Laine Stump 提交于
      Until now, all attributes in a <virtualport> parameter list that were
      acceptable for a particular type, were also required. There were no
      optional attributes.
      
      One of the aims of supporting <virtualport> in libvirt's virtual
      networks and portgroups is to allow specifying the group-wide
      parameters in the network's virtualport, and merge that with the
      interface's virtualport, which will have the instance-specific info
      (i.e. the interfaceid or instanceid).
      
      Additionally, the guest's interface XML shouldn't need to know what
      type of network connection will be used prior to runtime - it could be
      openvswitch, 802.1Qbh, 802.1Qbg, or none of the above - but should
      still be able to specify instance-specific info just in case it turns
      out to be applicable.
      
      Finally, up to now, the parser for virtualport has always generated a
      random instanceid/interfaceid when appropriate, making it impossible
      to leave it blank (which is what's required for virtualports within a
      network/portprofile definition).
      
      This patch modifies the parser and formatter of the <virtualport>
      element in the following ways:
      
      * because most of the attributes in a virNetDevVPortProfile are fixed
        size binary data with no reserved values, there is no way to embed a
        "this value wasn't specified" sentinel into the existing data. To
        solve this problem, the new *_specified fields in the
        virNetDevVPortProfile object that were added in a previous patch of
        this series are now set when the corresponding attribute is present
        during the parse.
      
      * allow parsing/formatting a <virtualport> that has no type set. In
        this case, all fields are settable, but all are also optional.
      
      * add a GENERATE_MISSING_DEFAULTS flag to the parser - if this flag is
        set and an instanceid/interfaceid is expected but not provided, a
        random one will be generated. This was previously the default
        behavior, but is now done only for virtualports inside an
        <interface> definition, not for those in <network> or <portgroup>.
      
      * add a REQUIRE_ALL_ATTRIBUTES flag to the parser - if this flag is
        set the parser will call the new
        virNetDevVPortProfileCheckComplete() functions at the end of the
        parser to check for any missing attributes (based on type), and
        return failure if anything is missing. This used to be default
        behavior. Now it is only used for the virtualport defined inside an
        interface's <actual> element (by the time you've figured out the
        contents of <actual>, you should have all the necessary data to fill
        in the entire virtualport)
      
      * add a REQUIRE_TYPE flag to the parser - if this flag is set, the
        parser will return an error if the virtualport has no type
        attribute. This also was previously the default behavior, but isn't
        needed in the case of the virtualport for a type='network' interface
        (i.e. the exact type isn't yet known), or the virtualport of a
        portgroup (i.e. the portgroup just has modifiers for the network's
        virtualport, which *does* require a type) - in those cases, the
        check will be done at domain startup, once the final virtualport is
        assembled (this is handled in the next patch).
      4af3cbaf
  20. 03 8月, 2012 2 次提交
    • H
      Added timestamps to storage volumes · 7383c1d7
      Hendrik Schwartke 提交于
      The access, birth, modification and change times are added to
      storage volumes and corresponding xml representations.  This
      shows up in the XML in this format:
      
      <timestamps>
        <atime>1341933637.027319099</atime>
        <mtime>1341933637.027319099</mtime>
      </timestamps>
      Signed-off-by: NEric Blake <eblake@redhat.com>
      7383c1d7
    • J
      Update xml schemas according to libvirt source · 37a10129
      Ján Tomko 提交于
      capability.rng: Guest features can be in any order.
      nodedev.rng: Added <driver> element, <capability> phys_function and
      virt_functions for PCI devices.
      storagepool.rng: Owner or group ID can be -1.
      
      schema tests: New capabilities and nodedev files; changed owner and
      group to -1 in pool-dir.xml.
      storage_conf: Print uid_t and gid_t as signed to storage pool XML.
      37a10129
  21. 02 8月, 2012 1 次提交
    • P
      domain_conf: Add USB controler model "none" · 09251897
      Peter Krempa 提交于
      Libvirt adds a USB controller to the guest even if the user does not
      specify any in the XML. This is due to back-compat reasons.
      
      To allow disabling USB for a guest this patch adds a new USB controller
      type "none" that disables USB support for the guest.
      09251897
  22. 19 7月, 2012 1 次提交
    • S
      Add a sheepdog backend for the storage driver · 29bc4fe6
      Sebastian Wiedenroth 提交于
      This patch brings support to manage sheepdog pools and volumes to libvirt.
      It uses the "collie" command-line utility that comes with sheepdog for that.
      
      A sheepdog pool in libvirt maps to a sheepdog cluster.
      It needs a host and port to connect to, which in most cases
      is just going to be the default of localhost on port 7000.
      
      A sheepdog volume in libvirt maps to a sheepdog vdi.
      To create one specify the pool, a name and the capacity.
      Volumes can also be resized later.
      
      In the volume XML the vdi name has to be put into the <target><path>.
      To use the volume as a disk source for virtual machines specify
      the vdi name as "name" attribute of the <source>.
      The host and port information from the pool are specified inside the host tag.
      
        <disk type='network'>
          ...
          <source protocol="sheepdog" name="vdi_name">
            <host name="localhost" port="7000"/>
          </source>
        </disk>
      
      To work right this patch parses the output of collie,
      so it relies on the raw output option. There recently was a bug which caused
      size information to be reported wrong. This is fixed upstream already and
      will be in the next release.
      Signed-off-by: NSebastian Wiedenroth <wiedi@frubar.net>
      29bc4fe6
  23. 11 7月, 2012 1 次提交
  24. 03 7月, 2012 1 次提交
  25. 25 6月, 2012 2 次提交
    • D
      Add support for guest bind mounts with LXC · 3b1ddec1
      Daniel P. Berrange 提交于
      Currently you can configure LXC to bind a host directory to
      a guest directory, but not to bind a guest directory to a
      guest directory. While the guest container init could do
      this itself, allowing it in the libvirt XML means a stricter
      SELinux policy can be written
      3b1ddec1
    • D
      Add support for RAM filesystems for LXC · 76b644c3
      Daniel P. Berrange 提交于
      Introduce a new syntax for filesystems to allow use of a RAM
      filesystem
      
         <filesystem type='ram'>
            <source usage='10' units='MiB'/>
            <target dir='/mnt'/>
         </filesystem>
      
      The usage units default to KiB to limit consumption of host memory.
      
      * docs/formatdomain.html.in: Document new syntax
      * docs/schemas/domaincommon.rng: Add new attributes
      * src/conf/domain_conf.c: Parsing/formatting of RAM filesystems
      * src/lxc/lxc_container.c: Mounting of RAM filesystems
      Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
      76b644c3
  26. 21 6月, 2012 1 次提交
  27. 18 6月, 2012 1 次提交
  28. 15 6月, 2012 1 次提交
    • O
      schema: Update domain XML schema · b34324fb
      Osier Yang 提交于
      'boot' tag shouldn't be exclusive with 'kernel', 'initrd', and 'cmdline',
      though the boot sequence doesn't make sense when the guest boots from
      kernel directly. But it's useful if booting from kernel is to install
      a newguest, even if it's not to install a guest, there is no hurt. And
      on the other hand, we allow 'boot' and the kernel tags when parsing.
      b34324fb
  29. 24 5月, 2012 1 次提交
  30. 22 5月, 2012 1 次提交
    • W
      storage backend: Add RBD (RADOS Block Device) support · 74951ead
      Wido den Hollander 提交于
      This patch adds support for a new storage backend with RBD support.
      
      RBD is the RADOS Block Device and is part of the Ceph distributed storage
      system.
      
      It comes in two flavours: Qemu-RBD and Kernel RBD, this storage backend only
      supports Qemu-RBD, thus limiting the use of this storage driver to Qemu only.
      
      To function this backend relies on librbd and librados being present on the
      local system.
      
      The backend also supports Cephx authentication for safe authentication with
      the Ceph cluster.
      
      For storing credentials it uses the built-in secret mechanism of libvirt.
      Signed-off-by: NWido den Hollander <wido@widodh.nl>
      74951ead