1. 30 11月, 2011 10 次提交
    • D
      Remove internal only virHostPMCapability enum · 6fb5400f
      Daniel P. Berrange 提交于
      The internal virHostPMCapability enum just duplicates the
      public virNodeSuspendTarget enum, but with different names.
      
      * src/util/util.c: Use VIR_NODE_SUSPEND_TARGET constants
      * src/util/util.h: Remove virHostPMCapability enum
      * src/conf/capabilities.c: Use VIR_NODE_SUSPEND_TARGET_LAST
      6fb5400f
    • D
      Fix values of PM target type constants · 866b0a70
      Daniel P. Berrange 提交于
      The VIR_NODE_SUSPEND_TARGET constants are not flags, so they
      should just be assigned straightforward incrementing values.
      
      * include/libvirt/libvirt.h.in: Change VIR_NODE_SUSPEND_TARGET
        values
      * src/util/virnodesuspend.c: Fix suspend target checks
      866b0a70
    • A
      util: avoid null deref on qcowXGetBackingStore · a001a5e2
      Alex Jia 提交于
      Detected by Coverity. the only case is caller passes a NULL to 'format' variable,
      then taking 'if (format)' false branch, the function qcow2GetBackingStoreFormat
      will directly dereferences the NULL 'format' pointer variable.
      Signed-off-by: NAlex Jia <ajia@redhat.com>
      a001a5e2
    • L
      Add new API virDomain{Set, Get}BlockIoTune · 1f8a339d
      Lei Li 提交于
      This patch add new pulic API virDomainSetBlockIoTune and
      virDomainGetBlockIoTune.
      Signed-off-by: NLei Li <lilei@linux.vnet.ibm.com>
      Signed-off-by: NZhi Yong Wu <wuzhy@linux.vnet.ibm.com>
      Signed-off-by: NEric Blake <eblake@redhat.com>
      1f8a339d
    • H
      blkiotune: add qemu support for blkiotune.device_weight · 93ab5859
      Hu Tao 提交于
      Implement setting/getting per-device blkio weights in qemu,
      using the cgroups blkio.weight_device tunable.
      93ab5859
    • H
      blkiotune: add interface for blkiotune.device_weight · 6ac81c8e
      Hu Tao 提交于
      This adds per-device weights to <blkiotune>.  Note that the
      cgroups implementation only supports weights per block device,
      and not per-file within the device; hence this option must be
      global to the domain definition rather than tied to individual
      <devices>/<disk> entries:
      
      <domain ...>
        <blkiotune>
          <device>
            <path>/path/to/block</path>
            <weight>1000</weight>
          </device>
        </blkiotune>
      ..
      
      This patch also adds a parameter --device-weights to virsh command
      blkiotune for setting/getting blkiotune.weight_device for any
      hypervisor that supports it.  All <device> entries under
      <blkiotune> are concatenated into a single string attribute under
      virDomain{Get,Set}BlkioParameters, named "device_weight".
      Signed-off-by: NHu Tao <hutao@cn.fujitsu.com>
      Signed-off-by: NEric Blake <eblake@redhat.com>
      6ac81c8e
    • E
      qemu: fix blkiotune --live --config · 659ded58
      Eric Blake 提交于
      Without this,  'virsh blkiotune --live --config --weight=n'
      only affected live.
      
      * src/qemu/qemu_driver.c (qemuDomainSetBlkioParameters): Allow
      setting both configurations at once.
      659ded58
    • E
      qemu, lxc: drop redundant checks · 51727c1d
      Eric Blake 提交于
      After the previous patch, there are now some redundant checks.
      
      * src/qemu/qemu_driver.c (qemudDomainGetVcpuPinInfo)
      (qemuGetSchedulerParametersFlags): Drop checks now guaranteed by
      libvirt.c.
      * src/lxc/lxc_driver.c (lxcGetSchedulerParametersFlags):
      Likewise.
      51727c1d
    • E
      API: prevent query of --live and --config at once · 4199f3de
      Eric Blake 提交于
      Drivers were inconsistent when presented both --live and --config
      at once.  For example, within qemu, getting memory parameters
      favored live, getting blkio tuning favored config, and getting
      scheduler parameters errored out.  Also, some, but not all,
      attempts to mix flags on query were filtered at the virsh level.
      We shouldn't have to duplicate efforts in every client app, nor
      in every driver.  So, it is simpler to just enforce that the two
      flags cannot both be used at once on query operations, which has
      precedent in libvirt.c, and which matches the documentation of
      virDomainModificationImpact.
      
      * src/libvirt.c (virDomainGetMemoryParameters)
      (virDomainGetBlkioParameters)
      (virDomainGetSchedulerParametersFlags, virDomainGetVcpuPinInfo):
      Borrow sanity checking from virDomainGetVcpusFlags.
      4199f3de
    • E
      build: fix typo in last patch · 80eaa565
      Eric Blake 提交于
      * src/remote_protocol-structs: Use correct RPC name.
      80eaa565
  2. 29 11月, 2011 14 次提交
    • O
      block_resize: Update test file for RPC · 2524c843
      Osier Yang 提交于
      Pushed under build failure rule.
      2524c843
    • O
      block_resize: Implement qemu driver method · d1a6c77a
      Osier Yang 提交于
      It requires the domain is running, otherwise fails. Resize to a lower
      size is supported, but should be used with extreme caution.
      
      In order to prohibit the "size" overflowing after multiplied by
      1024. We do checking in the codes. For QMP mode, the default units
      is Bytes, the passed size needs to be multiplied by 1024, however,
      for HMP mode, the default units is "Megabytes", the passed "size"
      needs to be divided by 1024 then.
      d1a6c77a
    • O
      block_resize: Implement qemu monitor functions · 4fa36f13
      Osier Yang 提交于
      Implements functions for both HMP and QMP mode.
      
      For HMP mode, qemu uses "M" as the units by default, so the passed "sized"
      is divided by 1024.
      
      For QMP mode, qemu uses "Bytes" as the units by default, the passed "sized"
      is multiplied by 1024.
      
      All of the monitor functions return -1 on failure, 0 on success, or -2 if
      not supported.
      4fa36f13
    • O
      block_resize: Wire up the remote protocol · 7c80d074
      Osier Yang 提交于
      7c80d074
    • O
      block_resize: Define the new API · caef87d5
      Osier Yang 提交于
      The new API is named as "virDomainBlockResize", intending to add
      support for qemu monitor command "block_resize" (both HMP and QMP).
      
      Similar with APIs like "virDomainSetMemoryFlags", the units for
      argument "size" is kilobytes.
      caef87d5
    • M
      bandwidth: Fix funky identation · dee901c1
      Michal Privoznik 提交于
      dee901c1
    • J
      lxc: Fix suspend/resume with freezer cgroup · 54bf875a
      Jiri Denemark 提交于
      54bf875a
    • S
      Implement the core API to suspend/resume the host · 4ddb37c3
      Srivatsa S. Bhat 提交于
      Add the core functions that implement the functionality of the API.
      Suspend is done by using an asynchronous mechanism so that we can return
      the status to the caller before the host gets suspended. This asynchronous
      operation is achieved by suspending the host in a separate thread of
      execution. However, returning the status to the caller is only best-effort,
      but not guaranteed.
      
      To resume the host, an RTC alarm is set up (based on how long we want to
      suspend) before suspending the host. When this alarm fires, the host
      gets woken up.
      
      Suspend-to-RAM operation on a host running Linux can take upto more than 20
      seconds, depending on the load of the system. (Freezing of tasks, an operation
      preceding any suspend operation, is given up after a 20 second timeout).
      And Suspend-to-Disk can take even more time, considering the time required
      for compaction, creating the memory image and writing it to disk etc.
      So, we do not allow the user to specify a suspend duration of less than 60
      seconds, to be on the safer side, since we don't want to prematurely declare
      failure when we only had to wait for some more time.
      4ddb37c3
    • S
      Add the remote protocol implementation for virNodeSuspendForDuration · 76da40a8
      Srivatsa S. Bhat 提交于
      Implement the remote protocol for virNodeSuspendForDuration() API.
      76da40a8
    • S
      Add a public API to invoke suspend/resume on the host · 979676e3
      Srivatsa S. Bhat 提交于
      Implement the public definitions for the new API
      virNodeSuspendForDuration() which will be subsequently used to
      do a timed suspend on the host.
      979676e3
    • S
      Add 'Hybrid-Suspend' power management discovery for the host · 302743f1
      Srivatsa S. Bhat 提交于
      Some systems support a feature known as 'Hybrid-Suspend', apart from the
      usual system-wide sleep states such as Suspend-to-RAM (S3) or Suspend-to-Disk
      (S4). Add the functionality to discover this power management feature and
      export it in the capabilities XML under the <power_management> tag.
      302743f1
    • J
      rpc: Really send non-blocking calls while waiting for another call · 4e511fcc
      Jiri Denemark 提交于
      When another thread was dispatching while we wanted to send a
      non-blocking call, we correctly queued the call and woke up the thread
      but the thread just threw the call away since it forgot to recheck if
      its socket was writable.
      4e511fcc
    • C
      virnetsocket: pass XAUTORITY for ssh connection · d360795d
      Christian Franke 提交于
      When spawning an ssh connection, the environment variables
      DISPLAY, SSH_ASKPASS, ... are passed. However XAUTHORITY,
      which is necessary if the .Xauthority is in a non default
      place, was not passed.
      Signed-off-by: NChristian Franke <nobody@nowhere.ws>
      d360795d
    • L
      conf: make virt-xml-validate work with vbox domains · 8078a90a
      Lorin Hochstein 提交于
      virt-xml-validate fails when run on a domain XML file of type 'vbox'.
      
      For failing test case, see https://bugzilla.redhat.com/show_bug.cgi?id=757097
      
      This patch updates the XML schema to accept all valid hypervisor
      types, as well as dropping hypervisor types that are not in use
      by the current code base.
      Signed-off-by: NEric Blake <eblake@redhat.com>
      8078a90a
  3. 28 11月, 2011 6 次提交
  4. 25 11月, 2011 4 次提交
  5. 24 11月, 2011 6 次提交