1. 29 11月, 2011 8 次提交
    • 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
    • M
      virsh: Don't traverse childless nodes in vshNodeIsSuperset · 2d0fc93f
      Michal Privoznik 提交于
      If both nodes do not have any children, we pass zero to
      virBitmapAlloc which returns NULL. In turn we report OOM error
      and return false (meaning nodes are different). This is not true.
      2d0fc93f
    • 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
  2. 28 11月, 2011 6 次提交
  3. 25 11月, 2011 4 次提交
  4. 24 11月, 2011 20 次提交
  5. 23 11月, 2011 2 次提交
    • P
      qemu: Avoid dereference of NULL pointer · c4b32641
      Peter Krempa 提交于
      If something fails while initializing qemu job object in
      qemuDomainObjPrivateAlloc(), memory to the private pointer is freed, but
      after that, the pointer is still dereferenced, which may result in a
      segfault.
      
      * qemuDomainObjPrivateAlloc() - Don't dereference NULL pointer.
      c4b32641
    • E
      qemu: fix a const-correctness issue · db2f6807
      Eric Blake 提交于
      Generally, functions which return malloc'd strings should be typed
      as 'char *', not 'const char *', to make it obvious that the caller
      is responsible to free things.  free(const char *) fails to compile,
      and although we have a cast embedded in VIR_FREE to work around poor
      code that frees const char *, it's better to not rely on that hack.
      
      * src/qemu/qemu_driver.c (qemuDiskPathToAlias): Change return type.
      (qemuDomainBlockJobImpl): Update caller.
      db2f6807