1. 13 8月, 2012 39 次提交
    • J
      systemd: start libvirtd after network · 4da16535
      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
      (cherry picked from commit 4036aa91)
      4da16535
    • T
      Fix a string format bug in qemu_cgroup.c · 3fb882a3
      tangchen 提交于
      Signed-off-by: NTang Chen <tangchen@cn.fujitsu.com>
      (cherry picked from commit 097da1ab)
      3fb882a3
    • P
      virsh: Clarify documentation for virsh dompmsuspend command · 9af9f46b
      Peter Krempa 提交于
      Clarify the docs to make more clear what this command does and that it
      requires a guest agent running in the guest.
      (cherry picked from commit e16d434d)
      9af9f46b
    • P
      storage_backend_fs: Don't free a part of a structure on error · 95b06559
      Peter Krempa 提交于
      As the storage pool sources are stored in a list of structs, the pointer
      returned by virStoragePoolSourceListNewSource() shouldn't be freed as it
      points in the middle of a memory block. This combined with a regression
      that takes the error path every time on caused a double-free abort on
      the src struct in question.
      (cherry picked from commit ab9c72ae)
      95b06559
    • D
      Fix one test regression on auth Ceph support · b20e330d
      Daniel Veillard 提交于
      The extra data need to be added to one test case
      (cherry picked from commit c47a8aec)
      b20e330d
    • W
      qemu: Always set auth_supported for Ceph disks. · ca2765a2
      Wido den Hollander 提交于
      Recently the Ceph project defaulted auth_supported from 'none' to 'cephx'.
      
      When no auth information was set for Ceph disks this would lead to librados defaulting to
      'cephx', but there would be no additional authorization information.
      
      We now explicitly set auth_supported to none when passing down arguments to Qemu.
      Signed-off-by: NWido den Hollander <wido@widodh.nl>
      (cherry picked from commit ccb94785)
      
      (crobinso: Add Wido to AUTHORS)
      ca2765a2
    • J
      qemu: add rbd to whitelist of migration-safe formats · b1b449b3
      Josh Durgin 提交于
      QEMU (and librbd) flush the cache on the source before the
      destination starts, and the destination does not read any
      changeable data before that, so live migration with rbd caching
      is safe.
      
      This makes 'virsh migrate' work with rbd and caching without the
      --unsafe flag.
      Reported-by: NVladimir Bashkirtsev <vladimir@bashkirtsev.com>
      Signed-off-by: NJosh Durgin <josh.durgin@inktank.com>
      (cherry picked from commit 78290b16)
      b1b449b3
    • E
      maint: use full author name for previous commit · da284a74
      Eric Blake 提交于
      * .mailmap: Add a name alias.
      (cherry picked from commit 30a30a7a)
      da284a74
    • L
      fix key error for qemuMonitorGetBlockStatsInfo · dfd51bfc
      lvroyce 提交于
      virDomainBlockStatsFlags can't collect total_time_ns for read/write/flush
      because of key typo when retriveing from qemu cmd result
      Signed-off-by: Nlvroyce <lvroyce@linux.vnet.ibm.com>
      (cherry picked from commit 811cea18)
      dfd51bfc
    • D
      virsh: Cleanup virsh -V output · 87924a13
      Doug Goldstein 提交于
      Fixed up virsh -V output by removing invalid WITH_PROXY & WITH_ONE
      checks, adding several missing checks, and fixing the DTrace check.
      Signed-off-by: NDoug Goldstein <cardoe@cardoe.com>
      Signed-off-by: NEric Blake <eblake@redhat.com>
      (cherry picked from commit 9faaaba4)
      87924a13
    • S
      nwfilter: Fix memory leak · 6fba8c1f
      Stefan Berger 提交于
      Below patch fixes this coverity report:
      
      /libvirt/src/conf/nwfilter_conf.c:382:
      leaked_storage: Variable "varAccess" going out of scope leaks the storage it points to.
      
      (cherry picked from commit b1675bac)
      6fba8c1f
    • E
      Fix vm's outbound traffic control problem · 870094c1
      Eiichi Tsukata 提交于
      Hello,
      
      This is a patch to fix vm's outbound traffic control problem.
      
      Currently, vm's outbound traffic control by libvirt doesn't go well.
      This problem was previously discussed at libvir-list ML, however
      it seems that there isn't still any answer to the problem.
      http://www.redhat.com/archives/libvir-list/2011-August/msg00333.html
      
      I measured Guest(with virtio-net) to Host TCP throughput with the
      command "netperf -H".
      Here are the outbound QoS parameters and the results.
      
      outbound average rate[kilobytes/s] : Guest to Host throughput[Mbit/s]
      ======================================================================
      1024  (8Mbit/s)                    : 4.56
      2048  (16Mbit/s)                   : 3.29
      4096  (32Mbit/s)                   : 3.35
      8192  (64Mbit/s)                   : 3.95
      16384 (128Mbit/s)                  : 4.08
      32768 (256Mbit/s)                  : 3.94
      65536 (512Mbit/s)                  : 3.23
      
      The outbound traffic goes down unreasonably and is even not controled.
      
      The cause of this problem is too large mtu value in "tc filter" command run by
      libvirt. The command uses burst value to set mtu and the burst is equal to
      average rate value if it's not set. This value is too large. For example
      if the average rate is set to 1024 kilobytes/s, the mtu value is set to 1024
      kilobytes. That's too large compared to the size of network packets.
      Here libvirt applies tc ingress filter to Host's vnet(tun) device.
      Tc ingress filter is implemented with TBF(Token Buckets Filter) algorithm. TBF
      uses mtu value to calculate the amount of token consumed by each packet. With too
      large mtu value, the token consumption rate is set too large. This leads to
      token starvation and deterioration of TCP throughput.
      
      Then, should we use the default mtu value 2 kilobytes?
      The anser is No, because Guest with virtio-net device uses 65536 bytes
      as mtu to transmit packets to Host, and the tc filter with the default mtu
      value 2k drops packets whose size is larger than 2k. So, the most packets
      is droped and again leads to deterioration of TCP throughput.
      
      The appropriate mtu value is 65536 bytes which is equal to the maximum value
      of network interface device defined in <linux/netdevice.h>. The value is
      not so large that it causes token starvation and not so small that it
      drops most packets.
      Therefore this patch set the mtu value to 64kb(== 65535 bytes).
      
      Again, here are the outbound QoS parameters and the TCP throughput with
      the libvirt patched.
      
      outbound average rate[kilobytes/s] : Guest to Host throughput[Mbit/s]
      ======================================================================
      1024  (8Mbit/s)                    : 8.22
      2048  (16Mbit/s)                   : 16.42
      4096  (32Mbit/s)                   : 32.93
      8192  (64Mbit/s)                   : 66.85
      16384 (128Mbit/s)                  : 133.88
      32768 (256Mbit/s)                  : 271.01
      65536 (512Mbit/s)                  : 547.32
      
      The outbound traffic conforms to the given limit.
      
      Thank you,
      Signed-off-by: NEiichi Tsukata <eiichi.tsukata.xh@hitachi.com>
      (cherry picked from commit 0ac3baee)
      
      Conflicts:
      
      	AUTHORS
      870094c1
    • P
      network_conf: Don't free uninitialized pointers while parsing DNS SRV · 568e6651
      Peter Krempa 提交于
      If the user specified invalid protocol type in a network's SRV record
      the error path ended up in freeing uninitialized pointers causing a
      daemon crash.
      
      *network_conf.c: virNetworkDNSSrvDefParseXML(): initialize local
                                                      variables
      (cherry picked from commit 96ebb4fe)
      568e6651
    • O
      storage: Error out if the target is already mounted for netfs pool · aa57eae7
      Osier Yang 提交于
      mnt_fsname can not be the same, as we check the duplicate pool
      sources earlier before, means it can't be the same pool, moreover,
      a pool can't be started if it's already active anyway. So no reason
      to act as success.
      (cherry picked from commit 81165294)
      aa57eae7
    • M
      configure: show correct default argument in help · 2a71d969
      Marc-André Lureau 提交于
      Pushed without ack, under the trivial rule.
      (cherry picked from commit b29f9bbe)
      2a71d969
    • M
      events: Don't fail on registering events for two different domains · 9a5d10ef
      Michal Privoznik 提交于
      virConnectDomainEventRegisterAny() takes a domain as an argument.
      So it should be possible to register the same event (be it
      VIR_DOMAIN_EVENT_ID_LIFECYCLE for example) for two different domains.
      That is, we need to take domain into account when searching for
      duplicate event being already registered.
      (cherry picked from commit cd15303f)
      9a5d10ef
    • C
      doc: fix typo in virDomainDestroy API doc · 8512c27e
      Christophe Fergeau 提交于
      (cherry picked from commit 0b7ad22b)
      8512c27e
    • G
      Add /tools/libvirt-guests.service to .gitignore · 20b07c28
      Guido Günther 提交于
      since it's an autogenerated file
      (cherry picked from commit 16a8f5e5)
      20b07c28
    • G
      Don't install systemd service files executable · da54890f
      Guido Günther 提交于
      since they aren't. Detected by Debian's lintian.
      (cherry picked from commit 78bf84f4)
      da54890f
    • T
      S390: Fixed Parser for /proc/cpuinfo needs to be adapted for your architecture · d838a6bc
      Thang Pham 提交于
      Minimal CPU "parser" for s390 to avoid compile time warning.
      Signed-off-by: NThang Pham <thang.pham@us.ibm.com>
      Signed-off-by: NViktor Mihajlovski <mihajlov@linux.vnet.ibm.com>
      (cherry picked from commit bf2e40fa)
      
      (crobinso: Add Thang to AUTHORS)
      d838a6bc
    • V
      S390: Override QEMU_CAPS_NO_ACPI for s390x · 2a6cfe8e
      Viktor Mihajlovski 提交于
      Starting a KVM guest on s390 fails immediately. This is because
      "qemu --help" reports -no-acpi even for the s390(x) architecture but
      -no-acpi isn't supported there.
      Workaround is to remove QEMU_CAPS_NO_ACPI from the capability set
      after the version/capability extraction.
      Signed-off-by: NViktor Mihajlovski <mihajlov@linux.vnet.ibm.com>
      (cherry picked from commit 6a6c3471)
      
      (crobinso: add Viktor to AUTHORS)
      2a6cfe8e
    • O
      qemu: Improve error if setmem fails for lacking of balloon support · 9fc5b7da
      Osier Yang 提交于
      "cannot set memory of an active domain" is misleading, it sounds
      like setting memory of active domain is not supported.
      (cherry picked from commit 968b6c60)
      9fc5b7da
    • P
      virsh: Improve error when trying to change vm's cpu count 0 · cba21fd9
      Peter Krempa 提交于
      This patch adds a check for the count of processors the user requests
      for the guest machine so that invalid values produce a more helpful
      error message.
      (cherry picked from commit de924ca9)
      cba21fd9
    • J
      Initialize random generator in lxc controller · d020d73f
      Jim Fehlig 提交于
      The lxc contoller eventually makes use of virRandomBits(), which was
      segfaulting since virRandomInitialize() is never invoked.
      
      Program received signal SIGSEGV, Segmentation fault.
      0x00007ffff554d560 in random_r () from /lib64/libc.so.6
      (gdb) bt
      0  0x00007ffff554d560 in random_r () from /lib64/libc.so.6
      1  0x0000000000469eaa in virRandomBits (nbits=32) at util/virrandom.c:80
      2  0x000000000045bf69 in virHashCreateFull (size=256,
          dataFree=0x4aa2a2 <hashDataFree>, keyCode=0x45bd40 <virHashStrCode>,
          keyEqual=0x45bdad <virHashStrEqual>, keyCopy=0x45bdfa <virHashStrCopy>,
          keyFree=0x45be37 <virHashStrFree>) at util/virhash.c:134
      3  0x000000000045c069 in virHashCreate (size=0, dataFree=0x4aa2a2 <hashDataFree>)
          at util/virhash.c:164
      4  0x00000000004aa562 in virNWFilterHashTableCreate (n=0)
          at conf/nwfilter_params.c:686
      5  0x00000000004aa95b in virNWFilterParseParamAttributes (cur=0x711d30)
          at conf/nwfilter_params.c:793
      6  0x0000000000481a7f in virDomainNetDefParseXML (caps=0x702c90, node=0x7116b0,
          ctxt=0x7101b0, bootMap=0x0, flags=0) at conf/domain_conf.c:4589
      7  0x000000000048cc36 in virDomainDefParseXML (caps=0x702c90, xml=0x710040,
          root=0x7103b0, ctxt=0x7101b0, expectedVirtTypes=16, flags=0)
          at conf/domain_conf.c:8658
      8  0x000000000048f011 in virDomainDefParseNode (caps=0x702c90, xml=0x710040,
          root=0x7103b0, expectedVirtTypes=16, flags=0) at conf/domain_conf.c:9360
      9  0x000000000048ee30 in virDomainDefParse (xmlStr=0x0,
          filename=0x702ae0 "/var/run/libvirt/lxc/x.xml", caps=0x702c90,
          expectedVirtTypes=16, flags=0) at conf/domain_conf.c:9310
      10 0x000000000048ef00 in virDomainDefParseFile (caps=0x702c90,
          filename=0x702ae0 "/var/run/libvirt/lxc/x.xml", expectedVirtTypes=16, flags=0)
          at conf/domain_conf.c:9332
      11 0x0000000000425053 in main (argc=5, argv=0x7fffffffe2b8)
          at lxc/lxc_controller.c:1773
      (cherry picked from commit 57349ffc)
      d020d73f
    • G
      openvz: check pointer size instead of int · 66d095e6
      Guido Günther 提交于
      since int is 4 bytes on both i386 and amd64.
      (cherry picked from commit 229773fc)
      66d095e6
    • D
      Fix default USB controller for ppc64 · 340ab1c9
      Dipankar Sarma 提交于
      Fix the default usb controller for pseries systems if none
      specified.
      Signed-off-by: NDipankar Sarma <dipankar@in.ibm.com>
      (cherry picked from commit d1778b71)
      340ab1c9
    • M
      virsh: fix few typos on desc command · 91b4315b
      Martin Kletzander 提交于
      virsh help fix:
       - <--title> can also /get/ the title
      
      virsh man page:
       - missing <domain-id>
       - <new_desc> should be <new-desc>
      (cherry picked from commit 3dc733bb)
      91b4315b
    • M
      domain_conf: fix possible memory leak · 49cb53fa
      Martin Kletzander 提交于
      Until now, it was possible to crash libvirtd when defining domain with
      channel device with missing source element.
      
      When creating new virDomainChrDef, target.port is set to -1, but
      unfortunately it is an union with addresses that virDomainChrDefFree
      tries to free in case the deviceType is channel. Having the port set
      to -1 is intended, however the cleanest way to get around the problems
      with the crash seems to be renumbering the VIR_DOMAIN_CHR_CHANNEL_
      target types to cover new NONE type (with value 0) being the default
      (no target type yet).
      (cherry picked from commit 830d035f)
      49cb53fa
    • M
      virsh: make domiftune interface help string consistent · 855d8612
      Martin Kletzander 提交于
      Append '(MAC Address)' after the help string of domiftune virsh
      command as it takes the same type of argument as domif-{get,set}link
      which have it specified.
      (cherry picked from commit 4b227307)
      855d8612
    • G
      openvz: Fix wordsize on 64 bit architectures · e858eda3
      Guido Günther 提交于
      The word size there is 64 bit not 8.
      (cherry picked from commit 7dcee3f9)
      e858eda3
    • G
      LXC: fix memory leak in lxcContainerMountFSBlockHelper · bba793dc
      Gao feng 提交于
      we alloc the memory for format in lxcContainerMountDetectFilesystem
      but without free it in lxcContainerMountFSBlockHelper.
      
      this patch just call VIR_FREE to free it.
      Signed-off-by: NGao feng <gaofeng@cn.fujitsu.com>
      (cherry picked from commit 73e2d646)
      bba793dc
    • M
      qemu_agent: Wait for events instead of agent response · e8603e5f
      Michal Privoznik 提交于
      With latest changes to qemu-ga success on some commands is not reported
      anymore, e.g. guest-shutdown or guest-suspend-*. However, errors are
      still being reported. Therefore, we need to find different source of
      indication if operation was successful. Events.
      (cherry picked from commit d97a234c)
      e8603e5f
    • E
      build: hoist qemu dependence on yajl to configure · 4cb2da8c
      Eric Blake 提交于
      Commit 6e769eba made it a runtime error if libvirt was compiled
      without yajl support but targets a new enough qemu.  But enough
      users are hitting this on self-compiled libvirt that it is worth
      erroring out at compilation time, rather than an obscure failure
      when trying to use the built executable.
      
      * configure.ac: If qemu is requested and -version works, require
      yajl when qemu version is new enough.
      * src/qemu/qemu_capabilities.c (qemuCapsComputeCmdFlags): Add
      comment.
      (cherry picked from commit 350583c8)
      4cb2da8c
    • C
      autogen: Always abide --system · 9373f0b7
      Cole Robinson 提交于
      If we do ./autogen.sh && ./configure, then later try ./autogen.sh --system,
      configure isn't invoked with the requested params. Instead
      config.status --recheck is run.
      (cherry picked from commit 2cd29c31)
      9373f0b7
    • J
      Check for errors when parsing bridge interface XML · d3121936
      Jim Fehlig 提交于
      The return status of virInterfaceDefParseBridge() was not being
      checked, potentially resulting in the creation of a broken
      interface.
      (cherry picked from commit cc004a66)
      d3121936
    • O
      schema: Update domain XML schema · 5814e39b
      Osier Yang 提交于
      'boot' tag shouldn't be exclusive with 'kernel', 'initrd', and 'cmdline',
      though the boot sequence doesn't make sense when the guest boots from
      kernel directly. But it's useful if booting from kernel is to install
      a newguest, even if it's not to install a guest, there is no hurt. And
      on the other hand, we allow 'boot' and the kernel tags when parsing.
      (cherry picked from commit b34324fb)
      5814e39b
    • W
      qemu: fix potential dead lock · d2c5e42f
      Wen Congyang 提交于
      If we lock the qemu_driver, we should call qemuDomainObjBeginJobWithDriver()
      not qemuDomainObjBeginJob().
      (cherry picked from commit 5136c579)
      d2c5e42f
    • O
      virsh: Null terminated the string memcpy from buffer explicitly · 72237660
      Osier Yang 提交于
      Detected by valgrind:
      
      ==16217== 1 errors in context 1 of 12:
      ==16217== Invalid read of size 1
      ==16217==    at 0x4A07804: __GI_strlen (mc_replace_strmem.c:284)
      ==16217==    by 0x3019F167F6: xdr_string (in /lib64/libc-2.12.so)
      ==16217==    by 0x3033709E8D: xdr_remote_nonnull_string (remote_protocol.c:31)
      ==16217==    by 0x303370E5CB: xdr_remote_domain_update_device_flags_args (remote_protocol.c:2028)
      ==16217==    by 0x30337197D1: virNetMessageEncodePayload (virnetmessage.c:341)
      ==16217==    by 0x30337135E1: virNetClientProgramCall (virnetclientprogram.c:327)
      ==16217==    by 0x30336F1EFD: callWithFD (remote_driver.c:4586)
      ==16217==    by 0x30336F1F7B: call (remote_driver.c:4607)
      ==16217==    by 0x30336F42F2: remoteDomainUpdateDeviceFlags (remote_client_bodies.h:2865)
      ==16217==    by 0x30336D46E5: virDomainUpdateDeviceFlags (libvirt.c:9457)
      ==16217==    by 0x41AEE8: cmdChangeMedia (virsh.c:15249)
      ==16217==    by 0x413CB4: vshCommandRun (virsh.c:18669)
      ==16217==  Address 0x4ec5e25 is 0 bytes after a block of size 293 alloc'd
      ==16217==    at 0x4A04A28: calloc (vg_replace_malloc.c:467)
      ==16217==    by 0x303364F1DB: virAllocN (memory.c:129)
      ==16217==    by 0x41A844: vshPrepareDiskXML (virsh.c:15043)
      ==16217==    by 0x41AECC: cmdChangeMedia (virsh.c:15246)
      ==16217==    by 0x413CB4: vshCommandRun (virsh.c:18669)
      ==16217==    by 0x423973: main (virsh.c:20261)
      (cherry picked from commit e3843d7f)
      72237660
    • L
      docs: small typo in formatdomain.html · 762fcc77
      Laine Stump 提交于
      (cherry picked from commit 8b36e32c)
      762fcc77
  2. 12 8月, 2012 1 次提交