1. 20 8月, 2010 5 次提交
    • E
      maint: whitespace cleanups · 57ae4c04
      Eric Blake 提交于
      * src/storage/storage_backend_disk.c
      (virStorageBackendDiskPartFormat): Fix spacing.
      57ae4c04
    • E
      build: delete dead comments · 4b930023
      Eric Blake 提交于
      * src/qemu/qemu_driver.c (qemudGetProcessInfo): Clean up.
      * src/uml/uml_driver.c (umlGetProcessInfo): Likewise.
      * src/xen/sexpr.c (_string2sexpr): Likewise.
      4b930023
    • P
      storage: add support for Vendor and Model in XML · 20be699e
      Patrick Dignan 提交于
      I wrote a patch to add support for listing the Vendor and Model of a
      storage pool in the storage pool XML.  This would allow vendor
      extensions of specific devices.  The patch includes a test for the new
      attributes as well.
      
      Patrick Dignan
      20be699e
    • E
      uml: fix logic bug in checking reply length · 3223871e
      Eric Blake 提交于
      * src/uml/uml_driver.c (umlMonitorCommand): Validate that enough
      bytes were read to dereference both res.length, and that many
      bytes from res.data.
      Reported by Soren Hansen.
      3223871e
    • E
      nwfilter: use consistent OOM reporting · 52baf647
      Eric Blake 提交于
      * src/nwfilter/nwfilter_driver.c (nwfilterLog): Delete.
      (nwfilterDriverStartup): Use virReportOOMError instead.
      52baf647
  2. 19 8月, 2010 1 次提交
    • E
      build: fix compiler warning · 9ba934c6
      Eric Blake 提交于
      node_device/node_device_driver.c: In function 'nodeDeviceVportCreateDelete':
      node_device/node_device_driver.c:423: error: implicit declaration of function 'stat' [-Wimplicit-function-declaration]
      
      * src/node_device/node_device_driver.c (includes): Add <sys/stat.h>.
      9ba934c6
  3. 18 8月, 2010 7 次提交
    • D
      xen: Fix scheduler setting problems · 1dcd5ab9
      Daniel Veillard 提交于
      Doing `virsh schedinfo rhel5u3 --cap 65535' the hypervisor does the
      call, but does not change the value nor raise an error. Best is just to
      consider it's not in the allowed values. The problem is that the error
      won't be output since the xend driver will then be called and raise an
      error
      
          error: this function is not supported by the hypervisor: unsupported
          in xendConfigVersion < 4
      
      which will override the useful information from
      xenUnifiedDomainSetSchedulerParameters(). So best is to also invert the
      order in which the xen sub-drivers are called.
      
      * src/xen/xen_hypervisor.c: mark 65535 cap value as out of bound
      * src/xen/xen_hypervisor.c: reverse the order of the calls to the xen
        sub drivers to get the error message if needed
      1dcd5ab9
    • J
      47c74e82
    • D
      nodedev: Fix sysfs paths for vport operations · b31ef773
      Dave Allan 提交于
      Some kernels, such as the one used in RHEL-5, have vport_create and
      vport_delete operation files in /sys/class/scsi_host/hostN directory
      instead of /sys/class/fc_host/hostN. Let's check both paths for
      compatibility reasons.
      
      This also removes unnecessary '/' characters from sysfs paths containing
      LINUX_SYSFS_FC_HOST_PREFIX.
      b31ef773
    • D
      xen: Fix device count on detach · 8ebda736
      Daniel Berrange 提交于
      8ebda736
    • D
      remote: Fix incorrect use of private data field · 9f45fabd
      Daniel Berrange 提交于
      NodeDeviceCreateXML and NodeDeviceDestroy methods added for NPIV were
      using the wrong privateData field for the remote driver. This doesn't
      impact KVM, since the remote driver handles everything, thus
      privateData == devMonPrivateData. It does impact Xen though, because
      the remote driver only handles a subset of methods and thus
      privateData != devMonPrivateData.
      9f45fabd
    • M
      esx: Fix memory leak when looking up an non-existing domain by name · f688face
      Matthias Bolte 提交于
      In case an optional object cannot be found the lookup function is
      left early and the cleanup code is not executed.
      
      This pattern occurs in some other functions too.
      f688face
    • C
      Fix up qemu domain save/managed save locking. · 4303c91c
      Chris Lalancette 提交于
      The current version of the qemu managed save implementation
      is subject to a race where the domain shuts down between
      the time that we start the command and the time that we
      actually try to do the save.  Close this race by making
      qemuDomainSaveFlags() expect both the driver and the passed-in
      vm object to be locked before executing.
      Signed-off-by: NChris Lalancette <clalance@redhat.com>
      4303c91c
  4. 17 8月, 2010 7 次提交
    • E
      docs: mention domain <clock> improvements · 2ad42978
      Eric Blake 提交于
      Add documentation for features added a while ago.
      
      * docs/formatdomain.html.in (Time keeping): Update documentation
      of <clock> element to match 0.8.0 addition.
      2ad42978
    • S
      cygwin: build fix · b8564da1
      Stefan Berger 提交于
      Fixing a problem in the build on cygwin due to missing #define's.
      b8564da1
    • J
      qemu: Fix copy&paste error in warning message · 0a5f3ae0
      Jiri Denemark 提交于
      This also makes the message consistent with the message used in error
      path of qemudDomainAttachHostPciDevice.
      0a5f3ae0
    • J
      5afec517
    • J
      qemu: Re-reserve all PCI addresses on libvirtd restart · 4f86613b
      Jiri Denemark 提交于
      When reconnecting to existing VMs, we re-reserved only those PCI
      addresses which were explicitly mentioned in domain XML. Since some
      addresses are always reserved (e.g., 0:0:0 and 0:0:1), we need to handle
      those too.
      
      Also all this should only be done if device flag is supported by qemu.
      4f86613b
    • J
      build: fix AppArmor compilation · 8e3eeb4e
      Jamie Strandboge 提交于
      * src/security/virt-aa-helper.c: Add missing include.
      8e3eeb4e
    • S
      nwfilter: extend nwfilter reload support · cf6f8b9a
      Stefan Berger 提交于
      In this patch I am extending and fixing the nwfilter module's reload support to stop all ongoing threads (for learning IP addresses of interfaces) and rebuild the filtering rules of all interfaces of all VMs when libvirt is started. Now libvirtd rebuilds the filters upon the SIGHUP signal and libvirtd restart.
      
      About the patch: The nwfilter functions require a virConnectPtr. Therefore I am opening a connection in qemudStartup, which later on needs to be closed outside where the driver lock is held since otherwise it ends up in a deadlock due to virConnectClose() trying to lock the driver as well.
      
      I have tested this now for a while with several machines running and needing the IP address learner thread(s). The rebuilding of the firewall rules seems to work fine following libvirtd restart or a SIGHUP. Also the termination of libvirtd worked fine.
      cf6f8b9a
  5. 15 8月, 2010 7 次提交
  6. 14 8月, 2010 3 次提交
    • S
      nwfilter: Discard class D,E IP addresses when sniffing pkts · 753d76e0
      Stefan Berger 提交于
      When sniffing the network traffic, discard class D and E IP addresses when sniffing traffic. This was a reason why filters were not correctly rebuilt on VMs on the local 192.* network when libvirt was restarted and those VMs did not use a DHCP request to get its IP address.
      753d76e0
    • S
      nwfilter: serialize execution of scripts with ebtables cmds · bed3a217
      Stefan Berger 提交于
      While testing the SIGHUP handling and reloading of the nwfilter driver, I found that when the filters are rebuilt and mutlipe threads handled the individual interfaces, concurrently running multiple external bash scripts causes strange failures even though the executed ebtables commands are working on different tables for different interfaces. I cannot say for sure where the concurrency problems are caused, but introducing this lock definitely helps.
      bed3a217
    • M
      8b4eedc8
  7. 13 8月, 2010 4 次提交
    • C
      Move the tunnelled migration unix socket to /var/lib/libvirt/qemu · e80f1a7e
      Chris Lalancette 提交于
      Since the qemu process is running as qemu:qemu, it can't actually
      look at the unix socket in /var/run/libvirt/qemu which is owned by
      root and has permission 700.  Move the unix socket to
      /var/lib/libvirt/qemu, which is already owned by qemu:qemu.
      
      Thanks to Justin Clift for test this out for me.
      Signed-off-by: NChris Lalancette <clalance@redhat.com>
      e80f1a7e
    • C
      Fix tunnelled migration with qemu running as qemu:qemu. · a2f0b6b8
      Chris Lalancette 提交于
      The problem is that on the source of the migration, libvirtd
      is responsible for creating the unix socket over which the data
      will flow.  Since libvirtd is running as root, this file will
      be created as root.  When the qemu process running as qemu:qemu
      goes to access the unix file to write data to it, it will get
      permission denied and fail.  Make sure to change the owner
      of the unix file to qemu:qemu.
      
      Thanks to Justin Clift for testing this patch out for me.
      Signed-off-by: NChris Lalancette <clalance@redhat.com>
      a2f0b6b8
    • S
      Fix valgrind complaints when using kill -SIGHUP on libvirtd · 18b6323a
      Stefan Berger 提交于
      This patch fixes a couple of complaints from valgrind when tickling libvirtd with SIGHUP.
      
      The first two files contain fixes for memory leaks. The 3rd one initializes an uninitialized variable. The 4th one is another memory leak.
      18b6323a
    • D
      qemu: avoid calling the balloon info command if disabled · 986c2086
      Daniel Veillard 提交于
       Basically a followup of the previous patch about balloon desactivation
      if desactivated, to not ask for balloon information to qemu as we will
      just get an error back.
       This can make a huge difference in the time needed for domain
      information or list when a machine is loaded, and balloon has been
      desactivated in the guests.
      
      * src/qemu/qemu_driver.c: do not get the balloon info if the balloon
        suppor is disabled
      986c2086
  8. 12 8月, 2010 3 次提交
    • J
      bridge: Add --dhcp-no-override option to dnsmasq · e26672f7
      Jiri Denemark 提交于
      --dhcp-no-override description from dnsmasq man page:
      
            Disable  re-use  of  the  DHCP servername and filename fields as
            extra option space. If it can, dnsmasq moves the boot server and
            filename  information  (from  dhcp-boot)  out of their dedicated
            fields into DHCP options. This make extra space available in the
            DHCP  packet  for options but can, rarely, confuse old or broken
            clients. This flag forces "simple and safe" behaviour  to  avoid
            problems in such a case.
      
      It seems some virtual network card ROMs are this old/buggy so let's add
      --dhcp-no-override as a workaround for them. We don't use extra DHCP
      options so this should be safe. The option was added in dnsmasq-2.41,
      which becomes the minimum required version.
      e26672f7
    • 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
  9. 11 8月, 2010 3 次提交
    • 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