1. 12 8月, 2010 2 次提交
    • M
      esx: Improve VMX file name parsing and formatting · 145d6cb0
      Matthias Bolte 提交于
      For parsing try to match by datastore mount path first, if that
      fails fallback to /vmfs/volumes/<datastore>/<path> parsing. This
      also fixes problems with GSX on Windows. Because GSX on Windows
      doesn't use /vmfs/volumes/ style file names.
      
      For formatting use the datastore mount path too, instead of using
      /vmfs/volumes/<datastore>/<path> as fixed format.
      145d6cb0
    • J
      bridge: Fix potential segfault when preparing dnsmasq arguments · 6f42d325
      Jiri Denemark 提交于
      We add --dhcp-lease-max=xxx argument when network->def->nranges > 0 but
      we only allocate space for in the opposite case :-) I guess we are lucky
      enough to miscount somewhere else so that we actually allocate more
      space than we need since no-one has hit this bug so far.
      6f42d325
  2. 11 8月, 2010 6 次提交
    • M
      esx: Split VMX code into a general and an ESX specific part · 3de82455
      Matthias Bolte 提交于
      Introduce esxVMX_Context containing functions pointers to
      glue both parts together in a generic way.
      
      Move the ESX specific part to esx_driver.c.
      
      This is a step towards making the VMX code reusable in a
      potential VMware Workstation and VMware Player driver.
      3de82455
    • D
      allow memballoon type of none to desactivate it · 79c27a62
      Daniel Veillard 提交于
        The balloon device is automatically added to qemu guests if supported,
      but it may be useful to desactivate it. The simplest to not change the
      existing behaviour is to allow
        <memballoon type="none"/>
      as an extra option to desactivate it (it is automatically added if the
      memballoon construct is missing for the domain).
      The following simple patch just adds the extra option and does not
      change the default behaviour but avoid creating a balloon device if
      type="none" is used.
      
      * docs/schemas/domain.rng: add the extra type attribute value
      * src/conf/domain_conf.c src/conf/domain_conf.h: add the extra enum
        value
      * src/qemu/qemu_conf.c: if enum is NONE, don't activate the device,
        i.e. don't pass the args to qemu/kvm
      79c27a62
    • J
      Avoid unnecessary bootstrap runs in VPATH builds · 0495fe59
      Jiri Denemark 提交于
      0495fe59
    • D
      Add a detailed message when tap device add fails · efdd0ffc
      Doug Goldstein 提交于
      Added a more detailed error message when adding a tap devices fails and
      the kernel is missing tun support.
      Signed-off-by: NDoug Goldstein <cardoe@gentoo.org>
      efdd0ffc
    • D
      Fix return value usage · c0b0e8d0
      Doug Goldstein 提交于
      Fix the error checking to use the return value from brAddTap() instead
      of checking the current errno value which might have been changed by
      clean up calls inside of brAddTap().
      Signed-off-by: NDoug Goldstein <cardoe@gentoo.org>
      c0b0e8d0
    • E
      nodeinfo: skip offline CPUs · d413e5d7
      Eric Blake 提交于
      https://bugzilla.redhat.com/622515 - When hot-unplugging CPUs,
      libvirt failed to start a guest that had been pinned to CPUs that
      were still online.
      
      Tested on a dual-core laptop, where I also discovered that, per
      http://www.cyberciti.biz/files/linux-kernel/Documentation/cpu-hotplug.txt,
      /sys/devices/system/cpu/cpu0/online does not exist on systems where it
      cannot be hot-unplugged.
      
      * src/nodeinfo.c (linuxNodeInfoCPUPopulate): Ignore CPUs that are
      currently offline.  Detect readdir failure.
      (parse_socket): Move guts...
      (get_cpu_value): ...to new function, shared with...
      (cpu_online): New function.
      d413e5d7
  3. 10 8月, 2010 6 次提交
    • J
      qemu: Hack around asynchronous device_del · d1e5676c
      Jiri Denemark 提交于
      device_del command is not synchronous for PCI devices, it merely asks
      the guest to release the device and returns. If the host wants to use
      that device before the guest actually releases it, we are in big
      trouble. To avoid this, we already added a loop which waits up to 10
      seconds until the device is actually released before we do anything else
      with that device. But we only added this loop for managed PCI devices
      before we try reattach them back to the host.
      
      However, we need to wait even for non-managed devices. We don't reattach
      them automatically, but we still want to prevent the host from using it.
      This was revealed thanks to sVirt: when we relabel sysfs files
      corresponding to the PCI device before the guest finished releasing the
      device, qemu is no longer allowed to access those files and if it wants
      (as a result of guest's request) to write anything to them, it just
      exits, which kills the guest.
      
      This is not a proper fix and needs some further work both on libvirt and
      qemu side in the future.
      d1e5676c
    • E
      maint: update an email address preference · 1ddefd18
      Eric Blake 提交于
      * AUTHORS (Soren Hansen): Update address.
      * .mailmap: Alias other addresses to new preference.
      1ddefd18
    • D
      build-sys: only build the test programs during the check phase. · 2bd24003
      Diego Elio Pettenò 提交于
      This avoids building the tests when testing libvirt is not the aim.
      2bd24003
    • S
      Add "ubd" to the list of disk prefixes · 92e43e6d
      Soren Hansen 提交于
      virDiskNameToIndex has a list of disk name prefixes that it uses in the
      process of finding the disk's index. This list is missing "ubd" which
      is the disk prefix used for UML domains.
      Signed-off-by: NSoren Hansen <soren@linux2go.dk>
      92e43e6d
    • D
      Extend virSocketParseAddr() to allow a NULL result pointer · e9a8f3c6
      Daniel Veillard 提交于
      That way it can be used to verify a numeric address without storing
      the details
      * src/util/network.c: change virSocketParseAddr to allow a null @addr
        parameter
      e9a8f3c6
    • P
      bootloader_args is named bootargs in xen-xm · ab8b2bea
      Philipp Hahn 提交于
      According to <xen-3.4.3/tools/python/xen/xm/create.py:158>
      	gopts.var('bootargs', val='NAME',
      			  fn=set_value, default=None,
      			  use="Arguments to pass to boot loader")
      the "bootloader_args" parameter needs to be translated into "bootargs"
      when using "virsh domxml-to-native xen-xm".
      The reverse direction (domxml-from-native) is already okay.
      
      This patch fixes domxml-to-native and adds two test files to catch this
      problem.
      Signed-off-by: NPhilipp Hahn <hahn@univention.de>
      ab8b2bea
  4. 06 8月, 2010 6 次提交
  5. 05 8月, 2010 2 次提交
    • E
      build: rerun bootstrap if po/Makevars got nuked · 5f211d4b
      Eric Blake 提交于
      There has been a frequent complaint of:
      
      make[2]: Entering directory `/home/remote/eblake/libvirt/po'
      make[2]: *** No rule to make target `/config.status', needed by `Makefile'.  Stop.
      
      It happens after nuking and regenerating the po directory,
      which is a common action after running anything like
      'make dist' or 'make rpm' that dirties all the .po files.
      
      Teach autogen.sh that it must regenerate po/Makevars to avoid
      the missing variable declaration, and teach cfg.mk to recognize
      that a nuked po directory is cause to rerun autogen.sh.
      
      * cfg.mk (_update_required): Check for po/Makevars.
      * autogen.sh (bootstrap): Run bootstrap if it got lost.
      Diagnosed by Justin Clift.
      5f211d4b
    • D
      Do not use boot=on on IDE device · 634ea3fa
      Daniel Veillard 提交于
      the followup on the boot=on problem, basically it's not needed to
      specify it when booting out of IDE devices when using KVM
      * src/qemu/qemu_conf.c: do not use boot=on for IDE devices
      * tests/qemuxml2argvdata/qemuxml2argv*.args: this changes the output
        for 5 of the tests
      634ea3fa
  6. 04 8月, 2010 3 次提交
    • D
      Release of libvirt-0.8.3 · d3d33c82
      Daniel Veillard 提交于
      * configure.ac docs/news.html.in libvirt.spec.in: updates
      * po/*.po*: update and regenerated
      d3d33c82
    • J
      qemu: Fix PCI address allocation · bf0bf4e7
      Jiri Denemark 提交于
      Patch version revamped by Eric Blake <eblake@redhat.com> of Jiri
      Denemark <jdenemar@redhat.com> original patch
      
      When attaching a PCI device which doesn't explicitly set its PCI
      address, libvirt allocates the address automatically. The problem is
      that when checking which PCI address is unused, we only check for those
      with slot number higher than the highest slot number ever used.
      
      Thus attaching/detaching such device several times in a row (31 is the
      theoretical limit, less then 30 tries are enough in practise) makes any
      further device attachment fail. Furthermore, attaching a device with
      predefined PCI address to 0:0:31 immediately forbids attachment of any
      PCI device without explicit address.
      
      This patch changes the logic so that we always check all PCI addresses
      before we say there is no PCI address available.
      
      Modifications from v1: revert back to remembering the last slot
      reserved, but allow wraparound to not be limited by the end.
      In this way, slots are still assigned in the same order as
      before the patch, rather than filling in the gaps closest to
      0 and risking making windows guests mad.
      
      * src/qemu/qemu_conf.c: fix pci reservation code to do a round-robbin
        check of all available PCI splot availability before failing.
      bf0bf4e7
    • J
      OpenVZ: implement suspend/resume driver APIs · 9cbc3c8e
      Jean-Baptiste Rouault 提交于
      * src/openvz/openvz_driver.c: implements openvzDomainSuspend and
        openvzDomainResume
      9cbc3c8e
  7. 03 8月, 2010 13 次提交
  8. 02 8月, 2010 2 次提交
    • L
      Add iptables rule to fixup DHCP response checksum. · fd5b15ff
      Laine Stump 提交于
      This patch attempts to take advantage of a newly added netfilter
      module to correct for a problem with some guest DHCP client
      implementations when used in conjunction with a DHCP server run on the
      host systems with packet checksum offloading enabled.
      
      The problem is that, when the guest uses a RAW socket to read the DHCP
      response packets, the checksum hasn't yet been fixed by the IP stack,
      so it is incorrect.
      
      The fix implemented here is to add a rule to the POSTROUTING chain of
      the mangle table in iptables that fixes up the checksum for packets on
      the virtual network's bridge that are destined for the bootpc port (ie
      "dhcpc", ie port 68) port on the guest.
      
      Only very new versions of iptables will have this support (it will be
      in the next upstream release), so a failure to add this rule only
      results in a warning message. The iptables patch is here:
      
        http://patchwork.ozlabs.org/patch/58525/
      
      A corresponding kernel module patch is also required (the backend of
      the iptables patch) and that will be in the next release of the
      kernel.
      fd5b15ff
    • C
      Fix the ACS checking in the PCI code. · 86b043ad
      Chris Lalancette 提交于
      When trying to assign a PCI device to a guest, we have
      to check that all bridges upstream of that device support
      ACS.  That means that we have to find the parent bridge of
      the current device, check for ACS, then find the parent bridge
      of that device, check for ACS, etc.  As it currently stands,
      the code to do this iterates through all PCI devices on the
      system, looking for a device that has a range of busses that
      included the current device's bus.
      
      That check is not restrictive enough, though.  Depending on
      how we iterated through the list of PCI devices, we could first
      find the *topmost* bridge in the system; since it necessarily had
      a range of busses including the current device's bus, we
      would only ever check the topmost bridge, and not check
      any of the intermediate bridges.
      
      Note that this also caused a fairly serious bug in the
      secondary bus reset code, where we could erroneously
      find and reset the topmost bus instead of the inner bus.
      
      This patch changes pciGetParentDevice() so that it first
      checks if a bridge device's secondary bus exactly matches
      the bus of the device we are looking for.  If it does, we've
      found the correct parent bridge and we are done.  If it does not,
      then we check to see if this bridge device's busses *include* the
      bus of the device we care about.  If so, we mark this bridge device
      as best, and go on.  If we later find another bridge device whose
      busses include this device, but is more restrictive, then we
      free up the previous best and mark the new one as best.  This
      algorithm ensures that in the normal case we find the direct
      parent, but in the case that the parent bridge secondary bus
      is not exactly the same as the device, we still find the
      correct bridge.
      
      This patch was tested by me on a 4-port NIC with a
      bridge without ACS (where assignment failed), a 4-port
      NIC with a bridge with ACS (where assignment succeeded),
      and a 2-port NIC with no bridges (where assignment
      succeeded).
      Signed-off-by: NChris Lalancette <clalance@redhat.com>
      86b043ad