1. 10 12月, 2019 1 次提交
    • E
      backup: Document new XML for backups · 252958ee
      Eric Blake 提交于
      Prepare for new backup APIs by describing the XML that will represent
      a backup.  The XML resembles snapshots and checkpoints in being able
      to select actions for a set of disks, but has other differences.  It
      can support both push model (the hypervisor does the backup directly
      into the destination file) and pull model (the hypervisor exposes an
      access port for a third party to grab what is necessary).  Add
      testsuite coverage for some minimal uses of the XML.
      
      The <disk> element within <domainbackup> tries to model the same
      elements as a <disk> under <domain>, but sharing the RNG grammar
      proved to be hairy. That is in part because while <domain> use
      <source> to describe a host resource in use by the guest, a backup job
      is using a host resource that is not visible to the guest: a push
      backup action is instead describing a <target> (which ultimately could
      be a remote network resource, but for simplicity the RNG just
      validates a local file for now), and a pull backup action is instead
      describing a temporary local file <scratch> (which probably should not
      be a remote resource).  A future refactoring may thus introduce some
      way to parameterize RNG to accept <disk type='FOO'>...</disk> so that
      the name of the subelement can be <source> for domain, or <target> or
      <scratch> as needed for backups. Future patches may improve this area
      of code.
      Signed-off-by: NEric Blake <eblake@redhat.com>
      Signed-off-by: NPeter Krempa <pkrempa@redhat.com>
      Reviewed-by: NDaniel P. Berrangé <berrange@redhat.com>
      Reviewed-by: NJán Tomko <jtomko@redhat.com>
      252958ee
  2. 04 12月, 2019 2 次提交
  3. 22 11月, 2019 1 次提交
  4. 15 11月, 2019 1 次提交
  5. 13 11月, 2019 1 次提交
  6. 18 10月, 2019 1 次提交
    • J
      conf: Add 'x' and 'y' resolution into video XML definition · 72862797
      Julio Faracco 提交于
      This commit adds resolution element with parameters 'x' and 'y' into video
      XML domain group definition. Both, properties were added into an element
      called 'resolution' and it was added inside 'model' element. They are set
      as optional. This element does not follow QEMU properties 'xres' and
      'yres' format. Both HTML documentation and schema were changed too. This
      commit includes a simple test case to cover resolution for QEMU video
      models. The new XML format for resolution looks like:
      
          <model ...>
            <resolution x='800' y='600'/>
          </model>
      Reviewed-by: NCole Robinson <crobinso@redhat.com>
      Signed-off-by: NJulio Faracco <jcfaracco@gmail.com>
      72862797
  7. 10 10月, 2019 2 次提交
  8. 25 9月, 2019 2 次提交
  9. 10 9月, 2019 1 次提交
    • L
      conf: new "managed" attribute for target dev of <interface type='ethernet'> · 77f72a86
      Laine Stump 提交于
      Although <interface type='ethernet'> has always been able to use an
      existing tap device, this is just a coincidence due to the fact that
      the same ioctl is used to create a new tap device or get a handle to
      an existing device.
      
      Even then, once we have the handle to the device, we still insist on
      doing extra setup to it (setting the MAC address and IFF_UP).  That
      *might* be okay if libvirtd is running as a privileged process, but if
      libvirtd is running as an unprivileged user, those attempted
      modifications to the tap device will fail (yes, even if the tap is set
      to be owned by the user running libvirtd). We could avoid this if we
      knew that the device already existed, but as stated above, an existing
      device and new device are both accessed in the same manner, and
      anyway, we need to preserve existing behavior for those who are
      already using pre-existing devices with privileged libvirtd (and
      allowing/expecting libvirt to configure the pre-existing device).
      
      In order to cleanly support the idea of using a pre-existing and
      pre-configured tap device, this patch introduces a new optional
      attribute "managed" for the interface <target> element. This
      attribute is only valid for <interface type='ethernet'> (since all
      other interface types have mandatory config that doesn't apply in the
      case where we expect the tap device to be setup before we
      get it). The syntax would look something like this:
      
         <interface type='ethernet'>
            <target dev='mytap0' managed='no'/>
            ...
         </interface>
      
      This patch just adds managed to the grammar and parser for <target>,
      but has no functionality behind it.
      
      (NB: when managed='no' (the default when not specified is 'yes'), the
      target dev is always a name explicitly provided, so we don't
      auto-remove it from the config just because it starts with "vnet"
      (VIR_NET_GENERATED_TAP_PREFIX); this makes it possible to use the
      same pattern of names that libvirt itself uses when it automatically
      creates the tap devices.)
      Signed-off-by: NLaine Stump <laine@redhat.com>
      Reviewed-by: NDaniel P. Berrangé <berrange@redhat.com>
      77f72a86
  10. 19 8月, 2019 1 次提交
  11. 12 8月, 2019 1 次提交
  12. 07 8月, 2019 1 次提交
  13. 06 8月, 2019 1 次提交
    • M
      virpci: Allow greater PCI domain value in virPCIDeviceAddressIsValid · d19c2142
      Michal Privoznik 提交于
      There is no restriction on maximum value of PCI domain. In fact,
      Linux kernel uses plain atomic inc when assigning PCI domains:
      
      drivers/pci/pci.c:static int pci_get_new_domain_nr(void)
      drivers/pci/pci.c-{
      drivers/pci/pci.c-      return atomic_inc_return(&__domain_nr);
      drivers/pci/pci.c-}
      
      Of course, this function is called only if kernel was compiled
      without PCI domain support or ACPI did not provide PCI domain.
      
      However, QEMU still has the same restriction as us: in
      set_pci_host_devaddr() QEMU checks if domain isn't greater than
      0xffff. But one can argue that that's a QEMU limitation. We still
      want to be able to cope with other hypervisors that don't have
      this limitation (possibly).
      Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
      Reviewed-by: NJán Tomko <jtomko@redhat.com>
      d19c2142
  14. 27 7月, 2019 1 次提交
    • E
      backup: Document new XML for checkpoints · d85842cf
      Eric Blake 提交于
      Prepare for new checkpoint APIs by describing the XML that will
      represent a checkpoint.  The checkpoint XML is modeled heavily after
      virDomainSnapshotPtr. See the docs for more details.
      
      Add testsuite coverage for some minimal uses of the XML (bare minimum,
      the sample from html, and a full dumpxml, and some counter-examples
      that should fail schema validation). Although use of the REDEFINE flag
      will require the <domain> subelement to be present, it is easier for
      most of the tests to provide counterpart output produced with the
      NO_DOMAIN flag (particularly since synthesizing a valid <domain>
      during testing is not trivial).
      Signed-off-by: NEric Blake <eblake@redhat.com>
      Reviewed-by: NDaniel P. Berrangé <berrange@redhat.com>
      d85842cf
  15. 26 7月, 2019 2 次提交
  16. 18 7月, 2019 1 次提交
  17. 15 7月, 2019 1 次提交
  18. 13 7月, 2019 1 次提交
  19. 21 6月, 2019 1 次提交
  20. 20 6月, 2019 2 次提交
  21. 18 6月, 2019 1 次提交
    • Y
      storage: escape ipv6 for ceph mon hosts to librados · cdd362e0
      Yi Li 提交于
      Hosts for rbd are ceph monitor daemons. These have fixed IP addresses,
      so they are often referenced by IP rather than hostname for
      convenience, or to avoid relying on DNS. Using IPv4 addresses as the
      host name works already, but IPv6 addresses require rbd-specific
      escaping because the colon is used as an option separator in the
      string passed to librados.
      
      Escape these colons, and enclose the IPv6 address in square brackets
      so it is distinguished from the port, which is currently mandatory.
      Signed-off-by: NYi Li <yili@winhong.com>
      Reviewed-by: NJán Tomko <jtomko@redhat.com>
      Signed-off-by: NJán Tomko <jtomko@redhat.com>
      cdd362e0
  22. 17 6月, 2019 2 次提交
  23. 03 6月, 2019 1 次提交
  24. 17 4月, 2019 1 次提交
    • E
      snapshot: Don't expose testsuite-only state in snapshot XML · a007fcab
      Eric Blake 提交于
      None of the existing drivers actually use the 0-valued 'nostate'
      snapshot state; rather, it was a fluke of implementation. In fact,
      some drivers, like qemu, actively reject 'nostate' as invalid during a
      snapshot redefine. Normally, a driver computes the state post-parse
      from the current domain, and thus virDomainSnapshotGetXMLDesc() will
      never expose the state. However, since the testsuite lacks any
      associated domain to copy state from, and lacks post-parse processing
      that normal drivers have, the testsuite output had several spots with
      the state, coupled with a regex filter to ignore the oddity.
      
      It is better to follow the lead of other XML defaults, by not
      outputting anything during format if post-parse defaults have not been
      applied, and rejecting the default value during parsing. The testsuite
      needs a bit of an update, by adding another flag for when to simulate
      a post-parse action of setting a snapshot state, but none of the
      drivers are impacted other than rejecting XML that was previously
      already suspicious in nature.
      
      Similarly, don't expose creation time 0 (for now, only possible if a
      user redefined a snapshot to claim creation at the Epoch, but also
      happens once setting the creation time is deferred to a post-parse
      handler).
      
      This is also a step towards cleaning up snapshot_conf.c to separate
      its existing post-parse work (namely, setting the creationTime and
      default snapshot name) from the pure parsing work, so that we can get
      rid of the testsuite hack of regex filtering of the XML and instead
      have more accurate testing of our parser/formatter code.
      Signed-off-by: NEric Blake <eblake@redhat.com>
      Reviewed-by: NCole Robinson <crobinso@redhat.com>
      a007fcab
  25. 16 4月, 2019 1 次提交
  26. 10 4月, 2019 1 次提交
    • M
      domain capabilities: Expose firmware auto selection feature · 5b9819ee
      Michal Privoznik 提交于
      If a management application wants to use firmware auto selection
      feature it can't currently know if the libvirtd it's talking to
      support is or not. Moreover, it doesn't know which values that
      are accepted for the @firmware attribute of <os/> when parsing
      will allow successful start of the domain later, i.e. if the mgmt
      application wants to use 'bios' whether there exists a FW
      descriptor in the system that describes bios.
      
      This commit then adds 'firmware' enum to <os/> element in
      <domainCapabilities/> XML like this:
      
        <enum name='firmware'>
          <value>bios</value>
          <value>efi</value>
        </enum>
      
      We can see both 'bios' and 'efi' listed which means that there
      are descriptors for both found in the system (matched with the
      machine type and architecture reported in the domain capabilities
      earlier and not shown here).
      Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
      Acked-by: NLaszlo Ersek <lersek@redhat.com>
      5b9819ee
  27. 03 4月, 2019 1 次提交
    • P
      conf: Parse and format 'backingStore' for disk <mirror> · 4e797f1a
      Peter Krempa 提交于
      When the block copy operation is started with a reused external file in
      incremental mode libvirt will need to open and insert the backing chain
      for that file into qemu (in -blockdev mode). This means that we'll need
      to track the backing chain and metadata such as node names for the full
      chain of <mirror>.
      
      This patch invokes the full backing chain formatter and parser for
      <mirror> so that the chain can be kept with <mirror>.
      Signed-off-by: NPeter Krempa <pkrempa@redhat.com>
      Reviewed-by: NJán Tomko <jtomko@redhat.com>
      4e797f1a
  28. 22 3月, 2019 1 次提交
  29. 19 3月, 2019 1 次提交
    • J
      storage: optional 'refresh' elemement on pool · 669018bc
      Jason Dillaman 提交于
      The new 'refresh' element can override the default refresh operations
      for a storage pool. The only currently supported override is to set
      the volume allocation size to the volume capacity. This can be specified
      by adding the following snippet:
      
      <pool>
      ...
        <refresh>
          <volume allocation='capacity'/>
        </refresh>
      ...
      </pool>
      
      This is useful for certain backends where computing the actual allocation
      of a volume might be an expensive operation.
      Signed-off-by: NJason Dillaman <dillaman@redhat.com>
      Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
      669018bc
  30. 18 3月, 2019 2 次提交
  31. 14 3月, 2019 1 次提交
    • J
      conf: Add a new 'xenbus' controller type · 09eb1ae0
      Jim Fehlig 提交于
      xenbus is virtual controller (akin to virtio controllers) for Xen
      paravirtual devices. Although all Xen VMs have a xenbus, it has
      never been modeled in libvirt, or in Xen native VM config format
      for that matter.
      
      Recently there have been requests to support Xen's max_grant_frames
      setting in libvirt. max_grant_frames is best modeled as an attribute
      of xenbus. It describes the maximum IO buffer space (or DMA space)
      available in xenbus for use by connected paravirtual devices. This
      patch introduces a new xenbus controller type that includes a
      maxGrantFrames attribute.
      Signed-off-by: NJim Fehlig <jfehlig@suse.com>
      Reviewed-by: NDaniel P. Berrangé <berrange@redhat.com>
      09eb1ae0
  32. 12 3月, 2019 2 次提交