1. 23 10月, 2014 1 次提交
    • E
      qemu: Disallow NUMA/network tuning for session mode · 43b67f2e
      Erik Skultety 提交于
      Tuning NUMA or network interface parameters requires root
      privileges to manage cgroups. Thus an attempt to set some of these
      parameters in session mode on a running domain should be invalid
      followed by an error. An example might be memory tuning which raises
      an error in such case.
      
      The following behavior in session mode will be present after applying
      this patch:
      
        Tuning  |      SET      |   GET  |
      ----------|---------------|--------|
      NUMA      | shut off only | always |
      Memory    |     never     | never  |
      Interface |     never     | always |
      
      Resolves https://bugzilla.redhat.com/show_bug.cgi?id=1126762
      43b67f2e
  2. 22 10月, 2014 5 次提交
    • P
      qemu: migration: Make check for empty hook XML robust · 19b1ee42
      Peter Krempa 提交于
      Also consider whitespace only strings returned from the hook as empty
      result.
      19b1ee42
    • P
      qemu: restore: Fix restoring of VM when the restore hook returns empty XML · e3867799
      Peter Krempa 提交于
      The documentation for the restore hook states that returning an empty
      XML is equivalent with copying the input. There was a bug in the code
      checking the returned string by checking the string instead of the
      contents. Use the new helper to check if the string is empty.
      e3867799
    • P
      util: string: Add helper to check whether string is empty · 0eeafeed
      Peter Krempa 提交于
      The helper checks whether a string contains only whitespace or is NULL.
      This will be helpful to skip cases where a user string is optional, but
      may be provided empty with the same meaning.
      0eeafeed
    • R
      Add support for /run/initctl · 7e037f64
      Rick Harris 提交于
      Newer versions of Debian use '/run/initctl' instead of '/dev/initctl'.
      This patch updates the code to search for the FIFO from a list of
      well-known locations.
      7e037f64
    • R
      Fix cast errors with clang · 82e4f85c
      Roman Bogorodskiy 提交于
      Build with clang fails with:
      
        CC       util/libvirt_util_la-virsocketaddr.lo
      util/virsocketaddr.c:904:17: error: cast from 'struct sockaddr *' to
      'struct sockaddr_in *' increases required alignment from 1 to 4
      [-Werror,-Wcast-align]
              inet4 = (struct sockaddr_in*) res->ai_addr;
                      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      util/virsocketaddr.c:909:17: error: cast from 'struct sockaddr *' to
      'struct sockaddr_in6 *' increases required alignment from 1 to 4
      [-Werror,-Wcast-align]
              inet6 = (struct sockaddr_in6*) res->ai_addr;
                      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      2 errors generated.
      
      Fix that by replacing virSocketAddrParseInternal() call with
      virSocketAddrParse() in the virSocketAddrIsNumericLocalhost() function.
      virSocketAddrParse stores an address in virSocketAddr.
      virSocketAddr uses a union to store an address, so it doesn't
      need casting.
      82e4f85c
  3. 21 10月, 2014 3 次提交
    • M
      qemu: unref cfg after TerminateMachine has been called · 9661ac2f
      Martin Kletzander 提交于
      Commit 4882618e added the code that
      requests driver cfg, but forgot to unref it.
      Signed-off-by: NMartin Kletzander <mkletzan@redhat.com>
      9661ac2f
    • L
      qemu: x86_64 is good enough for i686 · afe8f420
      Lubomir Rintel 提交于
      virt-manager on Fedora sets up i686 hosts with "/usr/bin/qemu-kvm" emulator,
      which in turn unconditionally execs qemu-system-x86_64 querying capabilities
      then fails:
      
      Error launching details: invalid argument: architecture from emulator 'x86_64' doesn't match given architecture 'i686'
      
      Traceback (most recent call last):
        File "/usr/share/virt-manager/virtManager/engine.py", line 748, in _show_vm_helper
          details = self._get_details_dialog(uri, vm.get_connkey())
        File "/usr/share/virt-manager/virtManager/engine.py", line 726, in _get_details_dialog
          obj = vmmDetails(conn.get_vm(connkey))
        File "/usr/share/virt-manager/virtManager/details.py", line 399, in __init__
          self.init_details()
        File "/usr/share/virt-manager/virtManager/details.py", line 784, in init_details
          domcaps = self.vm.get_domain_capabilities()
        File "/usr/share/virt-manager/virtManager/domain.py", line 518, in get_domain_capabilities
          self.get_xmlobj().os.machine, self.get_xmlobj().type)
        File "/usr/lib/python2.7/site-packages/libvirt.py", line 3492, in getDomainCapabilities
          if ret is None: raise libvirtError ('virConnectGetDomainCapabilities() failed', conn=self)
      libvirtError: invalid argument: architecture from emulator 'x86_64' doesn't match given architecture 'i686'
      
      Journal:
      
      Oct 16 21:08:26 goatlord.localdomain libvirtd[1530]: invalid argument: architecture from emulator 'x86_64' doesn't match given architecture 'i686'
      afe8f420
    • Z
      qemu: move setting emulatorpin ahead of monitor showing up · 411cea63
      Zhou yimin 提交于
      If VM is configured with many devices(including passthrough devices)
      and large memory, libvirtd will take seconds(in the worst case) to
      wait for monitor. In this period the qemu process may run on any
      PCPU though I intend to pin emulator to the specified PCPU in xml
      configuration.
      
      Actually qemu process takes high cpu usage during vm startup.
      So this is not the strict CPU isolation in this case.
      Signed-off-by: NZhou yimin <zhouyimin@huawei.com>
      411cea63
  4. 20 10月, 2014 1 次提交
  5. 17 10月, 2014 1 次提交
  6. 15 10月, 2014 22 次提交
  7. 13 10月, 2014 1 次提交
  8. 12 10月, 2014 1 次提交
    • M
      Fix leftover typo '&' -> '&&' · 4d2a8a0a
      Martin Kletzander 提交于
      The actual origin of this so called typo are two commits.  The first one
      was commit 72f8a7f1 that came up with the following condition:
      
      if ((i == 8) & (flags & VIR_QEMU_PROCESS_KILL_FORCE))
      
      Fortunately this succeeded thanks to bool being (int)1 and
      VIR_QEMU_PROCESS_KILL_FORCE having the value of 1 << 0.  The check was
      then moved and altered in 8fd38231 to
      current state:
      
      if ((i == 50) & force)
      
      that will work again (both sides of '&' being booleans), but since this
      was missed so many times, it may pose a problem in the future in case it
      gets copy-pasted again.
      Signed-off-by: NMartin Kletzander <mkletzan@redhat.com>
      4d2a8a0a
  9. 11 10月, 2014 4 次提交
    • S
      libxl: Implement basic video device selection · 1298daca
      Stefan Bader 提交于
      This started as an investigation into an issue where libvirt (using the
      libxl driver) and the Xen host, like an old couple, could not agree on
      who is responsible for selecting the VNC port to use.
      
      Things usually (and a bit surprisingly) did work because, just like that
      old couple, they had the same idea on what to do by default. However it
      was possible that this ended up in a big argument.
      
      The problem is that display information exists in two different places:
      in the vfbs list and in the build info. And for launching the device model,
      only the latter is used. But that never gets initialized from libvirt. So
      Xen allows the device model to select a default port while libvirt thinks
      it has told Xen that this is done by libvirt (though the vfbs config).
      
      While fixing that, I made a stab at actually evaluating the configuration
      of the video device. So that it is now possible to at least decide between
      a Cirrus or standard VGA emulation and to modify the VRAM within certain
      limits using libvirt.
      Signed-off-by: NStefan Bader <stefan.bader@canonical.com>
      Signed-off-by: NJim Fehlig <jfehlig@suse.com>
      1298daca
    • J
      libxl: Add function to determine device model type · c5a00350
      Jim Fehlig 提交于
      This patch introduces a function to detect whether the specified
      emulator is QEMU_XEN or QEMU_XEN_TRADITIONAL.  Detection is based on the
      string "Options specific to the Xen version:" in '$qemu -help' output.
      AFAIK, the only qemu containing that string in help output is the
      old Xen fork (aka qemu-dm).
      
      Note:
      QEMU_XEN means a qemu that contains support for Xen.
      
      QEMU_XEN_TRADITIONAL means Xen's old forked qemu 0.10.2
      Signed-off-by: NJim Fehlig <jfehlig@suse.com>
      c5a00350
    • J
      Xen: Defer setting default vram value to Xen drivers · 9320c3ff
      Jim Fehlig 提交于
      Allow the Xen drivers to determine default vram values.  Sane
      default vaules depend on the device model being used, so the
      drivers are in the best position to determine the defaults.
      
      For the legacy xen driver, it is best to maintain the existing
      logic for setting default vram values to ensure there are no
      regressions.  The libxl driver currently does not support
      configuring a video device.  Support will be added in a
      subsequent patch, where the benefit of this change will be
      reaped.
      Signed-off-by: NJim Fehlig <jfehlig@suse.com>
      9320c3ff
    • J
      libxl: Copy user-specified keymap to libxl build info struct · be28ae16
      Jim Fehlig 提交于
      Commit 4dfc34c3 missed copying the user-specified keymap to
      libxl_domain_build_info struct when creating a VFB device.
      Signed-off-by: NStefan Bader <stefan.bader@canonical.com>
      Signed-off-by: NJim Fehlig <jfehlig@suse.com>
      be28ae16
  10. 09 10月, 2014 1 次提交