1. 06 8月, 2012 2 次提交
  2. 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
  3. 03 8月, 2012 10 次提交
    • 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
    • D
      Export virUUIDIsValid to libvirt internal code · 554612c1
      Daniel P. Berrange 提交于
      554612c1
    • D
      7de158cf
    • P
      virsh: console: Avoid using stream after being freed. · e3b8808b
      Peter Krempa 提交于
      The stream object wasn't set to NULL after freeing causing a double free
      attempt on the cleanup path.
      e3b8808b
    • P
      remote: Fill snapshot argument in remoteDomainSnapshotListAllChildren · 2b01761d
      Peter Krempa 提交于
      The remote driver did not fill the required snapshot parent argument in
      the RPC call structure that caused a client crash when trying to use
      this new API.
      2b01761d
    • O
      qemu: Allow to attach/detach controller device persistently · ed1e711b
      Osier Yang 提交于
      * src/conf/domain_conf.c:
        - Add virDomainControllerFind to find controller device by type
          and index.
        - Add virDomainControllerRemove to remove the controller device
          from maintained controler list.
      
      * src/conf/domain_conf.h:
        - Declare the two new helpers.
      
      * src/libvirt_private.syms:
        - Expose private symbols for the two new helpers.
      
      * src/qemu/qemu_driver.c:
        - Support attach/detach controller device persistently
      
      * src/qemu/qemu_hotplug.c:
        - Use the two helpers to simplify the codes.
      ed1e711b
    • H
      Added timestamps to storage volumes · 7383c1d7
      Hendrik Schwartke 提交于
      The access, birth, modification and change times are added to
      storage volumes and corresponding xml representations.  This
      shows up in the XML in this format:
      
      <timestamps>
        <atime>1341933637.027319099</atime>
        <mtime>1341933637.027319099</mtime>
      </timestamps>
      Signed-off-by: NEric Blake <eblake@redhat.com>
      7383c1d7
    • J
      Update xml schemas according to libvirt source · 37a10129
      Ján Tomko 提交于
      capability.rng: Guest features can be in any order.
      nodedev.rng: Added <driver> element, <capability> phys_function and
      virt_functions for PCI devices.
      storagepool.rng: Owner or group ID can be -1.
      
      schema tests: New capabilities and nodedev files; changed owner and
      group to -1 in pool-dir.xml.
      storage_conf: Print uid_t and gid_t as signed to storage pool XML.
      37a10129
    • E
      build: add stubs so mdns code can be unconditionally compiled · 1f6f723c
      Eric Blake 提交于
      The recent changes to the testsuite to validate exported symbols
      flushed out a case of unconditionally exporting symbols that
      were only conditionally compiled under HAVE_AVAHI.
      
      * src/Makefile.am (libvirt_net_rpc_server_la_SOURCES): Compile
      virnetservermdns unconditionally.
      * configure.ac (HAVE_AVAHI): Drop unused automake conditional.
      * src/rpc/virnetservermdns.c: Add fallbacks when Avahi is not
      present.
      1f6f723c
    • M
      virsh: Switch to close callback · 54b63347
      Michal Privoznik 提交于
      Since we've introduced close callbacks we can drop this SIGINT magic
      (which doesn't work now neither) and fully utilize the new feature.
      54b63347
  4. 02 8月, 2012 15 次提交
    • M
      qemu: Fix typo in qemuDomainModifyDeviceFlags · e94c0a09
      Michal Privoznik 提交于
      One of our latest commits fbe87126 introduced this nasty typo:
      func(vmdef, ...); where func() dereference vmdef->ncontrollers,
      and vmdef was initialized to NULL. This leaves us with unconditional
      immediate segfault. It should be vm->def instead.
      e94c0a09
    • J
      daemon: Portable auto-detection of driver module directory · b5c5ad36
      Jiri Denemark 提交于
      When running libvirtd from a build directory on a system with unmodified
      libtool, libvirtd's binary is not renamed as "lt-libvirtd". Check for
      "/daemon/.libs/libvirtd" in addition to "lt-libvirtd".
      b5c5ad36
    • J
      build: Rename security manager library · d3084c2a
      Jiri Denemark 提交于
      Security manager is not a dynamically loadable driver. Let's avoid the
      confusion by renaming libvirt_driver_security library as
      libvirt_security_manager.
      d3084c2a
    • J
      build: Link security manager into libvirt.so · 2f2ca021
      Jiri Denemark 提交于
      Security manager is not a dynamically loadable driver, it's a common
      infrastructure similar to util, conf, cpu, etc. used by individual
      drivers. Such code is allowed to be linked into libvirt.so.
      
      This reverts commit ec5b7bd2 and most of
      aae5cfb6.
      
      This patch is supposed to fix virdrivermoduletest failures for qemu and
      lxc drivers as well as libvirtd's ability to load qemu and lxc drivers.
      2f2ca021
    • D
      Avoid clash of base64 symbols · 7a054e99
      Daniel P. Berrange 提交于
      On Debian/Ubuntu, one of the libraries libvirt (indirectly) links
      with exports a symbol named 'base64_encode'. This takes precedence
      over GNULIB's base64_encode function during linking. Unfortunately
      they of course have different API semantics. To avoid this problem
      use a few #defines in config.h to rename the GNULIB provided
      function to have a 'libvirt_gl_' prefix
      7a054e99
    • E
      build: commit to 0.10.0 release naming · 1d170d3f
      Eric Blake 提交于
      With 0.10.0-rc0 out the door, we are committed to the next version
      number.
      
      * src/libvirt_public.syms (LIBVIRT_0.9.14): Rename...
      (LIBVIRT_0.10.0): ...to this.
      * docs/formatdomain.html.in: Fix fallout.
      * src/openvz/openvz_driver.c (openvzDriver): Likewise.
      * src/remote/remote_driver.c (remote_driver): Likewise.
      1d170d3f
    • D
      Remove unused uuidstr variable from datatypes.c · 03be7ab5
      Daniel P. Berrange 提交于
      Several APIs in src/datatypes.c were formatting an UUID to a
      uuidstr variable and then not using it.
      03be7ab5
    • D
      Rewrite virAtomic APIs using GLib's atomic ops code · 0c9fd4cf
      Daniel P. Berrange 提交于
      There are a few issues with the current virAtomic APIs
      
       - They require use of a virAtomicInt struct instead of a plain
         int type
       - Several of the methods do not implement memory barriers
       - The methods do not implement compiler re-ordering barriers
       - There is no Win32 native impl
      
      The GLib library has a nice LGPLv2+ licensed impl of atomic
      ops that works with GCC, Win32, or pthreads.h that addresses
      all these problems. The main downside to their code is that
      the pthreads impl uses a single global mutex, instead of
      a per-variable mutex. Given that it does have a Win32 impl
      though, we don't expect anyone to seriously use the pthread.h
      impl, so this downside is not significant.
      
      * .gitignore: Ignore test case
      * configure.ac: Check for which atomic ops impl to use
      * src/Makefile.am: Add viratomic.c
      * src/nwfilter/nwfilter_dhcpsnoop.c: Switch to new atomic
        ops APIs and plain int datatype
      * src/util/viratomic.h: inline impls of all atomic ops
        for GCC, Win32 and pthreads
      * src/util/viratomic.c: Global pthreads mutex for atomic
        ops
      * tests/viratomictest.c: Test validate to validate safety
        of atomic ops.
      Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
      0c9fd4cf
    • D
      Remove manual one-shot global initializers · b49890de
      Daniel P. Berrange 提交于
      Remove the use of a manually run virLogStartup and
      virNodeSuspendInitialize methods. Instead make sure they
      are automatically run using VIR_ONCE_GLOBAL_INIT
      Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
      b49890de
    • P
      qemu: Add support for "none" USB controller · fbe87126
      Peter Krempa 提交于
      This patch enables the "none" USB controller for qemu guests and adds
      valdiation on hot-plugged devices if the guest has USB disabled.
      
      This patch also adds a set of tests to check parsing of domain XMLs that
      use the "none" controller and some forbidden situations concerning it.
      fbe87126
    • P
      domain_conf: Add helpers to verify if device configuration is valid · 317badb2
      Peter Krempa 提交于
      This patch adds helpers that validate domain's device configuration.
      This will be needed later on to verify devices being hot-plugged to
      guests. If the guest has no USB bus, then it's not valid to plug a USB
      device to that guest.
      317badb2
    • P
      domain_conf: Add USB controler model "none" · 09251897
      Peter Krempa 提交于
      Libvirt adds a USB controller to the guest even if the user does not
      specify any in the XML. This is due to back-compat reasons.
      
      To allow disabling USB for a guest this patch adds a new USB controller
      type "none" that disables USB support for the guest.
      09251897
    • O
      Fix indentions · 7ee395a8
      Osier Yang 提交于
      Some of the macros use tab, while the left use spaces, this patch
      change it to always use the spaces. And a few aligning fixes.
      7ee395a8
    • G
      storage: netfs and iscsi need option srcSpec for resource discovery · 40570488
      Guannan Ren 提交于
      The option 'srcSpec' to virsh command find-storage-pool-sources
      is optional for logical type of storage pool, but mandatory for
      netfs and iscsi type.
      When missing the option for netfs and iscsi, libvirt reports XML
      parsing error due to null string option srcSpec.
      
      before
      error: Failed to find any netfs pool sources
      error: (storage_source_specification):1: Document is empty
      (null)
      
      after:
      error: pool type 'iscsi' requires option --srcSpec for source discovery
      40570488
    • G
      57fb8d53
  5. 01 8月, 2012 8 次提交
    • M
      gitignore: Reorder alphabetically · 6c0cf395
      Michal Privoznik 提交于
      One of our latest patches added some files to .gitignore. However,
      not in the right place leaving the file not sorted. Since my git
      is set up to sort these files contents, fix this issue as it keeps
      showing up in git status.
      6c0cf395
    • J
      spec: Remove extra () with return statement · 1371cc52
      Jiri Denemark 提交于
      1371cc52
    • J
      build: Link security driver into daemon · ec5b7bd2
      Jiri Denemark 提交于
      Commit aae5cfb6 removed security driver
      from libvirt_la but forgot to link it into libvirtd in case libvirt is
      built without modules.
      ec5b7bd2
    • D
      Fix rpm build failures · 27df13f4
      Daniel Veillard 提交于
      The 'make check' was rebuilding the binaries just overrided,
      so for more safety also override the C program
      Also daemon-conf isn't built anymore so remove it from the list
      27df13f4
    • D
      Add missing parallels_utils.h to Makefile.am · 04cd70bf
      Daniel Veillard 提交于
      Otherwise the file is missing from the dist tarball and distcheck fails
      04cd70bf
    • D
      parallels: implement VM creation · 7024ddfc
      Dmitry Guryanov 提交于
      To create a new VM in Parallels Clud Server we should issue
      "prlctl create" command, and give path to the directory,
      where VM should be created. VM's storage will be in that
      directory later. So in this first version find out location
      of first VM's hard disk and create VM there.
      Signed-off-by: NDmitry Guryanov <dguryanov@parallels.com>
      7024ddfc
    • D
      parallels: add storage driver · aa296e6c
      Dmitry Guryanov 提交于
      Parallels Cloud Server has one serious discrepancy with libvirt:
      libvirt stores domain configuration files in one place, and storage
      files in other places (with the API of storage pools and storage volumes).
      Parallels Cloud Server stores all domain data in a single directory,
      for example, you may have domain with name fedora-15, which will be
      located in '/var/parallels/fedora-15.pvm', and it's hard disk image will be
      in '/var/parallels/fedora-15.pvm/harddisk1.hdd'.
      
      I've decided to create storage driver, which produces pseudo-volumes
      (xml files with volume description), and they will be 'converted' to
      real disk images after attaching to a VM.
      
      So if someone creates VM with one hard disk using virt-manager,
      at first virt-manager creates a new volume, and then defines a
      domain. We can lookup a volume by path in XML domain definition
      and find out location of new domain and size of its hard disk.
      Signed-off-by: NDmitry Guryanov <dguryanov@parallels.com>
      aa296e6c
    • D
      parallels: implement virDomainDefineXML operation for existing domains · e356f610
      Dmitry Guryanov 提交于
      Add parallelsDomainDefineXML function, it works only for existing
      domains for the present.
      
      It's too hard to convert libvirt's XML domain configuration into
      Parallel's one, so I've decided to compare virDomainDef structures:
      current domain definition and the one created from XML, given to
      the function. And change only different parameters.
      
      Currently only name, description, number of cpus, memory amount
      and video memory can be changed.
      
      Video device and console added, because libvirt supposes that
      VM must always have one video device, if there are some
      graphics and one console.
      Signed-off-by: NDmitry Guryanov <dguryanov@parallels.com>
      e356f610