1. 17 6月, 2010 1 次提交
    • E
      phyp: sed cleanups · 02988742
      Eric Blake 提交于
      * src/phyp/phyp_driver.c (phypNumDomainsGeneric): Avoid glob
      collision by quoting sed argument.
      (phypDomainSetCPU): Avoid non-portable \+ in sed.
      (phypGetVIOSPartitionID, phypDiskType, phypListDomainsGeneric)
      (phypListDefinedDomains): Micro-optimize anchored substitutions.
      02988742
  2. 16 6月, 2010 1 次提交
  3. 15 6月, 2010 8 次提交
    • E
      virsh: add start --paused support · cbe6ebdb
      Eric Blake 提交于
      Make 'start --paused' mirror 'create --paused'.
      
      * tools/virsh.c (cmdStart): Use new virDomainCreateWithFlags API
      when needed.
      * tools/virsh.pod (start): Document --paused.
      cbe6ebdb
    • E
      qemu: support starting persistent domain paused · d024d2ba
      Eric Blake 提交于
      Match earlier change for qemu pause support with virDomainCreateXML.
      
      * src/qemu/qemu_driver.c (qemudDomainObjStart): Add parameter; all
      callers changed.
      (qemudDomainStartWithFlags): Implement flag support.
      d024d2ba
    • E
      drivers: add virDomainCreateWithFlags if virDomainCreate exists · de3aadaa
      Eric Blake 提交于
      * src/esx/esx_driver.c (esxDomainCreate): Move guts...
      (esxDomainCreateWithFlags): ...to new function.
      (esxDriver): Trivially support the new API.
      * src/lxc/lxc_driver.c (lxcDomainStart, lxcDomainStartWithFlags)
      (lxcDriver): Likewise.
      * src/opennebula/one_driver.c (oneDomainStart)
      (oneDomainStartWithFlags, oneDriver): Likewise.
      * src/openvz/openvz_driver.c (openvzDomainCreate)
      (openvzDomainCreateWithFlags, openvzDriver): Likewise.
      * src/qemu/qemu_driver.c (qemudDomainStart)
      (qemudDomainStartWithFlags, qemuDriver): Likewise.
      * src/test/test_driver.c (testDomainCreate)
      (testDomainCreateWithFlags, testDriver): Likewise.
      * src/uml/uml_driver.c (umlDomainStart, umlDomainStartWithFlags)
      (umlDriver): Likewise.
      * src/vbox/vbox_tmpl.c (vboxDomainCreate)
      (vboxDomainCreateWithFlags, Driver): Likewise.
      * src/xen/xen_driver.c (xenUnifiedDomainCreate)
      (xenUnifiedDomainCreateWithFlags, xenUnifiedDriver): Likewise.
      * src/xenapi/xenapi_driver.c (xenapiDomainCreate)
      (xenapiDomainCreateWithFlags, xenapiDriver): Likewise.
      de3aadaa
    • E
      remote: protocol implementation for virDomainCreateWithFlags · 6c83e7ca
      Eric Blake 提交于
      Define the wire format for the new virDomainCreateWithFlags
      API, and implement client and server side of marshaling code.
      
      * daemon/remote.c (remoteDispatchDomainCreateWithFlags): Add
      server side dispatch for virDomainCreateWithFlags.
      * src/remote/remote_driver.c (remoteDomainCreateWithFlags)
      (remote_driver): Client side serialization.
      * src/remote/remote_protocol.x
      (remote_domain_create_with_flags_args)
      (remote_domain_create_with_flags_ret)
      (REMOTE_PROC_DOMAIN_CREATE_WITH_FLAGS): Define wire format.
      * daemon/remote_dispatch_args.h: Regenerate.
      * daemon/remote_dispatch_prototypes.h: Likewise.
      * daemon/remote_dispatch_table.h: Likewise.
      * src/remote/remote_protocol.c: Likewise.
      * src/remote/remote_protocol.h: Likewise.
      * src/remote_protocol-structs: Likewise.
      6c83e7ca
    • E
      libvirt: introduce domainCreateWithFlags API · 460ca88b
      Eric Blake 提交于
      Persistent domain creation needs the same features as transient
      domains, but virDomainCreate lacks the flags argument present in
      virDomainCreateXML.  virDomainCreateFlags is already claimed as
      a public enum, so we have to break convention and expose
      virDomainCreateWithFlags.
      
      * include/libvirt/libvirt.h.in (virDomainCreateWithFlags): Add.
      * src/driver.h (virDrvDomainCreateWithFlags): Internal API.
      * src/libvirt.c (virDomainCreateWithFlags): Glue public API to
      driver API.
      * src/libvirt_public.syms (LIBVIRT_0.8.2): Expose public API.
      * src/esx/esx_driver.c (esxDriver): Add stub for driver.
      * src/lxc/lxc_driver.c (lxcDriver): Likewise.
      * src/opennebula/one_driver.c (oneDriver): Likewise.
      * src/openvz/openvz_driver.c (openvzDriver): Likewise.
      * src/phyp/phyp_driver.c (phypDriver): Likewise.
      * src/qemu/qemu_driver.c (qemuDriver): Likewise.
      * src/remote/remote_driver.c (remote_driver): Likewise.
      * src/test/test_driver.c (testDriver): Likewise.
      * src/uml/uml_driver.c (umlDriver): Likewise.
      * src/vbox/vbox_tmpl.c (Driver): Likewise.
      * src/xen/xen_driver.c (xenUnifiedDriver): Likewise.
      * src/xenapi/xenapi_driver.c (xenapiDriver): Likewise.
      460ca88b
    • E
      maint: simplify some ignore files · fb8552f8
      Eric Blake 提交于
      * .hgignore: Delete, no longer used.
      * examples/python/.gitignore: Delete, covered globally.
      * include/.gitignore: Likewise.
      * python/tests/.gitignore: Likewise.
      * docs/schemas/.gitignore: Likewise.
      * tests/xml2sexprdata/.gitignore: Likewise.
      * tests/sexpr2xmldata/.gitignore: Likewise.
      * tests/confdata/.gitignore: Likewise.
      * tests/xencapsdata/.gitignore: Likewise.
      * tests/xmconfigdata/.gitignore: Likewise.
      * tests/xml2sexprdata/.gitignore: Likewise.
      fb8552f8
    • E
      parthelper: fix compilation without optimization · 352b6df3
      Eric Blake 提交于
      Daniel's patch works with gcc and CFLAGS containing -O (the
      autoconf default), but fails with non-gcc or with other
      CFLAGS (such as -g), since c-ctype.h declares c_isdigit as
      a macro only for certain compilation settings.
      
      * src/Makefile.am (libvirt_parthelper_LDFLAGS): Add gnulib
      library, for when c_isdigit is not a macro.
      * src/storage/parthelper.c (main): Avoid out-of-bounds
      dereference, noticed by Jim Meyering.
      352b6df3
    • D
      Fix enumeration of partitions in disks with a trailing digit in path · bc8d9f20
      Daniel P. Berrange 提交于
      Disks with a trailing digit in their path (eg /dev/loop0 or
      /dev/dm0) have an extra 'p' appended before the partition
      number (eg, to form /dev/loop0p1 not /dev/loop01). Fix the
      partition lookup to append this extra 'p' when required
      
      * src/storage/parthelper.c: Add a 'p' before partition
        number if required
      bc8d9f20
  4. 12 6月, 2010 2 次提交
    • E
      uml: sanity check external data before using it · 582c75ec
      Eric Blake 提交于
      Otherwise, a malicious packet could cause a DoS via spurious
      out-of-memory failure.
      
      * src/uml/uml_driver.c (umlMonitorCommand): Validate that incoming
      data is reliable before using it to allocate/dereference memory.
      Don't report bogus errno on short read.
      Reported by Jim Meyering.
      582c75ec
    • M
      Improve error message for disabled client-side drivers · d0dabc2b
      Matthias Bolte 提交于
      Report that libvirt was built without that driver instead of
      trying to connect to a libvirtd, when we know that this is
      going to fail.
      d0dabc2b
  5. 11 6月, 2010 3 次提交
  6. 10 6月, 2010 2 次提交
    • E
      build: fix some mingw issues · 3cf642a0
      Eric Blake 提交于
      On Fedora 13 with sufficient mingw32-* packages installed, running
      ./autobuild.sh failed to cross-compile to mingw because
      mingw32-pthreads installed a broken <pthread.h>.  With that
      issue fixed, the build still failed due to use of O_SYNC.
      Meanwhile, recent .spec.in changes got out of sync.
      
      * bootstrap.conf (gnulib_modules): Add fcntl-h, for O_SYNC.
      * .gnulib: Update to latest, to work around buggy pthreads-win32
      library.
      * bootstrap: Import latest from gnulib.
      * mingw32-libvirt.spec.in: Distribute new file.
      3cf642a0
    • E
      build: avoid pthreads-win32 on mingw · 6e5a04f0
      Eric Blake 提交于
      * src/util/threads.c (includes) [WIN32]: On mingw, favor native
      threading over pthreads-win32 library.
      * src/util/thread.h [WIN32] Likewise.
      Suggested by Daniel P. Berrange.
      6e5a04f0
  7. 09 6月, 2010 13 次提交
    • D
      Fix cgroup setup code to cope with root squashing NFS · c37c321c
      Daniel P. Berrange 提交于
      When a disk is on a root squashed NFS server, it may not be
      possible to stat() the disk file in virCgroupAllowDevice.
      The virStorageFileGetMeta method may also fail to extract
      the parent backing store. Both of these errors have to be
      ignored to avoid breaking NFS deployments
      
      * src/qemu/qemu_driver.c: Ignore errors in cgroup setup to
         keep root squash NFS happy
      c37c321c
    • J
    • J
      virsh: remove xen reference in header comment · 74231267
      Justin Clift 提交于
      With libvirt and virsh now being used for much more than Xen, this
      patch removes the outdated reference to Xen in the file header.
      74231267
    • M
      esx: Add proxy query parameter · 46c14d20
      Matthias Bolte 提交于
      Allow to specify a proxy to be used by libcurl.
      46c14d20
    • M
      esx: Refactor esxUtil_ParseQuery's parameter handling · 070f6100
      Matthias Bolte 提交于
      Pass a struct containing the parameters instead of passing each
      one individually. This make future extensions a bit simpler.
      070f6100
    • J
      virsh: add the volume commands to the virsh man page · cd2b1896
      Justin Clift 提交于
      This patch also includes the new vol-pool command.
      cd2b1896
    • J
      virsh: add new vol-pool command · 62f8674d
      Justin Clift 提交于
      This patch adds a new "vol-pool" command to virsh, to round out the
      identifier conversion functions for volumes in virsh.  Now it is
      possible to work with volumes when starting from just a volume key
      or volume path.
      62f8674d
    • E
      virsh: add --paused option to create · 734bbf0e
      Eric Blake 提交于
      * tools/virsh.c (opts_create): Add --paused option.
      (cmdCreate): Pass appropriate flag.
      * tools/virsh.pod: Document it.
      734bbf0e
    • E
      qemu: allow creation of a paused domain · 68e4793a
      Eric Blake 提交于
      https://bugzilla.redhat.com/show_bug.cgi?id=589465
      
      Some guests (eg with badly configured grub, or Windows' installation cd)
      require quick response from the console user. That's why we have a
      "launchPaused" option in vdsm.
      
      To implement it via libvirt, we need to ask libvirt not to call
      qemuMonitorStartCPUs() after starting qemu.  Calling virDomainStop
      immediately after the domain is up is inherently raceful.
      
      * src/qemu/qemu_driver.c (qemudStartVMDaemon): Add new parameter;
      all callers adjusted.
      (qemudDomainCreate): Implement support for new flag.
      68e4793a
    • E
      virDomainCreateXML: support new flag · 2502ebb3
      Eric Blake 提交于
      * include/libvirt/libvirt.h.in (virDomainCreateFlags): Add
      VIR_DOMAIN_START_PAUSED.
      * src/libvirt.c (virDomainCreateXML): Update documentation.
      * src/lxc/lxc_driver.c (lxcDomainCreateAndStart): Reject new flag
      as unimplemented.
      * src/opennebula/one_driver.c (oneDomainCreateAndStart):
      Likewise.
      * src/openvz/openvz_driver.c (openvzDomainCreateXML): Likewise.
      * src/phyp/phyp_driver.c (phypDomainCreateAndStart): Likewise.
      * src/qemu/qemu_driver.c (qemudDomainCreate): Likewise.
      * src/test/test_driver.c (testDomainCreateXML): Likewise.
      * src/uml/uml_driver.c (umlDomainCreate): Likewise.
      * src/vbox/vbox_tmpl.c (vboxDomainCreateXML): Likewise.
      * src/xen/xend_internal.c (xenDaemonCreateXML): Likewise.
      * src/xenapi/xenapi_driver.c (xenapiDomainCreateXML): Likewise.
      2502ebb3
    • D
      Fix leaks in udev device add/remove v3 · e7f3bad4
      David Allan 提交于
      * This patch is a modification of a patch submitted by Nigel Jones.
        It fixes several memory leaks on device addition/removal:
      
      1. Free the virNodeDeviceDefPtr in udevAddOneDevice if the return
         value is non-zero
      
      2. Always release the node device reference after the device has been
         processed.
      
      * Refactored for better readability per the suggestion of clalance
      e7f3bad4
    • D
      Add multiIQN tests · 77da2487
      David Allan 提交于
      * Fix broken rng schema
      * Add test input & output files
      77da2487
    • D
      Add multiiqn XML dump · 98fafb0c
      David Allan 提交于
      * Use virBufferEscapeString() per Dan B.
      98fafb0c
  8. 08 6月, 2010 10 次提交
    • D
      Fix test breakage from virtio serial changes · 9cb08020
      Daniel P. Berrange 提交于
      The virtio serial changes broke the test suite because they forgot
      to add the new address attribute to the domain XML schema. The
      xml2xml test also broke because the XML no longer roundtrips. This
      is due to testing of auto-addition of <controller> elements. Split
      that test case off into a separate XML file to avoid breakage
      
      * docs/schemas/domain.rng: Allow port number for virtio serial addresses
      * tests/qemuxml2argvdata/qemuxml2argv-channel-virtio.args,
        tests/qemuxml2argvdata/qemuxml2argv-channel-virtio.xml: Revert to
        a simple config to avoid breaking xml2xml test
      * tests/qemuxml2argvdata/qemuxml2argv-channel-virtio-auto.xml,
        tests/qemuxml2argvdata/qemuxml2argv-channel-virtio-auto.args: Add
        complex test case for auto-controller addition for xml2argv test
      * tests/qemuxml2argvtest.c: Add channel-virtio-auto test
      9cb08020
    • D
      Enable probing of VPC disk format type · f4365c73
      Daniel P. Berrange 提交于
      A look at the QEMU source revealed the missing bits of info about
      the VPC file format, so we can enable this now
      
      * src/util/storage_file.c: Enable VPC format, providing version
        and disk size offset fields
      f4365c73
    • D
      Ensure that PCI device is reattached to host if hotadd fails · 1c72695c
      Daniel P. Berrange 提交于
      When an attempt to hotplug a PCI device to a guest fails,
      the device was left attached to pci-stub. It is neccessary
      to reset the device and then attach it to the host driver
      again.
      
      * src/qemu/qemu_driver.c: Reattach PCI device to host if
        hotadd fails
      1c72695c
    • D
      Don't raise errors in the selinux restore code · f43dc26a
      Daniel P. Berrange 提交于
      The restore code is done in places where errors cannot be
      raised, since they will overwrite over pre-existing errors.
      
      * src/security/security_selinux.c: Only warn about failures
        in label restore, don't report errors
      f43dc26a
    • D
      Fix check for errors in device_add command in QEMU text monitor · c833efd3
      Daniel P. Berrange 提交于
      Any output at all from device_add indicates an error in the
      command execution. Thus it needs to check for reply != ""
      
      * src/qemu/qemu_monitor_text.c: Fix reply check for errors
        to treat any output as an error
      c833efd3
    • D
      Prefer UDEV to HAL drivers if both a compiled · 345ff369
      Daniel P. Berrange 提交于
      HAL is deprecated and UDEV is the future. Thus if both
      options are compiled, we should prefer use of UDEV over
      HAL
      
      * src/node_device/node_device_driver.c: Switch init
        order to try UDEV first, then HAL
      345ff369
    • D
      Add support for setting socket MLS level in SELinux driver · e72cc3c1
      Daniel J Walsh 提交于
      When SELinux is running in MLS mode, libvirtd will have a
      different security level to the VMs. For libvirtd to be
      able to connect to the monitor console, the client end of
      the UNIX domain socket needs a different label. This adds
      infrastructure to set the socket label via the security
      driver framework
      
      * src/qemu/qemu_driver.c: Call out to socket label APIs in
        security driver
      * src/qemu/qemu_security_stacked.c: Wire up socket label
        drivers
      * src/security/security_driver.h: Define security driver
        entry points for socket labelling
      * src/security/security_selinux.c: Set socket label based on
        VM label
      e72cc3c1
    • D
      Network duplicate UUID/name checking · 3bb37439
      Daniel P. Berrange 提交于
      The network driver is not doing correct checking for
      duplicate UUID/name values. This introduces a new method
      virNetworkObjIsDuplicate, based on the previously
      written virDomainObjIsDuplicate.
      
      * src/conf/network_conf.c, src/conf/network_conf.c,
        src/libvirt_private.syms: Add virNetworkObjIsDuplicate,
      * src/network/bridge_driver.c: Call virNetworkObjIsDuplicate
        for checking uniqueness of uuid/names
      3bb37439
    • D
      Fix error codes for missing storage pools · 627409d1
      Daniel P. Berrange 提交于
      The storage pool driver is mistakenly using the error code
      VIR_ERR_INVALID_STORAGE_POOL which is for diagnosing invalid
      pointers. This patch switches it to use VIR_ERR_NO_STORAGE_POOL
      which is the correct code for cases where the storage pool does
      not exist
      
      * src/storage/storage_driver.c: Replace VIR_ERR_INVALID_STORAGE_POOL
        with VIR_ERR_NO_STORAGE_POOL
      627409d1
    • D
      Storage pool duplicate UUID/name checking · e9364d9f
      Daniel P. Berrange 提交于
      The storage pool driver is not doing correct checking for
      duplicate UUID/name values. This introduces a new method
      virStoragePoolObjIsDuplicate, based on the previously
      written virDomainObjIsDuplicate.
      
      * src/conf/storage_conf.c, src/conf/storage_conf.c,
        src/libvirt_private.syms: Add virStoragePoolObjIsDuplicate,
      * src/storage/storage_driver.c: Call virStoragePoolObjIsDuplicate
        for checking uniqueness of uuid/names
      e9364d9f