1. 18 3月, 2011 1 次提交
    • J
      Add libxenlight driver · 2b84e445
      Jim Fehlig 提交于
      Add a new xen driver based on libxenlight [1], which is the primary
      toolstack starting with Xen 4.1.0.  The driver is stateful and runs
      privileged only.
      
      Like the existing xen-unified driver, the libxenlight driver is
      accessed with xen:// URI.  Driver selection is based on the status
      of xend.  If xend is running, the libxenlight driver will not load
      and xen:// connections are handled by xen-unified.  If xend is not
      running *and* the libxenlight driver is available, xen://
      connections are deferred to the libxenlight driver.
      
      V6:
       - Address several code style issues noted by Daniel Veillard
       - Make drive work with xen:/// URI
       - Hold domain object reference while domain is injected in
         libvirt event loop.  Race found and fixed by Markus Groß.
      
      V5:
       - Ensure events are unregistered when domain private data
         is destroyed.  Discovered and fixed by Markus Groß.
      
      V4:
       - Handle restart of libvirtd, reconnecting to previously
         started domains
       - Rebased to current master
       - Tested against Xen 4.1 RC7-pre (c/s 22961:c5d121fd35c0)
      
      V3:
        - Reserve vnc port within driver when autoport=yes
      
      V2:
        - Update to Xen 4.1 RC6-pre (c/s 22940:5a4710640f81)
        - Rebased to current master
        - Plug memory leaks found by Stefano Stabellini and valgrind
        - Handle SHUTDOWN_crash domain death event
      
      [1] http://lists.xensource.com/archives/html/xen-devel/2009-11/msg00436.html
      2b84e445
  2. 17 3月, 2011 1 次提交
    • E
      build: improve rpm generation for distro backports · 80e6200f
      Eric Blake 提交于
      When building for an older distro, it's convenient to just
      tell rpmbuild to define dist (for example, to .el6_0), rather
      than also remembering to define rhel to 6.
      
      * libvirt.spec.in: Guess %{rhel} based on %{dist}.
      Based on an idea by Jiri Denemark.
      80e6200f
  3. 04 3月, 2011 1 次提交
    • D
      Add logrotate support for libvirtd.log · e7aeed00
      Daniel Veillard 提交于
      As the file may grow quite a bit especially with debug turned on.
      * daemon/libvirtd.logrotate.in daemon/Makefile.am libvirt.spec.in:
        add new logrotate file for the daemon log
      e7aeed00
  4. 22 2月, 2011 1 次提交
  5. 18 2月, 2011 2 次提交
    • O
      Requires gettext for client package · 39164c11
      Osier Yang 提交于
      libvirt-guests invokes functions in gettext.sh, so we need to
      require gettext package in spec file.
      
      Demo with the fix:
      % rpm -q gettext
      package gettext is not installed
      
      % rpm -ivh libvirt-client-0.8.8-1.fc14.x86_64.rpm
      error: Failed dependencies:
      	gettext is needed by libvirt-client-0.8.8-1.fc14.x86_64
      
      * libvirt.spec.in
      39164c11
    • L
      Give each virtual network bridge its own fixed MAC address · 5754dbd5
      Laine Stump 提交于
      This fixes https://bugzilla.redhat.com/show_bug.cgi?id=609463
      
      The problem was that, since a bridge always acquires the MAC address
      of the connected interface with the numerically lowest MAC, as guests
      are started and stopped, it was possible for the MAC address to change
      over time, and this change in the network was being detected by
      Windows 7 (it sees the MAC of the default route change), so on each
      reboot it would bring up a dialog box asking about this "new network".
      
      The solution is to create a dummy tap interface with a MAC guaranteed
      to be lower than any guest interface's MAC, and attach that tap to the
      bridge as soon as it's created. Since all guest MAC addresses start
      with 0xFE, we can just generate a MAC with the standard "0x52, 0x54,
      0" prefix, and it's guaranteed to always win (physical interfaces are
      never connected to these bridges, so we don't need to worry about
      competing numerically with them).
      
      Note that the dummy tap is never set to IFF_UP state - that's not
      necessary in order for the bridge to take its MAC, and not setting it
      to UP eliminates the clutter of having an (eg) "virbr0-nic" displayed
      in the output of the ifconfig command.
      
      I chose to not auto-generate the MAC address in the network XML
      parser, as there are likely to be consumers of that API that don't
      need or want to have a MAC address associated with the
      bridge.
      
      Instead, in bridge_driver.c when the network is being defined, if
      there is no MAC, one is generated. To account for virtual network
      configs that already exist when upgrading from an older version of
      libvirt, I've added a %post script to the specfile that searches for
      all network definitions in both the config directory
      (/etc/libvirt/qemu/networks) and the state directory
      (/var/lib/libvirt/network) that are missing a mac address, generates a
      random address, and adds it to the config (and a matching address to
      the state file, if there is one).
      
      docs/formatnetwork.html.in: document <mac address.../>
      docs/schemas/network.rng: add nac address to schema
      libvirt.spec.in: %post script to update existing networks
      src/conf/network_conf.[ch]: parse and format <mac address.../>
      src/libvirt_private.syms: export a couple private symbols we need
      src/network/bridge_driver.c:
          auto-generate mac address when needed,
          create dummy interface if mac address is present.
      tests/networkxml2xmlin/isolated-network.xml
      tests/networkxml2xmlin/routed-network.xml
      tests/networkxml2xmlout/isolated-network.xml
      tests/networkxml2xmlout/routed-network.xml: add mac address to some tests
      5754dbd5
  6. 17 2月, 2011 2 次提交
    • O
      storage: Allow to delete device mapper disk partition · df1011ca
      Osier Yang 提交于
      The name convention of device mapper disk is different, and 'parted'
      can't be used to delete a device mapper disk partition. e.g.
      
      Name                 Path
      -----------------------------------------
      3600a0b80005ad1d7000093604cae912fp1 /dev/mapper/3600a0b80005ad1d7000093604cae912fp1
      
      Error: Expecting a partition number.
      
      This patch introduces 'dmsetup' to fix it.
      
      Changes:
        - New function "virIsDevMapperDevice" in "src/utils/utils.c"
        - remove "is_dm_device" in "src/storage/parthelper.c", use
          "virIsDevMapperDevice" instead.
        - Requires "device-mapper" for 'with-storage-disk" in "libvirt.spec.in"
        - Check "dmsetup" in 'configure.ac' for "with-storage-disk"
        - Changes on "src/Makefile.am" to link against libdevmapper
        - New entry for "virIsDevMapperDevice" in "src/libvirt_private.syms"
      
      Changes from v1 to v3:
        - s/virIsDeviceMapperDevice/virIsDevMapperDevice/g
        - replace "virRun" with "virCommand"
        - sort the list of util functions in "libvirt_private.syms"
        - ATTRIBUTE_NONNULL(1) for virIsDevMapperDevice declaration.
      
      e.g.
      
      Name                 Path
      -----------------------------------------
      3600a0b80005ad1d7000093604cae912fp1 /dev/mapper/3600a0b80005ad1d7000093604cae912fp1
      
      Vol /dev/mapper/3600a0b80005ad1d7000093604cae912fp1 deleted
      
      Name                 Path
      -----------------------------------------
      df1011ca
    • D
      Release of libvirt-0.8.8 · 43f8773c
      Daniel Veillard 提交于
      * configure.ac docs/news.html.in libvirt.spec.in: bump version and add docs
      * po/*.po*: updated Gujarati, Polish and Dutch localisations and regenerated
      43f8773c
  7. 11 2月, 2011 1 次提交
    • D
      Imprint all logs with version + package build information · cee61fc2
      Daniel P. Berrange 提交于
      The logging functions are enhanced so that immediately prior to
      the first log message being printed to any output channel, the
      libvirt package version will be printed.
      
      eg
      
       $ LIBVIRT_DEBUG=1 virsh
       18:13:28.013: 17536: info : libvirt version: 0.8.7
       18:13:28.013: 17536: debug : virInitialize:361 : register drivers
       ...
      
      The 'configure' script gains two new arguments which can be
      used as
      
         --with-packager="Fedora Project, x86-01.phx2.fedoraproject.org, 01-27-2011-18:00:10"
         --with-packager-version="1.fc14"
      
      to allow distros to append a custom string with package specific
      data.
      
      The RPM specfile is modified so that it appends the RPM version,
      the build host, the build date and the packager name.
      
      eg
      
       $ LIBVIRT_DEBUG=1 virsh
       18:14:52.086: 17551: info : libvirt version: 0.8.7, package: 1.fc13 (Fedora Project, x86-01.phx2.fedoraproject.org, 01-27-2011-18:00:10)
       18:14:52.086: 17551: debug : virInitialize:361 : register drivers
      
      Thus when distro packagers receive bug reports they can clearly
      see what version was in use, even if the bug reporter mistakenly
      or intentionally lies about version/builds
      
      * src/util/logging.c: Output version data prior to first log message
      * libvirt.spec.in: Include RPM release, date, hostname & packager
      * configure.ac: Add --with-packager & --with-packager-version args
      cee61fc2
  8. 19 1月, 2011 1 次提交
  9. 04 1月, 2011 1 次提交
    • D
      Release of libvirt-0.8.7 · 6675e007
      Daniel Veillard 提交于
      * configure.ac libvirt.spec.in docs/news.html.in: bump version and add
        documentation
      * po/*po*: regenerate po and pot files
      6675e007
  10. 24 12月, 2010 3 次提交
    • W
      build: fix building error when building without libvirtd · 3b13d252
      Wen Congyang 提交于
      When I build libvirt without libvirtd, I receive some errors:
      cp: cannot stat `/home/wency/rpmbuild/BUILDROOT/libvirt-0.8.6-1.el6.x86_64/etc/libvirt/qemu/networks/default.xml': No such file or directory
      
      My build step:
      # ./autogen.sh --without-libvirtd
      # make dist
      # rpmbuild --nodeps --define "_sourcedir `pwd`" --define "_without_libvirtd 1" -ba libvirt.spec
      
      The reason is we disable network when we do not build libvirt daemon in configure.ac.
      After fixing this bug, I build libvirt without libvirtd, I receive other errors:
      RPM build errors:
          Installed (but unpackaged) file(s) found:
         /usr/share/doc/libvirt-0.8.6/html/32favicon.png
         /usr/share/doc/libvirt-0.8.6/html/api.html
      ..
      Signed-off-by: NWen Congyang <wency@cn.fujitsu.com>
      3b13d252
    • J
      spec: Enable ESX driver on RHEL · 40dbbd6e
      Jiri Denemark 提交于
      40dbbd6e
    • D
      spec: Automatically turn on cgconfig service · 318a4f6b
      Daniel P. Berrange 提交于
      A number of the libvirt APIs require the use of cgroups. This is not
      enabled by default on a RHEL6 install. After discussion with cgroups
      team, it was decided that upon installation of the libvirt RPM, we
      should automatically turn on the cgroups service. This will activate a
      default configuration that turns on all cgroups controllers libvirt
      requires for full operation.
      318a4f6b
  11. 22 12月, 2010 1 次提交
  12. 10 12月, 2010 1 次提交
  13. 01 12月, 2010 1 次提交
    • D
      Release of libvirt 0.8.6 · a33db6cb
      Daniel Veillard 提交于
      - configure.ac libvirt.spec.in: bump version, add a missing systemtap
        build requirement
      - docs/news.html.in: add informations about the release
      - po/*: updated Polish and Dutch localizations, and regenerated
      - tests/qemuxml2argvtest.c: Fix build problem
      a33db6cb
  14. 12 11月, 2010 1 次提交
  15. 11 11月, 2010 1 次提交
    • E
      rpm: fix /var/lib/libvirt permissions · f970d802
      Eric Blake 提交于
      https://bugzilla.redhat.com/show_bug.cgi?id=649511
      
      Regression of forcing 0700 permissions (which breaks guest startup
      because the qemu user can't see /var/lib/libvirt/*.monitor) was
      introduced in commit 66823690, as part of libvirt 0.8.2.
      
      * libvirt.spec.in (%files): Drop %{_localstatedir}/lib/libvirt,
      since libvirt depends on libvirt-client.
      (%files client): Guarantee 755 permissions on
      %(_localstatedir}/lib/libvirt, since the qemu user must be able to
      do pathname resolution to a subdirectory.
      f970d802
  16. 09 11月, 2010 1 次提交
  17. 29 10月, 2010 1 次提交
    • D
      Release of libvirt-0.8.5 · 4c2b3e1d
      Daniel Veillard 提交于
      * configure.ac libvirt.spec.in: new version
      * docs/news.html.in: update news page and improve format
      * po/*.po*: Update po again
      4c2b3e1d
  18. 22 10月, 2010 1 次提交
    • D
      Add dtrace static probes in libvirtd · 968eb4e5
      Daniel P. Berrange 提交于
      Adds initial support for dtrace static probes in libvirtd
      daemon, assuming use of systemtap dtrace compat shim on
      Linux. The probes are inserted for network client connect,
      disconnect, TLS handshake states and authentication protocol
      states.
      
      This can be tested by running the xample program and then
      attempting to connect with any libvirt client (virsh,
      virt-manager, etc).
      
       # stap examples/systemtap/client.stp
        Client fd=44 connected readonly=0
        Client fd=44 auth polkit deny pid:24997,uid:500
        Client fd=44 disconnected
        Client fd=46 connected readonly=1
        Client fd=46 auth sasl allow test
        Client fd=46 disconnected
      
      The libvirtd.stp file should also really not be required,
      since it is duplicated info that is already available in
      the main probes.d definition file. A script to autogenerate
      the .stp file is needed, either in libvirtd tree, or better
      as part of systemtap itself.
      
      * Makefile.am: Add examples/systemtap subdir
      * autobuild.sh: Disable dtrace for mingw32
      * configure.ac: Add check for dtrace
      * daemon/.gitignore: Ignore generated dtrace probe file
      * daemon/Makefile.am: Build dtrace probe header & object
        files
      * daemon/libvirtd.stp: SystemTAP convenience probeset
      * daemon/libvirtd.c: Add connect/disconnect & TLS probes
      * daemon/remote.c: Add SASL and PolicyKit auth probes
      * daemon/probes.d: Master probe definition
      * daemon/libvirtd.h: Add convenience macro for probes
        so that compilation is a no-op when dtrace is not available
      * examples/systemtap/Makefile.am, examples/systemtap/client.stp
        Example systemtap script using dtrace probe markers
      * libvirt.spec.in: Enable dtrace on F13/RHEL6
      * mingw32-libvirt.spec.in: Force disable dtrace
      968eb4e5
  19. 20 10月, 2010 1 次提交
    • D
      Basic framework for auditing integration · 8f680ad3
      Daniel P. Berrange 提交于
      Integrate with libaudit.so for auditing of important operations.
      libvirtd gains a couple of config entries for auditing. By
      default it will enable auditing, if its enabled on the host.
      It can be configured to force exit if auditing is disabled
      on the host. It will can also send audit messages via libvirt
      internal logging API
      
      Places requiring audit reporting can use the VIR_AUDIT
      macro to report data. This is a no-op unless auditing is
      enabled
      
      * autobuild.sh, mingw32-libvirt.spec.in: Disable audit
        on mingw
      * configure.ac: Add check for libaudit
      * daemon/libvirtd.aug, daemon/libvirtd.conf,
        daemon/test_libvirtd.aug, daemon/libvirtd.c: Add config
        options to enable auditing
      * include/libvirt/virterror.h, src/util/virterror.c: Add
        VIR_FROM_AUDIT source
      * libvirt.spec.in: Enable audit
      * src/util/virtaudit.h, src/util/virtaudit.c: Simple internal
        API for auditing messages
      8f680ad3
  20. 19 10月, 2010 1 次提交
    • D
      qemu: let qemu group look below /var/lib/libvirt/qemu/ · 0df552cd
      Dan Kenigsberg 提交于
      Vdsm needs to communicate with its guest agent via unix domain socket,
      which qemu creates due to the following domain xml device:
      
          <channel type='unix'>
            <target type='virtio' name='com.redhat.rhevm.vdsm'/>
            <source mode='bind' path='/var/lib/libvirt/qemu/channels/fcp-xp-1.com.redhat.rhevm.vdsm'/>
          </channel>
      
      The location of the socket below /var/lib/libvirt/qemu/channels makes
      sense, to humans and selinux policy alike. However, that socket should
      be accessible to vdsm, too.
      
      Due to other (storage) reasons, vdsm is to join the "qemu" group. With
      this patch, vdsm can look below /var/lib/libvirt/qemu and connect to the
      socket.
      
      The socket itself should be chmod'ed to allow qemu group read/write, but
      that's for another project.
      
      BZ#643407
      0df552cd
  21. 15 10月, 2010 1 次提交
  22. 10 9月, 2010 1 次提交
  23. 07 9月, 2010 1 次提交
  24. 25 8月, 2010 1 次提交
  25. 12 8月, 2010 1 次提交
    • 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
  26. 04 8月, 2010 1 次提交
  27. 17 7月, 2010 1 次提交
    • J
      man pages: update authors and copyright notice for libvirtd and virsh · de7d4c6a
      Justin Clift 提交于
      This patch removes the individual author names from the libvirtd and virsh
      man pages, instead referring to the main AUTHORS file distributed with
      libvirt.  This approach is needed, as we can't guarantee unicode support
      across all versions of pod2man used with libvirt.
      
      Additionally, this patch includes the libvirtd man page in the spec file
      used with "make rpm".  Without this patch "make rpm" is broken.
      de7d4c6a
  28. 13 7月, 2010 1 次提交
  29. 05 7月, 2010 1 次提交
  30. 29 5月, 2010 1 次提交
    • J
      Fix libvirt-guests init script · 1a5c465e
      Jiri Denemark 提交于
      Firstly, the init script has to touch its file under /var/lock/subsys
      when started, otherwise the system would think it's not running and
      won't stop it during shutdown.
      
      Secondly, for some reason there is a policy to automatically enable
      init scripts when they are installed, so let the specfile do this. We
      also need to start the init script to ensure it will be stopped during
      the first shutdown after installing the package.
      
      Also $LISTFILE should be enclosed by quotes everywhere as suggested by
      Eric.
      1a5c465e
  31. 27 5月, 2010 2 次提交
  32. 26 5月, 2010 1 次提交
  33. 21 5月, 2010 1 次提交
    • J
      Init script for handling guests on shutdown/boot · 66823690
      Jiri Denemark 提交于
      Example output during shutdown:
      
      Running guests on default URI: console, rhel6-1, rhel5-64
      Running guests on lxc:/// URI: lxc-shell
      Running guests on xen:/// URI: error: no hypervisor driver available for xen:///
      error: failed to connect to the hypervisor
      Running guests on vbox+tcp://orkuz/system URI: no running guests.
      Suspending guests on default URI...
      Suspending console: done
      Suspending rhel6-1: done
      Suspending rhel5-64: done
      Suspending guests on lxc:/// URI...
      Suspending lxc-shell: error: Failed to save domain 9cba8bfb-56f4-6589-2d12-8a58c886dd3b state
      error: this function is not supported by the hypervisor: virDomainManagedSave
      
      Note, the "Suspending $guest: " shows progress during the suspend phase
      if domjobinfo gives meaningful output.
      
      Example output during boot:
      
      Resuming guests on default URI...
      Resuming guest rhel6-1: done
      Resuming guest rhel5-64: done
      Resuming guest console: done
      Resuming guests on lxc:/// URI...
      Resuming guest lxc-shell: already active
      
      Configuration used for generating the examples above:
      URIS='default lxc:/// xen:/// vbox+tcp://orkuz/system'
      
      The script uses /var/lib/libvirt/libvirt-guests files to note all active
      guest it should try to resume on next boot. It's content looks like:
      
      default 7f8b9d93-30e1-f0b9-47a7-cb408482654b 085b4c95-5da2-e8e1-712f-6ea6a4156af2 fb4d8360-5305-df3a-2da1-07d682891b8c
      lxc:/// 9cba8bfb-56f4-6589-2d12-8a58c886dd3b
      66823690
  34. 06 5月, 2010 1 次提交
  35. 04 5月, 2010 1 次提交
    • D
      Various fixes for the spec file · 7efa3937
      Daniel Veillard 提交于
      This includes various things:
       - fix the Requires: libvirt-client to use %{name} to allow easy
         renaming
       - when building ESX support one need libcurl-devel
       - remove Makefile[.in] from xml/nwfilter in the docs, as this breaks
         parallel install ation of i686 and x86_64 packages
       - don't include nwfilter config files if not building with the daemon
      all relatively trivial which is why I packed them together
      * libvirt.spec.in: fix various small bugs
      7efa3937