1. 10 8月, 2012 2 次提交
    • M
      esx: Implement interface driver · b9dfbf57
      Matthias Bolte 提交于
      Lists available PhysicalNic devices. A PhysicalNic is always active
      and can neither be defined nor undefined.
      
      A PhysicalNic is used to bridge a HostVirtualSwitch to the physical
      network.
      b9dfbf57
    • S
      nwfilter: remove target table before renaming it · 98c7d8b2
      Stefan Berger 提交于
      Remove the target table before renaming a table to it, i.e.,
      remove table B before renaming A to B. This makes the
      renaming more robust against unconnected left-over tables.
      98c7d8b2
  2. 09 8月, 2012 8 次提交
    • D
      Add APIs for obtaining the unique ID of LVM & SCSI volumes · efd6824c
      Daniel P. Berrange 提交于
      Both LVM volumes and SCSI LUNs have a globally unique
      identifier associated with them. It is useful to be able
      to query this identifier to then perform disk locking,
      rather than try to figure out a stable pathname.
      Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
      efd6824c
    • J
      qemu: Fix debug message in p2p migration · e18396f3
      Jiri Denemark 提交于
      When entering "confirm" phase, we are interested in the value of
      cancelled rather then ret variable which was interesting before "finish"
      phase and didn't change since then.
      e18396f3
    • J
      examples: Update strings for event details · 462c2112
      Jiri Denemark 提交于
      462c2112
    • J
      qemu: Migrate at unlimited speed by default · 6cfdeaac
      Jiri Denemark 提交于
      Previously, qemu did not respond to monitor commands during migration if
      the limit was too high. This prevented us from raising the limit
      earlier. The qemu issue seems to be fixed (according to my testing) and
      we may remove the 32Mb/s limit.
      6cfdeaac
    • P
      qemu: Refactor parsing of block device IO tuning parameters. · aba9abc5
      Peter Krempa 提交于
      This patch refactors the JSON parsing function that extracts the block
      IO tuning parameters from qemu's output. The most impacting change
      concerns the error message that is returned if the reply from qemu does
      not contain the needed data. The data for IO parameter tuning were added
      in qemu 1.1 and the previous error message was confusing.
      
      This patch also breaks long lines and extracts a multiple time used code
      pattern to a macro.
      aba9abc5
    • P
      remote: Clean up coding style and refactor remote connection opening · 6758ad4f
      Peter Krempa 提交于
      Remove spaces before function calls and some other coding nits in some
      parts of the remote driver and refactor getting of URI argument
      components into variables used by libvirt later on.
      6758ad4f
    • P
      Allow rbd backing stores · 16d3ab86
      Peter Feiner 提交于
      Prevents libvirt from treating RBD backing stores as files. Without this
      patch, creating a domain with a qcow2 overlay on an RBD would fail.
      
      This patch essentially extends 9c7c4a4f,
      which allows nbd backing stores, to allow rbd backing stores.
      16d3ab86
    • P
      Fix errno check, prevent spurious errors under heavy load · bfa74ebe
      Peter Feiner 提交于
      From man poll(2), poll does not set errno=EAGAIN on interrupt, however
      it does set errno=EINTR. Have libvirt retry on the appropriate errno.
      
      Under heavy load, a program of mine kept getting libvirt errors 'poll on
      socket failed: Interrupted system call'. The signals were SIGCHLD from
      processes forked by threads unrelated to those using libvirt.
      bfa74ebe
  3. 08 8月, 2012 5 次提交
    • G
      qemu:rename qemuCheckScsiControllerModel function · d7d468f0
      Guannan Ren 提交于
      d7d468f0
    • G
      rpc: fix a virObject typo error in struct _virNetServer · 41185927
      Guannan Ren 提交于
      This typo will crash libvirtd when it recevies signal SIGINT
      41185927
    • G
      qemu: add two qemu caps for lsi and virtio-scsi SCSI controllers · 015c603b
      Guannan Ren 提交于
      Rename qemuDefaultScsiControllerModel to qemuCheckScsiControllerModel.
      When scsi model is given explicitly in XML(model > 0) checking if the
      underlying QEMU supports it or not first, raise an error on checking
      failure.
      When the model is not given(mode <= 0), return LSI by default, if
      the QEMU doesn't support it, raise an error.
      015c603b
    • G
      qemu: add capabilities flags related to scsi controller · 8694c716
      Guannan Ren 提交于
        QEMU_CAPS_SCSI_LSI
          set the flag when "lsi53c895a", bus PCI, alias "lsi" in
          the output of "qemu -device ?"
          -device lsi in qemu command line
      
        QEMU_CAPS_VIRTIO_SCSI_PCI
          set the flag when "name "virtio-scsi-pci", bus PCI" in
          the output of qemu devices query.
          -device virtio-scsi-pci in qemu command line
      8694c716
    • L
      util: include stderr in log message when an external command fails · b8c298d3
      Laine Stump 提交于
      This patch is in response to:
      
        https://bugzilla.redhat.com/show_bug.cgi?id=818467
      
      If a caller to virCommandRun doesn't ask for the exitstatus of the
      program it's running, the virCommand functions assume that they should
      log an error message and return failure if the exit code isn't
      0. However, only the commandline and exit status are logged, while
      potentially useful information sent by the program to stderr is
      discarded.
      
      Fortunately, virCommandRun is already checking if the caller had asked
      for stderr to be saved and, if not, sets things up to save it in
      *cmd->errbuf. This makes it fairly simple for virCommandWait to
      include *cmd->errbuf in the error log (there are still other callers
      that don't setup errbuf, and even virCommandRun won't set it up if the
      command is being daemonized, so we have to check that it's non-zero).
      b8c298d3
  4. 07 8月, 2012 12 次提交
  5. 06 8月, 2012 7 次提交
    • R
      apparmor: QEMU bridge helper policy updates · b0e47898
      Richa Marwaha 提交于
      This patch provides AppArmor policy updates for the QEMU bridge helper.
      The QEMU bridge helper is a SUID executable exec'd by QEMU that drops
      capabilities to CAP_NET_ADMIN and adds a tap device to a network bridge.
      Signed-off-by: NRicha Marwaha <rmarwah@linux.vnet.ibm.com>
      Signed-off-by: Corey Bryant<coreyb@linux.vnet.ibm.com>
      b0e47898
    • R
      Add -netdev bridge support · e060f864
      Richa Marwaha 提交于
      This patch adds the support to run the QEMU network helper
      under unprivileged user. It also adds the support for
      attach-interface option in virsh to run under unprivileged
      user.
      Signed-off-by: NRicha Marwaha <rmarwah@linux.vnet.ibm.com>
      Signed-off-by: Corey Bryant<coreyb@linux.vnet.ibm.com>
      e060f864
    • R
      Add -netdev bridge capabilities · 756fe786
      Richa Marwaha 提交于
      This patch adds the capability in libvirt to check if
      -netdev bridge option is supported or not.
      Signed-off-by: NRicha Marwaha <rmarwah@linux.vnet.ibm.com>
      Signed-off-by: Corey Bryant<coreyb@linux.vnet.ibm.com>
      756fe786
    • E
      virrandom: make virRandomInitialize an automatic one-shot · 87de27b7
      Eric Blake 提交于
      All callers used the same initialization seed (well, the new
      viratomictest forgot to look at getpid()); so we might as well
      make this value automatic.  And while it may feel like we are
      giving up functionality, I documented how to get it back in the
      unlikely case that you actually need to debug with a fixed
      pseudo-random sequence.  I left that crippled by default, so
      that a stray environment variable doesn't cause a lack of
      randomness to become a security issue.
      
      * src/util/virrandom.c (virRandomInitialize): Rename...
      (virRandomOnceInit): ...and make static, with one-shot call.
      Document how to do fixed-seed debugging.
      * src/util/virrandom.h (virRandomInitialize): Drop prototype.
      * src/libvirt_private.syms (virrandom.h): Don't export it.
      * src/libvirt.c (virInitialize): Adjust caller.
      * src/lxc/lxc_controller.c (main): Likewise.
      * src/security/virt-aa-helper.c (main): Likewise.
      * src/util/iohelper.c (main): Likewise.
      * tests/seclabeltest.c (main): Likewise.
      * tests/testutils.c (virtTestMain): Likewise.
      * tests/viratomictest.c (mymain): Likewise.
      87de27b7
    • E
      build: drop conditional use of mdns code · 1d5bc382
      Eric Blake 提交于
      Commit 1f6f723c missed a step.  At first I was worried that scrubbing
      the conditionals would lead to a runtime failure when compiled without
      avahi, but my testing makes it appear that the runtime error will only
      occur if the .conf files in /etc request mdns advertisement; and the
      old behavior was to silently ignore the request, so this is actually
      a better behavior of only failing when the config requests the
      impossible.
      
      * src/rpc/virnetserver.c: Drop HAVE_AVAHI conditionals; all
      callers already passed NULL if mdns_adv was not configured.
      1d5bc382
    • M
      qemu: Set reasonable RSS limit on domain startup · addeb7cd
      Michal Privoznik 提交于
      If there's a memory leak in qemu or qemu is exploited the host's
      system will sooner or later start trashing instead of killing
      the bad process. This however has impact on performance and other
      guests as well. Therefore we should set a reasonable RSS limit
      even when user hasn't set any. It's better to be secure by default.
      addeb7cd
    • O
      virsh: Use vshPrint instead of printf · e534ec66
      Osier Yang 提交于
      e534ec66
  6. 04 8月, 2012 5 次提交
    • J
      xen-xm: Generate UUID if not specified · 1fbdfc53
      Jim Fehlig 提交于
      Parsing xen-xm format configuration will fail if UUID is not
      specified, e.g.
      
      virsh domxml-from-native xen-xm some-config-without-uuid
      error: internal error parsing xm config failed
      
      Initially I thought to skip parsing the UUID in xenParseXM() when
      not present in the configuration, but this results in a UUID of
      all zeros since it is never set
      
      virsh domxml-from-native xen-xm /tmp/jim/bug-773621_pierre-test
      <domain type='xen'>
        <name>test</name>
        <uuid>00000000-0000-0000-0000-000000000000</uuid>
        ...
      
      which certainly can't be correct since this is the UUID the xen
      tools use for dom0.
      
      This patch takes the approach of generating a UUID when it is not
      specified in the configuration.
      1fbdfc53
    • P
      conf: Remove console stream callback only when freeing console helper · 45edefc7
      Peter Krempa 提交于
      Commit ba226d33 tried to fix crash of
      the daemon when a domain with an open console was destroyed. The fix was
      wrong as it tried to remove the callback also when the stream was
      aborted, where at that point the fd stream driver was already freed and
      removed.
      
      This patch clears the callbacks with a helper right before the hash is
      freed, so that it doesn't interfere with other codepaths where the
      stream object is freed.
      45edefc7
    • P
      client: Free message when freeing client · f8ef393e
      Peter Krempa 提交于
      The last message of the client was not freed leaking 4 bytes of memory
      in the client when the remote daemon crashed while processing a message.
      f8ef393e
    • A
      ESX: Add "Byte" datatype · 54f9cf80
      Ata E Husain Bohra 提交于
      Append "Byte" to set of predefined datatype objects.
      Signed-off-by: NAta E Husain Bohra <ata.husain@hotmail.com>
      54f9cf80
    • E
      parallels: translate error message · 41cb8048
      Eric Blake 提交于
      Without this patch, the English phrase 'no name' would appear
      literally within the remaining translated message.
      
      * src/parallels/parallels_driver.c (parallelsCreateVm)
      (parallelsDomainDefineXML): Tweak error message.
      41cb8048
  7. 03 8月, 2012 1 次提交
    • L
      build: fix "make rpm" · 86d56e31
      Laine Stump 提交于
      make rpm was failing with the following error:
      
      Entering directory `/home/laine/devel/libvirt/tests'
      make[2]: *** No rule to make target `viratomicdata.h',
                   needed by `distdir'.  Stop.
      
      viratomicdata.h is listed in tests/Makefile.am as a dependency of
      viratomictest, but doesn't exist, is never referenced, and removing
      that dependency permits make rpm to complete successfully.
      86d56e31