1. 21 4月, 2015 3 次提交
    • C
      caps: Use an enum internally for ostype value · 4231485c
      Cole Robinson 提交于
      But the internal API stays the same, and we just convert the value as
      needed. Not useful yet, but this is the beginning step of using an enum
      for ostype throughout the code.
      4231485c
    • C
      domain: conf: Don't validate VM ostype/arch at daemon startup · f1a89a8b
      Cole Robinson 提交于
      When parsing XML, we validate the passed ostype + arch combo against
      the detected hypervisor capabilities. This has led to the following
      problem:
      
      - Define x86 qemu guest
      - qemu is inadvertently removed from the host
      - libvirtd is restarted. fails to parse VM config since arch is removed
      - 'virsh list --all' is now empty, user is wondering where their VMs went
      
      Add a new internal flag VIR_DOMAIN_DEF_PARSE_SKIP_OSTYPE_CHECKS. Use
      it when loading VM and snapshot configs from disk.
      
      https://bugzilla.redhat.com/show_bug.cgi?id=1043572
      f1a89a8b
    • C
      domain: conf: Better errors on bad os <type> values · 3700c065
      Cole Robinson 提交于
      If no <os><type> was specified:
        before: unknown OS type no OS type
        after : xml error: an os <type> must be specified
      
      If an <os><type> is specified that's not in our capabiliities data:
        before: unknown OS type: $type
        after : unsupported configuration: no support found for os <type> '$type'
      
      VIR_ERR_OS_TYPE is now unused (as it should be frankly) so drop its strings
      as well to save our translators some effort.
      3700c065
  2. 17 4月, 2015 1 次提交
  3. 14 4月, 2015 7 次提交
  4. 13 4月, 2015 3 次提交
  5. 10 4月, 2015 5 次提交
  6. 02 4月, 2015 2 次提交
    • J
      Allocate virtio-serial addresses when starting a domain · 59033788
      Ján Tomko 提交于
      Instead of always using controller 0 and incrementing port number,
      respect the maximum port numbers of controllers and use all of them.
      
      Ports for virtio consoles are quietly reserved, but not formatted
      (neither in XML nor on QEMU command line).
      
      Also rejects duplicate virtio-serial addresses.
      https://bugzilla.redhat.com/show_bug.cgi?id=890606
      https://bugzilla.redhat.com/show_bug.cgi?id=1076708
      
      Test changes:
      * virtio-auto.args
        Filling out the port when just the controller is specified.
        switched from using
          maxport + 1
        to:
          first free port on the controller
      * virtio-autoassign.args
        Filling out the address when no <address> is specified.
        Started using all the controllers instead of 0, also discards
        the bus value.
      * xml -> xml output of virtio-auto
        The port assignment is no longer done as a part of XML parsing,
        so the unspecified values stay 0.
      59033788
    • S
      conf: Rename virDomainHasDiskMirror and detect block jobs properly · ffe3d3e8
      Shanzhi Yu 提交于
      virDomainHasDiskMirror() currently detects only jobs that add the mirror
      elements. Since some operations like migration are interlocked by
      existing block jobs on the given domain the check needs to be
      instrumented to check regular jobs too.
      
      This patch renames virDomainHasDiskMirror to virDomainHasDiskBlockjob
      and adds an argument that allows to select that it returns true only for
      block copy jobs as those interlock making the domain persistent.
      
      Other two uses trigger on any block job type.
      Signed-off-by: NShanzhi Yu <shyu@redhat.com>
      Signed-off-by: NPeter Krempa <pkrempa@redhat.com>
      ffe3d3e8
  7. 31 3月, 2015 1 次提交
    • P
      qemu: blockjob: Synchronously update backing chain in XML on ABORT/PIVOT · 630ee5ac
      Peter Krempa 提交于
      When the synchronous pivot option is selected, libvirt would not update
      the backing chain until the job was exitted. Some applications then
      received invalid data as their job serialized first.
      
      This patch removes polling to wait for the ABORT/PIVOT job completion
      and replaces it with a condition. If a synchronous operation is
      requested the update of the XML is executed in the job of the caller of
      the synchronous request. Otherwise the monitor event callback uses a
      separate worker to update the backing chain with a new job.
      
      This is a regression since 1a92c719
      
      When the ABORT job is finished synchronously you get the following call
      stack:
       #0  qemuBlockJobEventProcess
       #1  qemuDomainBlockJobImpl
       #2  qemuDomainBlockJobAbort
       #3  virDomainBlockJobAbort
      
      While previously or while using the _ASYNC flag you'd get:
       #0  qemuBlockJobEventProcess
       #1  processBlockJobEvent
       #2  qemuProcessEventHandler
       #3  virThreadPoolWorker
      630ee5ac
  8. 25 3月, 2015 2 次提交
  9. 23 3月, 2015 4 次提交
    • P
      qemu: conf: Add support for memory device cold(un)plug · 96094fb2
      Peter Krempa 提交于
      Add a few helpers that allow to operate with memory device definitions
      on the domain config and use them to implement memory device coldplug in
      the qemu driver.
      96094fb2
    • P
      conf: Add interface to parse and format memory device information · 3e4230d2
      Peter Krempa 提交于
      This patch adds code that parses and formats configuration for memory
      devices.
      
      A simple configuration would be:
      <memory model='dimm'>
        <target>
          <size unit='KiB'>524287</size>
          <node>0</node>
        </target>
      </memory>
      
      A complete configuration of a memory device:
      <memory model='dimm'>
        <source>
          <pagesize unit='KiB'>4096</pagesize>
          <nodemask>1-3</nodemask>
        </source>
        <target>
          <size unit='KiB'>524287</size>
          <node>1</node>
        </target>
      </memory>
      
      This patch preemptively forbids use of the <memory> device in individual
      drivers so the users are warned right away that the device is not
      supported.
      3e4230d2
    • P
      conf: Add device address type for dimm devices · 62b825a2
      Peter Krempa 提交于
      Dimm devices are described by the slot and base address. Add a new
      address type to be able to describe such address.
      62b825a2
    • P
      conf: Add support for parsing and formatting max memory and slot count · bffb9163
      Peter Krempa 提交于
      Add a XML element that will allow to specify maximum supportable memory
      and the count of memory slots to use with memory hotplug.
      
      To avoid possible confusion and misuse of the new element this patch
      also explicitly forbids the use of the maxMemory setting in individual
      drivers's post parse callbacks. This limitation will be lifted when the
      support is implemented.
      bffb9163
  10. 18 3月, 2015 2 次提交
    • J
      Use PAUSED state for domains that are starting up · 18441ab9
      Jiri Denemark 提交于
      When libvirt is starting a domain, it reports the state as SHUTOFF until
      it's RUNNING. This is not ideal because domain startup may take a long
      time (usually because of some configuration issues, firewalls blocking
      access to network disks, etc.) and domain lists provided by libvirt look
      awkward. One can see weird shutoff domains with IDs in a list of active
      domains or even shutoff transient domains. In any case, it looks more
      like a bug in libvirt than a normal state a domain goes through.
      Signed-off-by: NJiri Denemark <jdenemar@redhat.com>
      18441ab9
    • P
      conf: disk: Simplify checking if source definition was parsed · 7a8f54bf
      Peter Krempa 提交于
      Previously we had to check for 3 fields to see if the source was filled.
      Repurpose one of the variables as a boolean flag and use it instead of
      combining multiple sources.
      
      For the condition that checks that only CDROM/FLOPPY drives can be empty
      we can use the virStorageSourceIsEmpty() helper.
      7a8f54bf
  11. 17 3月, 2015 2 次提交
  12. 16 3月, 2015 8 次提交