1. 12 11月, 2010 7 次提交
    • D
      Introduce portability APIs for creating threads · 64d67507
      Daniel P. Berrange 提交于
      The util/threads.c/h code already has APIs for mutexes,
      condition variables and thread locals. This commit adds
      in code for actually creating threads.
      
      * src/libvirt_private.syms: Export new symbols
      * src/util/threads.h: Define APIs virThreadCreate, virThreadSelf,
        virThreadIsSelf and virThreadJoin
      * src/util/threads-win32.c, src/util/threads-win32.h: Win32
        impl of threads
      * src/util/threads-pthread.c, src/util/threads-pthread.h: POSIX
        impl of threads
      64d67507
    • D
      Support virDomainOpenConsole with QEMU · bdb28f44
      Daniel P. Berrange 提交于
      This provides an implementation of the virDomainOpenConsole
      API with the QEMU driver. For the streams code, this reuses
      most of the code previously added for the tunnelled migration
      streams since it is generic.
      
      * src/qemu/qemu_driver.c: Support virDomainOpenConsole
      bdb28f44
    • D
      Add a generic internal API for handling any FD based stream · 7c08fcc4
      Daniel P. Berrange 提交于
      To avoid the need for duplicating implementations of virStream
      drivers, provide a generic implementation that can handle any
      FD based stream. This code is copied from the existing impl
      in the QEMU driver, with the locking moved into the stream
      impl, and addition of a read callback
      
      The FD stream code will refuse to operate on regular files or
      block devices, since those can't report EAGAIN properly when
      they would block on I/O
      
      * include/libvirt/virterror.h, include/libvirt/virterror.h: Add
        VIR_FROM_STREAM error domain
      * src/qemu/qemu_driver.c: Remove code obsoleted by the new
        generic streams driver.
      * src/fdstream.h, src/fdstream.c, src/fdstream.c,
        src/libvirt_private.syms: Generic reusable FD based streams
      7c08fcc4
    • D
      Lower logging level in remote driver streams · 4ef40df1
      Daniel P. Berrange 提交于
      Now that bi-directional, non-blocking streams are supported
      in the remote driver, some of the VIR_WARN statements need
      to be reduced to VIR_DEBUG.
      
      * src/remote/remote_driver.c: Lower logging level
      4ef40df1
    • D
      Remote driver client and server for virDomainOpenConsole · 73d8b03c
      Daniel P. Berrange 提交于
      This provides an implementation of the virDomainOpenConsole
      API for the remote driver client and server.
      
      * daemon/remote.c: Server side impl
      * src/remote/remote_driver.c: Client impl
      * src/remote/remote_protocol.x: Wire definition
      73d8b03c
    • D
      Introduce a virDomainOpenConsole API · 88a9b382
      Daniel P. Berrange 提交于
      To enable virsh console (or equivalent) to be used remotely
      it is necessary to provide remote access to the /dev/pts/XXX
      pseudo-TTY associated with the console/serial/parallel device
      in the guest. The virStream API provide a bi-directional I/O
      stream capability that can be used for this purpose. This
      patch thus introduces a virDomainOpenConsole API that uses
      the stream APIs.
      
      * src/libvirt.c, src/libvirt_public.syms,
        include/libvirt/libvirt.h.in, src/driver.h: Define the
        new virDomainOpenConsole API
      * src/esx/esx_driver.c, src/lxc/lxc_driver.c,
        src/opennebula/one_driver.c, src/openvz/openvz_driver.c,
        src/phyp/phyp_driver.c, src/qemu/qemu_driver.c,
        src/remote/remote_driver.c, src/test/test_driver.c,
        src/uml/uml_driver.c, src/vbox/vbox_tmpl.c,
        src/xen/xen_driver.c, src/xenapi/xenapi_driver.c: Stub
        API entry point
      88a9b382
    • D
      Support callbacks on virStream APIs in remote driver client · 51269265
      Daniel P. Berrange 提交于
      The current remote driver code for streams only supports
      blocking I/O mode. This is fine for the usage with migration
      but is a problem for more general use cases, in particular
      bi-directional streams.
      
      This adds supported for the stream callbacks and non-blocking
      I/O. with the minor caveat is that it doesn't actually do
      non-blocking I/O for sending stream data, only receiving it.
      A future patch will try to do non-blocking sends, but this is
      quite tricky to get right.
      
      * src/remote/remote_driver.c: Allow non-blocking I/O for
        streams and support callbacks
      51269265
  2. 11 11月, 2010 4 次提交
    • D
      Fix LXC container console device setup · 2fbec002
      Daniel P. Berrange 提交于
      The /dev/console device inside the container must NOT map
      to the real /dev/console device node, since this allows the
      container control over the current host console. A fun side
      effect of this is that starting a container containing a
      real Fedora OS will kill off your X server.
      
      Remove the /dev/console node, and replace it with a symlink
      to the primary console TTY
      
      * src/lxc/lxc_container.c: Replace /dev/console with a
        symlink to /dev/pty/0
      * src/lxc/lxc_controller.c: Remove /dev/console from cgroups
        ACL
      2fbec002
    • E
      virsh: supply long option for -V · 51c83a2b
      Eric Blake 提交于
      * tools/virsh.c (vshParseArgv): Use NULL instead of 0 for pointer,
      and symbolic names for has_arg.  Give --version an optional arg.
      (vshUsage): Document this.
      * tools/virsh.pod: Likewise.
      51c83a2b
    • C
      qemu: Add flag to force a CDROM eject · 96d52fcf
      Cole Robinson 提交于
      QEMU allows forcing a CDROM eject even if the guest has locked the device.
      Expose this via a new UpdateDevice flag, VIR_DOMAIN_DEVICE_MODIFY_FORCE.
      
      This has been requested for RHEV:
      
      https://bugzilla.redhat.com/show_bug.cgi?id=626305
      
      v2: Change flag name, bool cleanups
      96d52fcf
    • 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
  3. 10 11月, 2010 7 次提交
    • D
      Augment bug reporting documentation · dc844b90
      Daniel Veillard 提交于
      With some instruction on how to attach useful gdb backtraces
      dc844b90
    • A
      Allow non-file disk backingStores · 9c7c4a4f
      Adam Litke 提交于
      I am trying to use a qcow image with libvirt where the backing 'file' is a
      qemu-nbd server.  Unfortunately virDomainDiskDefForeachPath() assumes that
      backingStore is always a real file so something like 'nbd:0:3333' is rejected
      because a file with that name cannot be accessed.  Note that I am not worried
      about directly using nbd images.  That would require a new disk type with XML
      markup, etc.  I only want it to be permitted as a backingStore
      
      The following patch implements danpb's suggestion:
      > I think I'm inclined to push the logic for skipping NBD one stage higher.
      > I'd rather expect virStorageFileGetMetadata() to return all backing
      > stores, even if not files. The virDomainDiskDefForeachPath() method
      > should definitely ignore non-file backing stores though.
      >
      > So what I'm thinking is to extend the virStorageFileMetadata struct and
      > just add a 'bool isFile' field to it. Default this field to true, unless
      > you see the prefix of nbd: in which case set it to false. The
      > virDomainDiskDefForeachPath() method can then skip over any backing
      > store with isFile == false
      Signed-off-by: NAdam Litke <agl@us.ibm.com>
      Cc: Daniel P. Berrange <berrange@redhat.com>
      9c7c4a4f
    • M
      xencapstest: Don't fail when Xen is installed · c2e9e907
      Matthias Bolte 提交于
      xencapstest calls xenHypervisorMakeCapabilitiesInternal with conn == NULL
      which calls xenDaemonNodeGetTopology with conn == NULL when a recent
      enough Xen was detected (sys_interface_version >= SYS_IFACE_MIN_VERS_NUMA).
      But xenDaemonNodeGetTopology insists in having conn != NULL and fails,
      because it expects to be able to talk to an actual xend.
      
      We cannot do that in a 'make check' test. Therefore, only call the xend
      subdriver function when conn isn't NULL.
      
      Reported by Andy Howell and Jim Fehlig.
      c2e9e907
    • L
      virsh: fix non-literal string format · ff4a31d9
      Laine Stump 提交于
      These are in the newly added -V output.
      ff4a31d9
    • S
      bye to close(), welcome to VIR_(FORCE_)CLOSE() · 60ae1c34
      Stefan Berger 提交于
      Using automated replacement with sed and editing I have now replaced all
      occurrences of close() with VIR_(FORCE_)CLOSE() except for one, of
      course. Some replacements were straight forward, others I needed to pay
      attention. I hope I payed attention in all the right places... Please
      have a look. This should have at least solved one more double-close
      error.
      60ae1c34
    • M
      Fix syntax-check error in domain.rng · 4362552d
      Matthias Bolte 提交于
      Replace tab with spaces.
      4362552d
    • M
      esx: Add support for memtune/min_guarantee · 809926db
      Matthias Bolte 提交于
      Also add a test case for the VMX handling of it.
      809926db
  4. 09 11月, 2010 18 次提交
    • J
      schema: Move timer element inside clock · 38eec464
      Jiri Denemark 提交于
      Both conf/domain_conf.c and domain XML documentation have <timer>
      elements inside /domain/clock. Change domain.rng schema to be consistent
      with them.
      38eec464
    • D
      Misc test case fixes for SPICE · ff2bb29c
      Daniel P. Berrange 提交于
      * docs/schemas/domain.rng: Fix merge error which left SPICE channel
        elements under VNC schema.
      * tests/qemuhelptest.c: Add SPICE flag to kvm-83 test
      * tests/qemuxml2argvdata/qemuxml2argv-graphics-spice.xml: Add
        <memballoon> element
      ff2bb29c
    • J
      virsh: Add .xml suffix to tmp files used in *edit commands · fb76151c
      Jiri Denemark 提交于
      This helps editors with detecting the temporary files as XML since the
      temporary files do not contain <?xml ...?> declaration.
      
      Requested by https://bugzilla.redhat.com/show_bug.cgi?id=602277
      fb76151c
    • D
      Support SPICE channel security options · b0ef5c53
      Daniel P. Berrange 提交于
      This extends the SPICE XML to allow channel security options
      
          <graphics type='spice' port='-1' tlsPort='-1' autoport='yes'>
            <channel name='main' mode='secure'/>
            <channel name='record' mode='insecure'/>
          </graphics>
      
      Any non-specified channel uses the default, which allows both
      secure & insecure usage
      
      * src/conf/domain_conf.c, src/conf/domain_conf.h,
        src/libvirt_private.syms: Add XML syntax for specifying per
        channel security options for spice.
      * src/qemu/qemu_conf.c: Configure channel security with spice
      b0ef5c53
    • D
      Support multiple QXL video cards · 6794a44b
      Daniel P. Berrange 提交于
      QEMU crashes & burns if you try multiple Cirrus video cards, but
      QXL copes fine. Adapt QEMU config code to allow multiple QXL
      video cards
      
      * src/qemu/qemu_conf.c: Support multiple QXL video cards
      6794a44b
    • D
      Define XML syntax for password expiry · 7a696678
      Daniel P. Berrange 提交于
      This extends the XML syntax for <graphics> to allow a password
      expiry time to be set
      
      eg
      
        <graphics type='vnc' port='5900' autoport='yes' keymap='en-us' passwd='12345' passwdValidTo='2010-04-09T15:51:00'/>
      
      The timestamp is in UTC.
      
      * src/conf/domain_conf.h: Pull passwd out into separate struct
        virDomainGraphicsAuthDef to allow sharing between VNC & SPICE
      * src/conf/domain_conf.c: Add parsing/formatting of new passwdValidTo
        argument
      * src/opennebula/one_conf.c, src/qemu/qemu_conf.c, src/qemu/qemu_driver.c,
        src/xen/xend_internal.c, src/xen/xm_internal.c: Update for changed
        struct containing VNC password
      7a696678
    • D
      Add SPICE support for QEMU driver configuration file · b5c99209
      Daniel P. Berrange 提交于
      In common with VNC, the QEMU driver configuration file is used
      specify the host level TLS certificate location and a default
      password / listen address
      
      * src/qemu/qemu.conf: Add spice_listen, spice_tls,
        spice_tls_x509_cert_dir & spice_password config params
      * src/qemu/qemu_conf.c, src/qemu/qemu_conf.h: Parsing of
        spice config parameters and updating -spice arg generation
        to use them
      * tests/qemuxml2argvdata/qemuxml2argv-graphics-spice-rhel6.args,
        tests/qemuxml2argvtest.c: Expand test case to cover driver
        level configuration
      b5c99209
    • D
      Support automatic port number allocation for SPICE · ed0d9f6c
      Daniel P. Berrange 提交于
      * src/qemu/qemu_driver.c: Allocate the TCP ports for SPICE
        before starting guest
      ed0d9f6c
    • D
      Implement QEMU/KVM support for SPICE graphics · 9b57fa65
      Daniel P. Berrange 提交于
      This supports the -spice argument posted for review against
      the latest upstream QEMU/KVM. This supports the bare minimum
      config with port, TLS port & listen address. The x509 bits are
      added in a later patch.
      
      * src/qemu_conf.c, src/qemu_conf.h: Add SPICE flag. Check for
        -spice availability. Format -spice arg for command line
      * qemuhelptest.c: Add SPICE flag
      * qemuxml2argvdata/qemuxml2argv-graphics-spice.args: Add <graphics>
        for spice
      * qemuxml2argvdata/qemuxml2argv-graphics-spice.xml: Add -spice arg
      * qemuxml2argvtest.c: Add SPICE flag
      9b57fa65
    • D
      Implement QEMU/KVM QXL video card support in QEMU driver · 635f9ca1
      Daniel P. Berrange 提交于
      This supports the '-vga qxl' parameter in upstream QEMU/KVM
      which has SPICE support added. This isn't particularly useful
      until you get the next patch for -spice support. Also note that
      while the libvirt XML supports multiple video devices, this
      patch only supports a single one. A later patch can add support
      for 2nd, 3rd, etc PCI devices for QXL
      
      * src/qemu/qemu_conf.h: Flag for QXL support
      * src/qemu/qemu_conf.c: Probe for '-vga qxl' support and implement it
      * tests/qemuxml2argvtest.c, tests/qemuxml2xmltest.c,
        tests/qemuxml2argvdata/qemuxml2argv-graphics-spice.args,
        tests/qemuxml2argvdata/qemuxml2argv-graphics-spice.xml: Test
        case for generating spice args with RHEL6 kvm
      635f9ca1
    • D
      Add a <graphics> type for SPICE protocol · c909091b
      Daniel P. Berrange 提交于
      This adds an element
      
       <graphics type='spice' port='5903' tlsPort='5904' autoport='yes' listen='127.0.0.1'/>
      
      This is the bare minimum that should be exposed in the guest
      config for SPICE. Other parameters are better handled as per
      host level configuration tunables
      
      * docs/schemas/domain.rng: Define the SPICE <graphics> schema
      * src/domain_conf.h, src/domain_conf.c: Add parsing and formatting
        for SPICE graphics config
      * src/qemu_conf.c: Complain about unsupported graphics types
      c909091b
    • D
      Add a QXL graphics card type to domain XML schema · 3cf5b6f7
      Daniel P. Berrange 提交于
      * src/qemu_conf.c: Add dummy entry in enumeration
      * docs/schemas/domain.rng: Add 'qxl' as a type for the <video> tag
      * src/domain_conf.c, src/domain_conf.h: Add QXL to video type
        enumerations
      3cf5b6f7
    • D
      Show compiled in options in virsh -V · 5879c15d
      Daniel Veillard 提交于
        To ease debugging this trivial patch allows to find what was compiled
      in in the local version of libvirt, this doesn't work for remote access
      but that's probably sufficient. With the patch I get on my machine:
      
      paphio:~/libvirt/tools -> ./virsh -V
      Virsh command line tool of libvirt 0.8.4
      See web site at http://libvirt.org/
      
      Compiled with support for:
       Hypervisors: Xen QEmu/KVM UML OpenVZ LXC ESX PHYP Test
       Networking: Remote Daemon Network Bridging Netcf Nwfilter
       Storage: Dir Disk Filesystem SCSI Multipath iSCSI LVM
       Miscellaneous: SELinux Secrets Debug Readline
      paphio:~/libvirt/tools ->
      
      * tools/virsh.c: add -V option
      * tools/virsh.pod: document the extension
      5879c15d
    • J
      maint: Commit .gitignore sorting done by bootstrap · c60c450b
      Jiri Denemark 提交于
      c60c450b
    • J
      qemu: Fix non-literal format string · 0011e917
      Jiri Denemark 提交于
      0011e917
    • M
      xen-proxy: Remove it entirely and use libvirtd instead · e65812d4
      Matthias Bolte 提交于
      Suggested by danpb, as it's not up-to-date anymore and
      lacks many functions that were added to libvirtd.
      e65812d4
    • M
      lxc: Exit on first error in lxcDomainGetMemoryParameters · c3697a0e
      Matthias Bolte 提交于
      There is no point in trying to fill params beyond the first error,
      because when lxcDomainGetMemoryParameters returns -1 then the caller
      cannot detect which values in params are valid.
      c3697a0e
    • M
      Allow virDomainGetMemoryParameters on read-only connections · 9562ca3f
      Matthias Bolte 提交于
      Also fix a typo in the documentation of the function.
      9562ca3f
  5. 08 11月, 2010 4 次提交