1. 19 10月, 2009 2 次提交
    • D
      fix virDomainMigrateToURI doc · de2b252d
      Dan Kenigsberg 提交于
      * src/libvirt.c: remove reverences to non existent dconn parameter
        when using that entry point.
      de2b252d
    • R
      LXC fix virCgroupGetValueStr problem with \n · 41fa653f
      Ryota Ozaki 提交于
      A cgroup file returns integer value terminated with '\n' and remaining
      it has sometimes harmful effects, for example it leads virStrToLong_ull
      to fail.
      * src/util/cgroup.c: strip out terminating \n when reading a value
      41fa653f
  2. 15 10月, 2009 2 次提交
    • M
      Don't copy old machines from a domain which has none · 2210f8a3
      Mark McLoughlin 提交于
      If the the qemu and kvm binaries are the same, we don't include machine
      types in the kvm domain info.
      
      However, the code which refreshes the machine types info from the
      previous capabilities structure first looks at the kvm domain's info,
      finds it matches and then copies the empty machine types list over
      for the top-level qemu domain.
      
      That doesn't make sense, we shouldn't copy an empty machin types list.
      
      * src/qemu/qemu_conf.c: qemudGetOldMachinesFromInfo(): don't copy an
        empty machine types list.
      2210f8a3
    • L
      Avoid crash in virBufferEscapeString · 04e06862
      Laine Stump 提交于
      * src/util/buf.c: if virBufferEscapeString was called on a buffer that
        had 0 bytes of space, a size of -1 will be passed to snprintf, resulting
        in a segmentation fault, this preallocate some space.
      04e06862
  3. 14 10月, 2009 3 次提交
    • J
      Add ocfs2 to list of fs pool types · e3915958
      Jim Fehlig 提交于
      * src/conf/storage_conf.c src/conf/storage_conf.h: extend the enums
        and values
      * docs/schemas/storagepool.rng: add to the list of storage pool type
        formats
      e3915958
    • R
      LXC complement PATH environment variable · c396fb36
      Ryota Ozaki 提交于
      * src/lxc/lxc_driver.c: without PATH, the controller will definitely
        fail to call ip command
      c396fb36
    • C
      Finer grained migration control · 2d8d9b10
      Chris Lalancette 提交于
      Normally, when you migrate a domain from host A to host B,
      the domain on host A remains defined but shutoff and the domain
      on host B remains running but is a "transient".  Add a new
      flag to virDomainMigrate() to allow the original domain to be
      undefined on source host A, and a new flag to virDomainMigrate() to
      allow the new domain to be persisted on the destination host B.
      Signed-off-by: NChris Lalancette <clalance@redhat.com>
      2d8d9b10
  4. 13 10月, 2009 8 次提交
  5. 12 10月, 2009 1 次提交
    • M
      Take domain type into account when looking up default machine · 73c901a8
      Mark McLoughlin 提交于
      If one has e.g.
      
        <guest>
          <os_type>hvm</os_type>
          <arch name='x86_64'>
            <wordsize>64</wordsize>
            <emulator>/usr/bin/qemu-system-x86_64</emulator>
            <machine>pc-0.11</machine>
            <machine canonical='pc-0.11'>pc</machine>
            <machine>pc-0.10</machine>
            <machine>isapc</machine>
            <domain type='qemu'>
            </domain>
            <domain type='kvm'>
              <emulator>/usr/bin/kvm</emulator>
              <machine>pc</machine>
              <machine>isapc</machine>
            </domain>
          </arch>
        </guest>
      
      and start a guest with:
      
        <domain type='kvm'>
          ...
          <os>
            <type arch='x86_64'>hvm</type>
            ...
          </os>
        </domain>
      
      then the default machine type should be 'pc' and not 'pc-0.11'
      
      Issue was reported by Anton Protopopov.
      
      * src/capabilities.[ch]: pass the domain type to
        virCapabilitiesDefaultGuestArch() and use it to look up the default
        machine type from a specific guest domain if needed.
      
      * src/conf/domain_conf.c, src/xen/xm_internal.c: update
      
      * tests/qemuxml2argvdata/qemuxml2argv-machine-aliases2.xml: update
        the domain type to 'kvm' and remove the machine type to check
        that the default gets looked up correctly
      73c901a8
  6. 09 10月, 2009 10 次提交
    • D
      Support a new peer-to-peer migration mode & public API · fae0da5c
      Daniel P. Berrange 提交于
      Introduces several new public API options for migration
      
       - VIR_MIGRATE_PEER2PEER: With this flag the client only
         invokes the virDomainMigratePerform method, expecting
         the source host driver to do whatever is required to
         complete the entire migration process.
       - VIR_MIGRATE_TUNNELLED: With this flag the actual data
         for migration will be tunnelled over the libvirtd RPC
         channel. This requires that VIR_MIGRATE_PEER2PEER is
         also set.
       - virDomainMigrateToURI: This is variant of the existing
         virDomainMigrate method which does not require any
         virConnectPtr for the destination host. Given suitable
         driver support, this allows for all the same modes as
         virDomainMigrate()
      
      The URI for VIR_MIGRATE_PEER2PEER must be a valid libvirt
      URI. For non-p2p migration a hypervisor specific migration
      URI is used.
      
      virDomainMigrateToURI without a PEER2PEER flag is only
      support for Xen currently, and it involves XenD talking
      directly to XenD, no libvirtd involved at all.
      
      * include/libvirt/libvirt.h.in: Add VIR_MIGRATE_PEER2PEER
        flag for migration
      * src/libvirt_internal.h: Add feature flags for peer to
        peer migration (VIR_FEATURE_MIGRATE_P2P) and direct
        migration (VIR_MIGRATE_PEER2PEER mode)
      * src/libvirt.c: Implement support for VIR_MIGRATE_PEER2PEER
        and virDomainMigrateToURI APIs.
      * src/xen/xen_driver.c: Advertise support for DIRECT migration
      * src/xen/xend_internal.c: Add TODO item for p2p migration
      * src/libvirt_public.syms: Export virDomainMigrateToURI
        method
      * src/qemu/qemu_driver.c: Add support for PEER2PEER and
        migration, and adapt TUNNELLED migration.
      * tools/virsh.c: Add --p2p and --direct args and use the
        new virDomainMigrateToURI method where possible.
      fae0da5c
    • D
      Re-arrange doTunnelMigrate to simplify cleanup code · 35e7f271
      Daniel P. Berrange 提交于
      Re-arrange the doTunnelMigrate method putting all non-QEMU local
      state setup steps first. This maximises chances of success before
      then starting destination QEMU for receiving incoming migration.
      Altogether this can reduce the number of goto cleanup labels to
      something more managable.
      
      * qemu/qemu_driver.c: Re-order steps in doTunnelMigrate
      35e7f271
    • D
      Separate out code for sending tunnelled data · 8d75cb7f
      Daniel P. Berrange 提交于
      Simplify the doTunnelMigrate code by pulling out the code for
      sending all tunnelled data into separate helper
      
      * qemu/qemu_driver.c: introduce doTunnelSendAll() method
      8d75cb7f
    • D
      Pull connection handling code out of doTunnelMigrate · 0d5600fd
      Daniel P. Berrange 提交于
      Simplify the doTunnelMigrate() method by pulling out the code
      which opens/closes the virConnectPtr  object into a parent
      method
      
      * qemu/qemu_driver.c: Add doPeer2PeerMigrate which then calls
        doTunnelMigrate with dconn & dom_xml
      0d5600fd
    • D
      Fix stream abort upon I/O failure during migration · 345a5092
      Daniel P. Berrange 提交于
      virStreamAbort is needed when the caller wishes to terminate
      the stream early, not when virStreamSend fails.
      
      * qemu/qemu_driver.c: Fix calling of virStreamAbort during
        tunnelled migration
      345a5092
    • D
      Refactor native QEMU migration code · de85acdf
      Daniel P. Berrange 提交于
      The code for tunnelled migration was added in a dedicated method,
      but the native migration code is still inline in the top level
      qemudDomainMigratePerform() API. Move the native code out into
      a dedicated method too to make things more maintainable.
      
      * src/qemu/qemu_driver.c: Pull code for performing a native
        QEMU migration out into separate method
      de85acdf
    • D
      Don't force dconn to be NULL in virDomainMigrate · 543e013a
      Daniel P. Berrange 提交于
      The code for tunnelled migration wierdly required the app to pass
      a  NULL 'dconn' parameter, only to have to use virConnectOpen
      itself shortly thereafter to get a 'dconn' object. Remove this
      bogus check & require the app to always pas 'dconn' as before
      
      * src/libvirt.c: Require 'dconn' for virDomainMigrate calls again
        and remove call to virConnectOpen
      543e013a
    • D
      Remove unneccessary uri_in parameter from virMigratePrepareTunnel · f6c66d01
      Daniel P. Berrange 提交于
      Since virMigratePrepareTunnel() is used for migration over the
      native libvirt connection, there is never any need to pass the
      target URI to this method.
      
      * daemon/remote.c, src/driver.h, src/libvirt.c, src/libvirt_internal.h,
        src/qemu/qemu_driver.c, src/remote/remote_driver.c,
        src/remote/remote_protocol.c, src/remote/remote_protocol.h,
        src/remote/remote_protocol.x: Remove 'uri_in' parameter from
        virMigratePrepareTunnel() method
      f6c66d01
    • D
      Move the VIR_DRV_FEATURE* constants · dd26096a
      Daniel P. Berrange 提交于
      Move the VIR_DRV_FEATURE* constants into libvirt_internal.h
      since these flags are indicating whether  APIs in the
      libvirt_internal.h file are supported by a driver
      
      * src/driver.h: Remove VIR_DRV_FEATURE* constants
      * src/libvirt_internal.h: Add VIR_DRV_FEATURE* constants, using
        an enum instead of #define
      * src/internal.h: pull in libvirt_internal.h
      dd26096a
    • A
      LXC add augeas support for config file · e1a2fe6a
      Amy Griffis 提交于
      * src/lxc/libvirtd_lxc.aug src/lxc/test_libvirtd_lxc.aug: augeas schemas
        for lxc.conf
      * src/Makefile.am libvirt.spec.in: glue the new augeas files in
      e1a2fe6a
  7. 08 10月, 2009 9 次提交
    • A
      LXC add driver config file lxc.conf · 2dd44664
      Amy Griffis 提交于
      * src/lxc/lxc.conf: new configuration file, there is currently one
        tunable "log_with_libvirtd" that controls whether an lxc controller will
        log only to the container log file, or whether it will honor libvirtd's
        log output configuration. This provides a way to have libvirtd and its
        children log to a single file.  The default is to log to the container
        log file.
      * src/Makefile.am libvirt.spec.in: add the new file
      * src/lxc/lxc_conf.[ch] src/lxc/lxc_driver.c: read the new log value
        from the configuration file and pass the log informations when
        starting up a container.
      2dd44664
    • A
      LXC do not truncate container log files on restart · c73a0c4a
      Amy Griffis 提交于
      * src/lxc/lxc_driver.c: use O_APPEND instead of O_TRUNC when opening
        the log file on lxcVmStart()
      c73a0c4a
    • A
      LXC initialize logging configuration · 221b457e
      Amy Griffis 提交于
      * src/lxc/lxc_driver.c src/lxc/lxc_controller.c: before launching the
        lxc controller, have the lxc driver query the log settings and setup
        envp[]. This provides the advantage of honoring the actual log
        configuration instead of only what had been set in the environment.
        The lxc controller now simply has to call virLogSetFromEnv().
      221b457e
    • A
      Add debug for envp[] in virExecWithHook() · ab8dd999
      Amy Griffis 提交于
      * src/util/util.c: output some debug if caller of virExecWithHook have
        set envp[]
      ab8dd999
    • A
      Add accessors for logging filters and outputs · 01e0e98f
      Amy Griffis 提交于
      When configuring logging settings, keep more information about the
      output destination. Add accessors to retrieve the filter and output
      settings in the original string form; this to be used to set up
      environment for a child process that also logs.
      
      * src/util/logging.[ch]: add virLogGetFilters and virLogGetOutputs
        accessors and modify the internals (including virLogDefineOutput())
        to save the data needed for the accessors
      01e0e98f
    • A
      Add virFileAbsPath() utility · 2e812c89
      Amy Griffis 提交于
      * src/util/util.[ch]: Add virFileAbsPath() function to ensure an
        absolute path for a potentially realtive path.
      * src/libvirt_private.syms: add it in libvirt private symbols
      2e812c89
    • J
      sVirt AppArmor security driver · bbaecd6a
      Jamie Strandboge 提交于
      * configure.in: look for AppArmor and devel
      * src/security/security_apparmor.[ch] src/security/security_driver.c
        src/Makefile.am: add and plug the new driver
      * src/security/virt-aa-helper.c: new binary which is used exclusively by
        the AppArmor security driver to manipulate AppArmor.
      * po/POTFILES.in: registers the new files
      * tests/Makefile.am tests/secaatest.c tests/virt-aa-helper-test:
        tests for virt-aa-helper and the security driver, secaatest.c is
        identical to seclabeltest.c except it initializes the 'apparmor'
        driver instead of 'selinux'
      bbaecd6a
    • C
      cgroup: Fix -Werror breakage · f5c65fa1
      Cole Robinson 提交于
      f5c65fa1
    • D
      Misc win32 build fixes · 7b1fe89a
      Daniel P. Berrange 提交于
      * daemon/Makefile.am: Fix missing sasl rule
      * src/datatypes.c: Add unistd.h to avoid gnulib bug
      * src/util/cgroup.c: Disable mntent if not available
      7b1fe89a
  8. 07 10月, 2009 3 次提交
    • R
      Fix handling return value of qemuMonitorSetBalloon · e1f5f851
      Ryota Ozaki 提交于
      * src/qemu/qemu_driver.c: The positive return value of
        qemuMonitorSetBalloon should be handled as a success
      e1f5f851
    • R
      LXC implement memory control APIs · 3a05dc09
      Ryota Ozaki 提交于
      The patch implements the missing memory control APIs for lxc, i.e.,
      domainGetMaxMemory, domainSetMaxMemory, domainSetMemory, and improves
      domainGetInfo to return proper amount of used memory via cgroup.
      
      * src/libvirt_private.syms: Export virCgroupGetMemoryUsage
        and add missing virCgroupSetMemory
      * src/lxc/lxc_driver.c: Implement missing memory functions
      * src/util/cgroup.c, src/util/cgroup.h: Add the function
        to get used memory
      3a05dc09
    • J
      Add a domain argument to SVirt *RestoreImageLabel · 709c37e9
      Jamie Strandboge 提交于
      When James Morris originally submitted his sVirt patches (as seen in
      libvirt 0.6.1), he did not require on disk labelling for
      virSecurityDomainRestoreImageLabel. A later commit[2] changed this
      behavior to assume on disk labelling, which halts implementations for
      path-based MAC systems such as AppArmor and TOMOYO where
      vm->def->seclabel is required to obtain the label.
      
      * src/security/security_driver.h src/qemu/qemu_driver.c
        src/security/security_selinux.c: adds the 'virDomainObjPtr vm'
        argument back to *RestoreImageLabel
      709c37e9
  9. 06 10月, 2009 2 次提交