You need to sign in or sign up before continuing.
  1. 15 4月, 2010 1 次提交
  2. 06 4月, 2010 1 次提交
  3. 01 4月, 2010 2 次提交
  4. 27 3月, 2010 1 次提交
    • D
      Fix build break · 67253251
      David Allan 提交于
      * Add types to switch; the switch is only exectuted for known types because of a preceding conditional, so this fix is merely to placate the compiler.
      67253251
  5. 26 3月, 2010 1 次提交
    • D
      Implement virDomainUpdateDeviceFlags API in all drivers with media change · 6bb4986b
      Daniel P. Berrange 提交于
      To allow the new virDomainUpdateDeviceFlags() API to be universally
      used with all drivers, this patch adds an impl to all the current
      drivers which support CDROM or Floppy disk media change via the
      current virDomainAttachDeviceFlags API
      
      * src/qemu/qemu_driver.c, src/vbox/vbox_tmpl.c,
        src/xen/proxy_internal.c, src/xen/xen_driver.c,
        src/xen/xend_internal.c: Implement media change via the
        virDomainUpdateDeviceFlags API
      * src/xen/xen_driver.h, src/xen/xen_hypervisor.c,
        src/xen/xen_inotify.c, src/xen/xm_internal.c,
        src/xen/xs_internal.c: Stubs for Xen driver entry points
      6bb4986b
  6. 10 3月, 2010 1 次提交
  7. 09 3月, 2010 1 次提交
    • L
      Fix format string warnings · 618dc80c
      Laine Stump 提交于
      A few more non-literal format strings in error log messages have crept
      in. Fix them in the standard way - turn the format string into "%s"
      with the original string as the arg.
      618dc80c
  8. 08 3月, 2010 1 次提交
    • E
      build: consistently use C99 varargs macros · 2e56fb2b
      Eric Blake 提交于
      Prior to this patch, there was an inconsistent mix between GNU and C99.
      
      For consistency, and potential portability to other compilers, stick
      with the C99 vararg macro syntax.
      
      * src/conf/cpu_conf.c (virCPUReportError): Use C99 rather than GNU
        vararg macro syntax.
      * src/conf/domain_conf.c (virDomainReportError): Likewise.
      * src/conf/domain_event.c (eventReportError): Likewise.
      * src/conf/interface_conf.c (virInterfaceReportError): Likewise.
      * src/conf/network_conf.c (virNetworkReportError): Likewise.
      * src/conf/node_device_conf.h (virNodeDeviceReportError): Likewise.
      * src/conf/secret_conf.h (virSecretReportError): Likewise.
      * src/conf/storage_conf.h (virStorageReportError): Likewise.
      * src/esx/esx_device_monitor.c (ESX_ERROR): Use C99 rather than
        GNU vararg macro syntax.
      * src/esx/esx_driver.c (ESX_ERROR): Likewise.
      * src/esx/esx_interface_driver.c (ESX_ERROR): Likewise.
      * src/esx/esx_network_driver.c (ESX_ERROR): Likewise.
      * src/esx/esx_secret_driver.c (ESX_ERROR): Likewise.
      * src/esx/esx_storage_driver.c (ESX_ERROR): Likewise.
      * src/esx/esx_util.c (ESX_ERROR): Likewise.
      * src/esx/esx_vi.c (ESX_VI_ERROR): Likewise.
      * src/esx/esx_vi_methods.c (ESX_VI_ERROR): Likewise.
      * src/esx/esx_vi_types.c (ESX_VI_ERROR): Likewise.
      * src/esx/esx_vmx.c (ESX_ERROR): Likewise.
      * src/util/hostusb.c (usbReportError): Use C99 rather than GNU
        vararg macro syntax.
      * src/util/json.c (virJSONError): Likewise.
      * src/util/macvtap.c (ReportError): Likewise.
      * src/util/pci.c (pciReportError): Likewise.
      * src/util/stats_linux.c (virStatsError): Likewise.
      * src/util/util.c (virUtilError): Likewise.
      * src/util/xml.c (virXMLError): Likewise.
      * src/xen/proxy_internal.c (virProxyError): Use C99 rather than
        GNU vararg macro syntax.
      * src/xen/sexpr.c (virSexprError): Likewise.
      * src/xen/xen_driver.c (xenUnifiedError): Likewise.
      * src/xen/xen_hypervisor.c (virXenError): Likewise.
      * src/xen/xen_inotify.c (virXenInotifyError): Likewise.
      * src/xen/xend_internal.c (virXendError): Likewise.
      * src/xen/xm_internal.c (xenXMError): Likewise.
      * src/xen/xs_internal.c (virXenStoreError): Likewise.
      * src/cpu/cpu.h (virCPUReportError): Use C99 rather than GNU
        vararg macro syntax.
      * src/datatypes.c (virLibConnError): Likewise.
      * src/interface/netcf_driver.c (interfaceReportError): Likewise.
      * src/libvirt.c (virLibStreamError): Likewise.
      * src/lxc/lxc_conf.h (lxcError): Likewise.
      * src/network/bridge_driver.c (networkReportError): Likewise.
      * src/nodeinfo.c (nodeReportError): Likewise.
      * src/opennebula/one_conf.h (oneError): Likewise.
      * src/openvz/openvz_conf.h (openvzError): Likewise.
      * src/phyp/phyp_driver.c (PHYP_ERROR): Likewise.
      * src/qemu/qemu_conf.h (qemuReportError): Likewise.
      * src/remote/remote_driver.c (errorf): Likewise.
      * src/security/security_driver.h (virSecurityReportError): Likewise.
      * src/test/test_driver.c (testError): Likewise.
      * src/uml/uml_conf.h (umlReportError): Likewise.
      * src/vbox/vbox_driver.c (vboxError): Likewise.
      * src/vbox/vbox_tmpl.c (vboxError): Likewise.
      2e56fb2b
  9. 02 3月, 2010 2 次提交
    • D
      Allow a timezone to be specified instead of sync to host timezone · e4d7433e
      Daniel P. Berrange 提交于
      This extends the XML to allow for
      
        <clock offset='timezone' timezone='Europe/Paris'/>
      
      This is useful if the admin has not configured any timezone on the
      host OS, but still wants to synchronize a guest to a specific one.
      
      * src/conf/domain_conf.h, src/conf/domain_conf.c: Support extra
        'timezone' attribute on clock configuration
      * docs/schemas/domain.rng: Add 'timezone' attribute
      * src/xen/xend_internal.c, src/xen/xm_internal.c: Reject configs
        with a configurable timezone
      e4d7433e
    • D
      Change the internal domain conf representation of localtime/utc · eed2f8c3
      Daniel P. Berrange 提交于
      The XML will soon be extended to allow more than just a simple
      localtime/utc boolean flag. This change replaces the plain
      'int localtime' with a separate struct to prepare for future
      extension
      
      * src/conf/domain_conf.c, src/conf/domain_conf.h: Add a new
        virDomainClockDef structure
      * src/libvirt_private.syms: Export virDomainClockOffsetTypeToString
        and virDomainClockOffsetTypeFromString
      * src/qemu/qemu_conf.c, src/vbox/vbox_tmpl.c, src/xen/xend_internal.c,
        src/xen/xm_internal.c: Updated to use new structure for localtime
      eed2f8c3
  10. 20 2月, 2010 1 次提交
  11. 19 2月, 2010 1 次提交
    • J
      xenDaemonDomainSetAutostart: avoid appearance of impropriety · 37ce5600
      Jim Meyering 提交于
      * src/xen/xend_internal.c (xenDaemonDomainSetAutostart): Rewrite to
      avoid dereferencing the result of sexpr_lookup.  While in this
      particular case, it was guaranteed never to be NULL, due to the
      preceding "if sexpr_node(...)" guard, it's cleaner to skip the
      sexpr_node call altogether, and also saves a lookup.
      37ce5600
  12. 10 2月, 2010 1 次提交
  13. 09 2月, 2010 3 次提交
  14. 15 1月, 2010 1 次提交
  15. 13 1月, 2010 1 次提交
    • J
      Fix migration in xend driver · 6c6fbac7
      Jim Fehlig 提交于
      Upstream xen has changed parameters to the migration operation
      several times over the past 18 months.  Changeset 17553 removed
      the resouce parameter,  Changesets 17709, 17753, and 20326 added
      ssl, node, and change_home_server parameters respectively.
      
      Fortunately, testing has revealed that xend will fail the
      operation if a parameter is missing but happily honor it if
      unknown parameters are provided.  Thus all currently supported
      parameters can be provided, satisfying current xend but not
      regressing older versions.
      6c6fbac7
  16. 07 1月, 2010 1 次提交
  17. 22 12月, 2009 1 次提交
    • C
      Make Xen VT-d PCI attach/detach work · e9f468d3
      Chris Lalancette 提交于
      The Xen code for making HVM VT-d PCI passthrough attach and detach
      wasn't working properly:
      
      1)  In xenDaemonAttachDevice(), we were always trying to reconfigure
      a PCI passthrough device, even the first time we added it.  This was
      because the code in virDomainXMLDevID() was not checking xenstore for
      the existence of the device, and always returning 0 (meaning that
      the device already existed).
      
      2)  In xenDaemonDetachDevice(), we were trying to use "device_destroy"
      to detach a PCI device.  While you would think that is the right
      method to call, it's actually wrong for PCI devices.  In particular,
      in upstream Xen (and soon in RHEL-5 Xen), device_configure is actually
      used to destroy a PCI device.
      
      To fix the attach
      problem I add a lookup into xenstore to see if the device we are
      trying to attach already exists.  To fix the detach problem I change
      it so that for PCI detach (only), we use device_configure with the
      appropriate sxpr to do the detachment.
      
      * src/xen/xend_internal.c: don't use device_destroy for PCI devices
        and fix the other issues.
      * src/xen/xs_internal.c src/xen/xs_internal.h: add
        xenStoreDomainGetPCIID()
      e9f468d3
  18. 14 12月, 2009 2 次提交
    • P
      add --live support to "virsh dump" · 1fb7af40
      Paolo Bonzini 提交于
      This is trivial for QEMU since you just have to not stop the vm before
      starting the dump.  And for Xen, you just pass the flag down to xend.
      
      * include/libvirt/libvirt.h.in (virDomainCoreDumpFlags): Add VIR_DUMP_LIVE.
      * src/qemu/qemu_driver.c (qemudDomainCoreDump): Support live dumping.
      * src/xen/xend_internal.c (xenDaemonDomainCoreDump): Support live dumping.
      * tools/virsh.c (opts_dump): Add --live. (cmdDump): Map it to VIR_DUMP_LIVE.
      1fb7af40
    • P
      add --crash support to "virsh dump" · b927aed8
      Paolo Bonzini 提交于
      This patch adds the --crash option (already present in "xm dump-core")
      to "virsh dump".  virDomainCoreDump already has a flags argument, so
      the API/ABI is untouched.
      
      * include/libvirt/libvirt.h.in (virDomainCoreDumpFlags): New flag for
        CoreDump
      * src/test/test_driver.c (testDomainCoreDump): Do not crash
        after dump unless VIR_DUMP_CRASH is given.
      * src/qemu/qemu_driver.c (qemudDomainCoreDump): Shutdown the domain
        instead of restarting it if --crash is passed.
      * src/xen/xend_internal.c (xenDaemonDomainCoreDump): Support --crash.
      * tools/virsh.c (opts_dump): Add --crash.
        (cmdDump): Map it to flags for virDomainCoreDump and pass them.
      b927aed8
  19. 11 12月, 2009 1 次提交
    • P
      retrieve paused/running state at migration start · 5de41c06
      Paolo Bonzini 提交于
      This patch fixes the bug where paused/running state is not
      transmitted during migration.  As a result, in the QEMU driver
      for example the machine was always started on the destination
      end.
      
      In order to do so, just read the state and if it is appropriate and
      set the VIR_MIGRATE_PAUSED flag.
      
      * src/libvirt.c (virDomainMigrateVersion1, virDomainMigrateVersion2):
        Automatically add VIR_MIGRATE_PAUSED when appropriate.
      * src/xen/xend_internal.c (xenDaemonDomainMigratePerform): Give a nicer
        error message when migration of paused domains is attempted.
      5de41c06
  20. 10 12月, 2009 1 次提交
    • M
      Add virBufferFreeAndReset() and replace free() · 1b9d0744
      Matthias Bolte 提交于
      Replace free(virBufferContentAndReset()) with virBufferFreeAndReset().
      Update documentation and replace all remaining calls to free() with
      calls to VIR_FREE(). Also add missing calls to virBufferFreeAndReset()
      and virReportOOMError() in OOM error cases.
      1b9d0744
  21. 09 12月, 2009 1 次提交
    • J
      Plumb domain description tag in xend backend · 723bfda1
      Jim Fehlig 提交于
      xen-unstable changesets 20321 and 20521 added support for
      description in xend domain config.  This patch extends that
      support in xend backend.
      * src/xen/xend_internal.c: add parse and output of domain description
      723bfda1
  22. 04 12月, 2009 1 次提交
    • J
      Support for interface model='netfront' · dddad4bc
      Jiri Denemark 提交于
      Xen HVM guests with PV drivers end up with two network interfaces for
      each configured interface. One of them being emulated by qemu and the
      other one paravirtual. As this might not be desirable, the attached
      patch provides a way for users to specify that only paravirtual network
      interface should be presented to the guest.
      
      The configuration was inspired by qemu/kvm driver, for which users can
      specify model='virtio' to use paravirtual network interface.
      
      The patch adds support for model='netfront' which results in
      type=netfront instead of type=ioemu (or nothing for newer xen versions)
      in guests native configuration. Xen's qemu ignores interfaces with
      type != ioemu and only paravirtual network device will be seen in the
      guest.
      
      Four possible configuration scenarios follow:
      
      - no model specified in domain's XML
          - libvirt will behave like before this change; it will set
            type=ioemu for HVM guests on xen host which is not newer than
            XEND_CONFIG_MAX_VERS_NET_TYPE_IOEMU
          - covered by existing tests
      
      - PV guest, any model
          - no functional change, model is passed as is (and ignored by the
            hypervisor)
          - covered by existing tests (e.g., *-net-e1000.*)
      - HVM guest, model=netfront
          - type is set to "netfront", model is not specified
          - covered by new *-net-netfront.* tests
      
      - HVM guest, model != netfront
          - type is set to "ioemu", model is passed as is
          - covered by new *-net-ioemu.* tests
      
      The fourth scenario feels like a regression for xen newer than
      XEND_CONFIG_MAX_VERS_NET_TYPE_IOEMU as users who had a model specified
      in their guest's configuration won't see a paravirtual interface in
      their guests any more. On the other hand, the reason for specifying a
      model is most likely the fact that they want to use such model which
      implies emulated interface. Users of older xen won't be affected at all
      as their xen provides paravirtual interface regardless of the type used.
      
      - src/xen/xend_internal.c: add netfront support for the xend backend
      - src/xen/xm_internal.c: add netfront support for the XM serialization too
      dddad4bc
  23. 30 11月, 2009 1 次提交
  24. 26 11月, 2009 1 次提交
  25. 23 11月, 2009 1 次提交
    • D
      Support QEMU's virtual FAT block device driver · e7c78b0a
      Daniel P. Berrange 提交于
      Introduce a new type="dir"  mode for <disks> that allows use of
      QEMU's  virtual FAT block device driver. eg
      
          <disk type='dir' device='floppy'>
            <source dir='/tmp/test'/>
            <target dev='fda' bus='fdc'/>
            <readonly/>
          </disk>
      
      gets turned into
      
        -drive file=fat:floppy:/tmp/test,if=floppy,index=0
      
      Only read-only disks are supported with virtual FAT mode
      
      * src/conf/domain_conf.c, src/conf/domain_conf.h: Add type="dir"
      * docs/schemas/domain.rng: Document new disk type
      * src/xen/xend_internal.c, src/xen/xm_internal.c: Raise error for
        unsupported disk types
      * tests/qemuxml2argvdata/qemuxml2argv-disk-cdrom-empty.args: Fix
        empty disk file handling
      * tests/qemuxml2argvdata/qemuxml2argv-disk-drive-fat.args,
        tests/qemuxml2argvdata/qemuxml2argv-disk-drive-fat.xml,
        tests/qemuxml2argvdata/qemuxml2argv-floppy-drive-fat.args,
        tests/qemuxml2argvdata/qemuxml2argv-floppy-drive-fat.xml
        tests/qemuxml2argvtest.c: Test QEMU vitual FAT driver
      * src/qemu/qemu_conf.c: Support generating fat:/some/dir type
        disk args
      * src/security/security_selinux.c: Temporarily skip labelling
        of directory based disks
      e7c78b0a
  26. 12 11月, 2009 2 次提交
    • M
      Implement finer grained migration control for Xen · 632be336
      Maximilian Wilhelm 提交于
      * src/xen/xen_driver.c: Add support for VIR_MIGRATE_PERSIST_DEST flag
      * src/xen/xend_internal.c: Add support for VIR_MIGRATE_UNDEFINE_SOURCE flag
      * include/libvirt/virterror.h, src/util/virterror.c: Add new errorcode
        VIR_ERR_MIGRATE_PERSIST_FAILED
      632be336
    • J
      Fix logic in xenUnifiedNumOfDomains to match xenUnifiedListDomains · 2659b3f5
      Jonas Eriksson 提交于
      The xenUnifiedNumOfDomains and xenUnifiedListDomains methods work
      together as a pair, so it is critical they both apply the same
      logic. With the current mis-matched logic it is possible to sometimes
      get into a state when you miss certain active guests.
      
      * src/xen/xen_driver.c: Change xenUnifiedNumOfDomains ordering to
        match xenUnifiedListDomains.
      2659b3f5
  27. 11 11月, 2009 1 次提交
    • D
      Various fixes following a code review · 52147a04
      Daniel Veillard 提交于
      * src/libvirt.c src/lxc/lxc_conf.c src/lxc/lxc_container.c
        src/lxc/lxc_controller.c src/node_device/node_device_hal.c
        src/openvz/openvz_conf.c src/qemu/qemu_driver.c
        src/qemu/qemu_monitor_text.c src/remote/remote_driver.c
        src/storage/storage_backend_disk.c src/storage/storage_driver.c
        src/util/logging.c src/xen/sexpr.c src/xen/xend_internal.c
        src/xen/xm_internal.c: Steve Grubb <sgrubb@redhat.com> sent a code
        review and those are the fixes correcting the problems
      52147a04
  28. 10 11月, 2009 1 次提交
  29. 05 11月, 2009 1 次提交
    • M
      Allow character devices to have different target types · 89d549c3
      Matthew Booth 提交于
      A character device's target (it's interface in the guest) had only a
      single property: port. This patch is in preparation for adding targets
      which require other properties.
      Since this changes the conf type for character devices this affects
      a number of drivers:
      
      * src/conf/domain_conf.[ch] src/esx/esx_vmx.c src/qemu/qemu_conf.c
        src/qemu/qemu_driver.c src/uml/uml_conf.c src/uml/uml_driver.c
        src/vbox/vbox_tmpl.c src/xen/xend_internal.c src/xen/xm_internal.c:
        target properties are moved into a union in virDomainChrDef, and a
        targetType field is added to identify which union member should be
        used. All current code which touches a virDomainChrDef is updated both
        to use the new union field, and to populate targetType if necessary.
      89d549c3
  30. 04 11月, 2009 1 次提交
    • C
      Improve error reporting for virConnectGetHostname calls · 517761fd
      Cole Robinson 提交于
      All drivers have copy + pasted inadequate error reporting which wraps
      util.c:virGetHostname. Move all error reporting to this function, and improve
      what we report.
      
      Changes from v1:
        Drop the driver wrappers around virGetHostname. This means we still need
        to keep the new conn argument to virGetHostname, but I think it's worth
        it.
      517761fd
  31. 26 10月, 2009 1 次提交
  32. 09 10月, 2009 1 次提交
    • 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
  33. 23 9月, 2009 1 次提交
    • C
      Introduce virStrncpy. · 03d777f3
      Chris Lalancette 提交于
      Add the virStrncpy function, which takes a dst string, source string,
      the number of bytes to copy and the number of bytes available in the
      dest string.  If the source string is too large to fit into the
      destination string, including the \0 byte, then no data is copied and
      the function returns NULL.  Otherwise, this function copies n bytes
      from source into dst, including the \0, and returns a pointer to the
      dst string.  This function is intended to replace all unsafe uses
      of strncpy in the code base, since strncpy does *not* guarantee that
      the buffer terminates with a \0.
      Signed-off-by: NChris Lalancette <clalance@redhat.com>
      03d777f3
  34. 21 9月, 2009 1 次提交
    • D
      Move xen driver code into src/xen/ directory · f7a107f7
      Daniel P. Berrange 提交于
      * src/Makefile.am, src/proxy_internal.c, src/proxy_internal.h
        src/sexpr.c, src/sexpr.h, src/xen_unified.c, src/xen_unified.h,
        src/xen_internal.c, src/xen_internal.h, src/xen_inotify.c,
        src/xen_inotify.h, src/xend_internal.c, src/xend_internal.h,
        src/xm_internal.c, src/xm_internal.h, src/xs_internal.c,
        src/xs_internal.h: Move to src/xen/ directory
      * proxy/Makefile.am, proxy/libvirt_proxy.c, src/Makefile.am,
        src/libvirt.c, tests/sexpr2xmltest.c, tests/statstest.c,
        tests/xencapstest.c, tests/xmconfigtest.c, tests/xml2sexprtest.c:
        Adapt to changed xen location
      * src/stats_linux.h, src/stats_linux.c: Remove xen specific block
        stats APIs
      * src/qemu_driver.c, src/uml_driver.c: Add missing sys/un.h include
        uncovered after change to stats_linux.h
      * src/xen/block_stats.h, src/xen/block_stats.c: Add xen specific
        block stats APIs
      f7a107f7