1. 18 7月, 2012 6 次提交
  2. 17 7月, 2012 5 次提交
  3. 16 7月, 2012 3 次提交
    • J
      qemu: Do not fail virConnectCompareCPU if host CPU is not known · 87c86231
      Jiri Denemark 提交于
      When host CPU could not be properly detected, virConnectCompareCPU will
      just report that any CPU is incompatible with host CPU instead of
      failing.
      87c86231
    • J
      qemu: Fix probing for guest capabilities · 8e6fb68f
      Jiri Denemark 提交于
      Even though qemu-kvm binaries can be used in TCG mode, libvirt would
      only detect them if /dev/kvm was available. Thus, one would need to make
      a /usr/bin/qemu symlink to be able to use TCG mode with qemu-kvm in an
      environment without KVM support.
      
      And even though QEMU is able to make use of KVM, libvirt would not
      advertise KVM support unless there was a qemu-kvm symlink available.
      
      This patch fixes both issues.
      8e6fb68f
    • M
      docs: Improve patch submission guidelines · a8d63a48
      Michal Privoznik 提交于
      We should really advise (new) developers to send rebased patches
      that apply cleanly and use git-send-email rather than all other
      obscure ways.
      a8d63a48
  4. 14 7月, 2012 3 次提交
    • D
      Wire up handling for QMP's BALLOON_EVENT · 1d9d5103
      Daniel P. Berrange 提交于
      If QEMU supports the BALLOON_EVENT QMP event, then we can
      avoid invoking 'query-balloon' when returning XML or the
      domain info.
      
      * src/qemu/qemu_capabilities.c, src/qemu/qemu_capabilities.h:
        Add QEMU_CAPS_BALLOON_EVENT
      * src/qemu/qemu_driver.c: Skip query-balloon in
        qemudDomainGetInfo and qemuDomainGetXMLDesc if we have
        QEMU_CAPS_BALLOON_EVENT set
      * src/qemu/qemu_monitor.c, src/qemu/qemu_monitor.h: Check
        for BALLOON_EVENT at connect to monitor. Add callback
        for balloon change notifications
      * src/qemu/qemu_monitor_json.c, src/qemu/qemu_monitor_json.h:
        Add handling of BALLOON_EVENT and impl 'query-events'
        check
      Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
      1d9d5103
    • D
      Define public API for receiving guest memory balloon events · 7ed6d7dd
      Daniel P. Berrange 提交于
      When the guest changes its memory balloon applications may want
      to know what the new value is, without having to periodically
      poll on XML / domain info. Introduce a "balloon change" event
      to let apps see this
      
      * include/libvirt/libvirt.h.in: Define the
        virConnectDomainEventBalloonChangeCallback callback
        and VIR_DOMAIN_EVENT_ID_BALLOON_CHANGE constant
      * python/libvirt-override-virConnect.py,
        python/libvirt-override.c: Wire up helpers for new event
      * daemon/remote.c: Helper for serializing balloon event
      * examples/domain-events/events-c/event-test.c,
        examples/domain-events/events-python/event-test.py: Add
        example of balloon event usage
      * src/conf/domain_event.c, src/conf/domain_event.h: Handling
        of balloon events
      * src/remote/remote_driver.c: Add handler of balloon events
      * src/remote/remote_protocol.x: Define wire protocol for
        balloon events
      * src/remote_protocol-structs: Likewise.
      Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
      7ed6d7dd
    • C
      ARMHF: CPU Support for armhf. · db4eba91
      Chuck Short 提交于
      Adding CPU encoder/decoder for armhf to avoid runtime error messages.
      Signed-off-by: NChuck Short <chuck.short@canonical.com>
      db4eba91
  5. 13 7月, 2012 3 次提交
    • H
      fix failure when building with --disable-debug · 102c6941
      Hu Tao 提交于
      When building with --disable-debug, VIR_DEBUG expands to a nop.
      But parameters to VIR_DEBUG can be variables that are passed only
      to VIR_DEBUG. In the case the building system complains about unused
      variables.
      102c6941
    • V
      virsh: remove unnecessary sleep for nodecpustats --percent · ece76595
      Viktor Mihajlovski 提交于
      Fix for a minor issue:
      the sleep(1) statement was called twice,
      effectively doubling the elapsed time
      execution "virsh nodecpustats --percent".
      Signed-off-by: NViktor Mihajlovski <mihajlov@linux.vnet.ibm.com>
      ece76595
    • J
      Clarify direct migration · 3189dfb1
      Jiri Denemark 提交于
      When --direct is used when migrating a domain running on a hypervisor
      that does not support direct migration (such as QEMU), the caller would
      get the following error message:
      
          this function is not supported by the connection driver:
          virDomainMigrateToURI2
      
      which is a complete nonsense since qemu driver implements
      virDomainMigrateToURI2. This patch would emit a more sensible error in
      this case:
      
          Requested operation is not valid: direct migration is not supported
          by the connection driver
      3189dfb1
  6. 12 7月, 2012 4 次提交
    • C
      Fix daemon auto-spawning · efe6c802
      Christophe Fergeau 提交于
      Commit 32a9aac2 switched libvirt to use the XDG base directories
      to locate most of its data/config. In particular, the per-user socket
      for qemu:///session is now stored in the XDG runtime directory.
      This directory is located by looking at the XDG_RUNTIME_DIR environment
      variable, with a fallback to ~/.cache/libvirt if this variable is not
      set.
      
      When the daemon is autospawned because a client application wants
      to use qemu:///session, the daemon is ran in a clean environment
      which does not contain XDG_RUNTIME_DIR. It will create its socket
      in ~/.cache/libvirt. If the client application has XDG_RUNTIME_DIR
      set, it will not look for the socket in the fallback place, and will
      fail to connect to the autospawned daemon.
      
      This patch adds XDG_RUNTIME_DIR to the daemon environment before
      auto-starting it. I've done this in virNetSocketForkDaemon rather
      than in virCommandAddEnvPassCommon as I wasn't sure we want to pass
      these variables to other commands libvirt spawns. XDG_CACHE_HOME
      and XDG_CONFIG_HOME are also added to the daemon env as it makes use
      of those as well.
      efe6c802
    • D
      Support creation of sparse LVM volumes · 1ffc78b5
      Daniel P. Berrange 提交于
      When calling 'lvcreate' if specifying both the '-L' and
      '--virtualsize' options, the latter will be treated as
      the capacity and the former as the allocation. This can
      be used to support sparse volume creation. In addition,
      when listing volumes it is necessary to include the 'size'
      field in lvs output, so that we can detect sparse volume
      allocation correctly.
      Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
      1ffc78b5
    • D
      Remove all use of virRun in storage code · 258e06c8
      Daniel P. Berrange 提交于
      To make it easier to dynamically change the command line ARGV,
      switch all storage code over to use virCommandPtr APIs for
      running programs
      Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
      258e06c8
    • G
      virsh: remove extra space between function name and opening brace · 0f9ad736
      Guido Günther 提交于
      to match our CodingStyle.
      0f9ad736
  7. 11 7月, 2012 15 次提交
    • S
      Fix directory removal in filesystem storage driver · 5079a7b3
      Sascha Peilicke 提交于
      Fix the virStorageBackendFileSystemVolDelete method to not use
      unlink() unconditionally. It must use rmdir() for volumes which
      are directories. It should also raise an error if given a volume
      which has the network/block type.
      5079a7b3
    • O
      storage: Default pool permission mode to 0755 · 8a544719
      Osier Yang 提交于
      Per the typical use of libvirt is to fork the qemu process with
      qemu:qemu. Setting the pool permission mode as 0700 by default
      will prevent the guest start with permission reason.
      
      Define macro for the default pool and vol permission modes
      incidentally.
      8a544719
    • D
      Fix shutdown of LXC controller · 97d7f02d
      Daniel P. Berrange 提交于
      Since we are not yet using the virNetServerPtr object for running
      the event loop, we can't use virNetServerQuit(). Instead set the
      global 'quit' flag in libvirt_lxc
      97d7f02d
    • P
      test: Add test case for nodeinfotest if host machine doesn't have NUMA · 7ea1dd93
      Peter Krempa 提交于
      Test filling of nodeinfo structure if /sys/devices/system/node does not
      exist. (Based on dump from a real machine)
      7ea1dd93
    • P
      test: Add new test case for nodeinfotest · 1aa1a45b
      Peter Krempa 提交于
      This patch adds test data that describe a machine that has two physical
      processors that don't share same core id's on their cores. On this data
      the "virsh nodeinfo" reported that the machine had 10 cores per socket
      while the processor had only 8. (Before fixing nodeinfo gathering code).
      1aa1a45b
    • P
      nodeinfo: Fix gathering of nodeinfo data structure · 80533ca2
      Peter Krempa 提交于
      This patch changes the way data to fill the nodeinfo structure are
      gathered. We've gathere the test data by iterating processors an sockets
      separately from nodes. The reported data was based solely on information
      about core id. Problems arise when eg cores in mulit-processor machines
      don't have same id's on both processors or maybe one physical processor
      contains more NUMA nodes.
      
      This patch changes the approach how we detect processors and nodes. Now
      we start at enumerating nodes and for each node processors, sockets and
      threads are enumerated separately. This approach provides acurate data
      that comply to docs about the nodeinfo structure. This also enables to
      get rid of hacks: see commits 10d9038b,
      ac9dd4a6. (Those changes in nodeinfo.c
      are efectively reverted by this patch).
      
      This patch also changes output of one of the tests, as the processor
      topology is now acquired more precisely.
      80533ca2
    • P
      nodeinfo_test: Enhance test data before changing nodeinfo gathering · 6dcf98c8
      Peter Krempa 提交于
      This patch adds test data needed by the new way node information will be
      gathered. This patch adds symlinks to cpu cores to their corresponding
      node directory.
      6dcf98c8
    • V
      S390: Adding testcases for s390 · 028ba4f3
      Viktor Mihajlovski 提交于
      Add minimal s390-virtio domain testcase and testcases for virtio serial,
      net, disk for the virtio-s390 bus.
      Signed-off-by: NViktor Mihajlovski <mihajlov@linux.vnet.ibm.com>
      028ba4f3
    • V
      S390: Domain Schema for s390-virtio machines. · 1af7e319
      Viktor Mihajlovski 提交于
      Added s390-virtio machine type to the XML schema for domains in order
      to not fail the domain schema tests.
      Signed-off-by: NViktor Mihajlovski <mihajlov@linux.vnet.ibm.com>
      1af7e319
    • V
      S390: Add support for virtio-s390 devices. · d0304eaa
      Viktor Mihajlovski 提交于
      The s390(x) architecture doesn't feature a PCI bus. For the purpose of
      supporting virtio devices a virtual bus called virtio-s390 is used.
      A new address type VIR_DOMAIN_DEVICE_ADDRESS_TYPE_VIRTIO_S390 is used to
      distinguish the virtio devices on s390 from PCI-based virtio devices.
      
      V3 Change: updated QEMU_CAPS_VIRTIO_S390 to fit upstream.
      Signed-off-by: NViktor Mihajlovski <mihajlov@linux.vnet.ibm.com>
      d0304eaa
    • V
      qemu: Change tests to use (modified) qemuDomainAssignAddresses · 6e15887f
      Viktor Mihajlovski 提交于
      Rewrote the device assignment parts in tests to use qemuDomainAssignAddresses.
      This way the tests will work for new device address types as they show
      up in the future (like s390 device types).
      Signed-off-by: NViktor Mihajlovski <mihajlov@linux.vnet.ibm.com>
      6e15887f
    • V
      qemu: Extended qemuDomainAssignAddresses to be callable from everywhere. · f5dd58a6
      Viktor Mihajlovski 提交于
      This is in preparation of the enablement of s390 guests with virtio devices.
      
      The assignment of device addresses happens in different places, i.e. the
      qemu driver and process modules as well as in the unit tests in slightly
      different flavors. Currently, these are PPC spapr-vio and PCI
      devices, virtio-s390 (not PCI based) will follow.
      
      By optionally passing to qemuDomainAssignAddresses the domain
      object and the capabilities it is now possible to call the function
      from most of the places (except for hotplug) where address assignment
      is done.
      Signed-off-by: NViktor Mihajlovski <mihajlov@linux.vnet.ibm.com>
      f5dd58a6
    • G
      openvz: Handle domain obj hash map errors · 31351c31
      Guido Günther 提交于
      This makes the driver fail with a clear error message in case of UUID
      collisions (for example if somebody copied a container configuration
      without updating the UUID) and also raises an error on other hash map
      failures.
      
      OpenVZ itself doesn't complain about duplicate UUIDs since this
      parameter is only used by libvirt.
      31351c31
    • C
      Fix /domain/features setting in qemuParseCommandLine · 626dd518
      Christophe Fergeau 提交于
      Commit 5e6ce1 moved down detection of the ACPI feature in
      qemuParseCommandLine. However, when ACPI is detected, it clears
      all feature flags in def->features to only set ACPI. This used to
      be fine because this was the first place were def->features was set,
      but after the move this is no longer necessarily true because this
      block comes before the ACPI check:
      
      if (strstr(def->emulator, "kvm")) {
          def->virtType = VIR_DOMAIN_VIRT_KVM;
          def->features |= (1 << VIR_DOMAIN_FEATURE_PAE);
      }
      
      Since def is allocated in qemuParseCommandLine using VIR_ALLOC, we
      can always use |= when modifying def->features
      626dd518
    • E
      build: detect all improper uses of _("%s") · 0867a877
      Eric Blake 提交于
      The only useful translation of "%s" as a format string is "%s" (I
      suppose you could claim "%1$s" is also valid, but why bother).  So
      it is not worth translating; fixing this exposes some instances
      where we were failing to translate real error messages.  This makes
      the fix of commit 097da1ab more generic, as well as ensuring no
      future regressions.
      
      * cfg.mk (sc_prohibit_useless_translation): New rule.
      * src/lxc/lxc_driver.c (lxcSetVcpuBWLive): Fix offender.
      * src/openvz/openvz_conf.c (openvzReadFSConf): Likewise.
      * src/qemu/qemu_cgroup.c (qemuSetupCgroupForVcpu): Likewise.
      * src/qemu/qemu_driver.c (qemuSetVcpusBWLive): Likewise.
      * src/xenapi/xenapi_utils.c (xenapiSessionErrorHandle): Likewise.
      0867a877
  8. 10 7月, 2012 1 次提交
    • J
      systemd: start libvirtd after network · 4036aa91
      Jim Fehlig 提交于
      Domains configured with autostart may fail to start if the host
      network stack has not been started.  E.g. when using bridged
      networking autostarting a domain can fail with
      
      libvirtd[1403]: 2012-06-20 13:23:49.833+0000: 1485: error :
      qemuAutostartDomain:177 : Failed to autostart VM 'test': Cannot get
      interface MTU on 'br0': No such device
      4036aa91