1. 16 4月, 2013 1 次提交
  2. 15 4月, 2013 2 次提交
    • P
      qemu: Report also domain name in error message when domain object wasn't found · 63b68f3c
      Peter Krempa 提交于
      Report the errors as:
      Domain not found: no domain with matching uuid '41414141-4141-4141-4141-414141414141' (crashtest)
      instead of:
      Domain not found: no domain with matching uuid '41414141-4141-4141-4141-414141414141'
      63b68f3c
    • P
      qemu: Refactor lookup of domain object · 54a99ba8
      Peter Krempa 提交于
      Use the helper to lookup the domain object in the remaining places.
      
      This patch also fixes error reporting when the domain was not found in several
      functions that were printing the raw UUID buffer instead of the formatted
      string. The offending functions were:
      
      qemuDomainGetInterfaceParameters
      qemuDomainSetInterfaceParameters
      qemuGetSchedulerParametersFlags
      qemuSetSchedulerParametersFlags
      qemuDomainGetNumaParameters
      qemuDomainSetNumaParameters
      qemuDomainGetMemoryParameters
      qemuDomainSetMemoryParameters
      qemuDomainGetBlkioParameters
      qemuDomainSetBlkioParameters
      qemuDomainGetCPUStats
      54a99ba8
  3. 13 4月, 2013 5 次提交
  4. 12 4月, 2013 2 次提交
    • L
      Add USB option capability · a6e37aed
      Li Zhang 提交于
      To avoid the collision for creating USB controllers in machine->init()
      and -device xx command line, it needs to set usb=off to avoid one USB
      controller created in machine->init(). So that libvirt can use -device
      or -usb to create USB controller sucessfully.
      So QEMU_CAPS_MACHINE_USB_OPT capability is added, and it is for QEMU
      v1.3.0 onwards which supports USB option.
      Signed-off-by: NLi Zhang <zhlcindy@linux.vnet.ibm.com>
      a6e37aed
    • J
      qemu: Do not report unsafe migration for local files · 88624b5d
      Jiri Denemark 提交于
      When migrating a domain with disk images stored locally (and using
      storage migration), we should not complain about unsafe migration no
      matter what cache policy is used for that disk.
      88624b5d
  5. 11 4月, 2013 6 次提交
  6. 09 4月, 2013 4 次提交
  7. 08 4月, 2013 7 次提交
  8. 06 4月, 2013 2 次提交
    • O
      qemu: Error out if the bitmap for pinning is all clear · fd1432c7
      Osier Yang 提交于
      For both "live" and "config" changes of vcpupin and emulatorpin, an
      all clear bitmap doesn't make sense, and it can just cause corruptions.
      E.g (similar for emulatorpin).
      
      % virsh vcpupin hame 0 8,^8 --config
      
      % virsh vcpupin hame
      VCPU: CPU Affinity
      ----------------------------------
         0:
         1: 0-63
         2: 0-63
         3: 0-63
      
      % virsh dumpxml hame | grep cpuset
          <vcpupin vcpu='0' cpuset=''/>
      
      % virsh start hame
      error: Failed to start domain hame
      error: An error occurred, but the cause is unknown
      fd1432c7
    • O
      qemu: Support multiple queue virtio-scsi · d4bf0a93
      Osier Yang 提交于
      This introduce a new attribute "num_queues" (same with the good name
      QEMU uses) for virtio-scsi controller. An example of the XML:
      
      <controller type='scsi' index='0' model='virtio-scsi' num_queues='8'/>
      
      The corresponding QEMU command line:
      
      -device virtio-scsi-pci,id=scsi0,num_queues=8,bus=pci.0,addr=0x3 \
      d4bf0a93
  9. 05 4月, 2013 11 次提交
    • P
      qemu: Remove maximum cpu limit when setting processor count using the API · ce65b435
      Peter Krempa 提交于
      When setting processor count for a domain using the API libvirt enforced
      a maximum processor count, while it isn't enforced when taking the XML path.
      
      This patch removes the check to match the XML.
      ce65b435
    • D
      Don't create dirs in cgroup controllers we don't want to use · 56f27b3b
      Daniel P. Berrange 提交于
      Currently when getting an instance of virCgroupPtr we will
      create the path in all cgroup controllers. Only at the virt
      driver layer are we attempting to filter controllers. This
      is bad because the mere act of creating the dirs in the
      controllers can have a functional impact on the kernel,
      particularly for performance.
      
      Update the virCgroupForDriver() method to accept a bitmask
      of controllers to use. Only create dirs in the controllers
      that are requested. When creating cgroups for domains,
      respect the active controller list from the parent cgroup
      Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
      56f27b3b
    • P
      virCaps: get rid of defaultConsoleTargetType callback · 482e5f15
      Peter Krempa 提交于
      This patch refactors various places to allow removing of the
      defaultConsoleTargetType callback from the virCaps structure.
      
      A new console character device target type is introduced -
      VIR_DOMAIN_CHR_CONSOLE_TARGET_TYPE_NONE - to mark that no type was
      specified in the XML. This type is at the end converted to the standard
      VIR_DOMAIN_CHR_CONSOLE_TARGET_TYPE_SERIAL. Other types that are
      different from this default have to be processed separately in the
      device post parse callback.
      482e5f15
    • P
      virCaps: get rid of macPrefix field · 46becc18
      Peter Krempa 提交于
      Use the virDomainXMLConf structure to hold this data and tweak the code
      to avoid semantic change.
      
      Without configuration the KVM mac prefix is used by default. I chose it
      as it's in the privately administered segment so it should be usable for
      any purposes.
      46becc18
    • P
      virCaps: get rid of hasWideScsiBus · 8960d656
      Peter Krempa 提交于
      Use the virDomainXMLConf structure to hold this data.
      8960d656
    • P
      virCaps: get rid of defaultDiskDriverType · b2990849
      Peter Krempa 提交于
      Use the qemu specific callback to fill this data in the qemu driver as
      it's the only place where it was used and fix tests as the qemu test
      capability object didn't configure the defaults for the tests.
      b2990849
    • P
      virCaps: get rid of emulatorRequired · b5def001
      Peter Krempa 提交于
      This patch removes the emulatorRequired field and associated
      infrastructure from the virCaps object. Instead the driver specific
      callbacks are used as this field isn't enforced by all drivers.
      
      This patch implements the appropriate callbacks in the qemu and lxc
      driver and moves to check to that location.
      b5def001
    • P
      virCaps: get rid of defaultDiskDriverName · 9ea249e7
      Peter Krempa 提交于
      This patch removes the defaultDiskDriverName from the virCaps
      structure. This particular default value is used only in the qemu driver
      so this patch uses the recently added callback to fill the driver name
      if it's needed instead of propagating it through virCaps.
      9ea249e7
    • P
      qemu: Record the default NIC model in the domain XML · a68d6726
      Peter Krempa 提交于
      This patch implements the devices post parse callback and uses it to fill
      the default qemu network card model into the XML if none is specified.
      
      Libvirt assumes that the network card model for qemu is the "rtl8139".
      Record this in the XML using the new callback to avoid user
      confusion.
      a68d6726
    • P
      conf callback: Rearrange function parameters · ad0d10b2
      Peter Krempa 提交于
      Move the xmlopt and caps arguments to the end of the argument list.
      ad0d10b2
    • P
      conf: Add post XML parse callbacks and prepare for cleaning of virCaps · 43b99fc4
      Peter Krempa 提交于
      This patch adds instrumentation that will allow hypervisor drivers to
      fill and validate domain and device definitions after parsed by the XML
      parser.
      
      With this patch, after the XML is parsed, a callback to the driver is
      issued requesting to fill and validate driver specific details of the
      configuration. This allows to use sensible defaults and checks on a per
      driver basis at the time the XML is parsed.
      
      Two callback pointers are stored in the new virDomainXMLConf object:
      * virDomainDeviceDefPostParseCallback (devicesPostParseCallback)
        - called for a single device parsed and for every single device in a
          domain config. A virDomainDeviceDefPtr is passed along with the
          domain definition and virCaps.
      
      * virDomainDefPostParseCallback, (domainPostParseCallback)
        - A callback that is meant to process the domain config after it's
        parsed.  A virDomainDefPtr is passed along with virCaps.
      
      Both types of callbacks support arbitrary opaque data passed for the
      callback functions.
      
      Errors may be reported in those callbacks resulting in a XML parsing
      failure.
      43b99fc4