1. 27 7月, 2009 19 次提交
    • M
      Use sendmsg() on QEMU monitor socket · 7d9576ed
      Mark McLoughlin 提交于
      Switch from using write() to using sendmsg() on QEMU's monitor socket
      so that we can add support for SCM_RIGHTS.
      
      * src/qemu_driver.c: add sendmsg() based qemudMonitorSendUnix() and use
        it when the monitor fd is a unix socket
      7d9576ed
    • M
      Factor qemudMonitorSend() out of qemudMonitorCommandExtra() · 9de2972c
      Mark McLoughlin 提交于
      Add a little helper function to write the monitor command followed by
      carriage return in a single write.
      
      This doesn't make any real difference, but allows us to more easily
      switch to using sendmsg() when using the monitor over a unix socket.
      
      * src/qemu_conf.c: split qemudMonitorSend() out
      9de2972c
    • M
      Clean up error handling in qemudDomainAttachNetDevice() · be44cabd
      Mark McLoughlin 提交于
      In subsequent patches we're going to have a file descriptor to close
      too, so centralize the error handling cleanups to make things easier.
      
      * src/qemu_conf.c: in qemudDomainAttachNetDevice() consolidate the
        error handling cleanups together
      be44cabd
    • M
      Make qemuBuildHostNetStr() take tapfd as a string · 32db8dd7
      Mark McLoughlin 提交于
      With hotplug, we're going to want to pass a tapfd name rather than an
      actual file descriptor, so prepare the way by passing a string tapfd to
      qemuBuildHostNetStr().
      
      * src/qemu_conf.h: qemuBuildHostNetStr() takes a string tapfd now
      
      * src/qemu_conf.c: pass qemuBuildHostNetStr() a string rather than an
        actual file descriptor
      
      * src/qemu_driver.c: update qemudDomainAttachNetDevice() for change
      32db8dd7
    • M
      Move vnet_hdr logic into qemudNetworkIfaceConnect() and export it · a3f33b65
      Mark McLoughlin 提交于
      * src/qemu_conf.h: export qemudNetworkIfaceConnect()
      
      * src/qemu_conf.c: move vnet_hdr logic into qemudNetworkIfaceConnect()
        since we need it for hotplug too
      a3f33b65
    • M
      Only probe qemu for machine types when binary changes · 707302b2
      Mark McLoughlin 提交于
      By probing for qemu machine types, we increased the time of a
      GetCapabilities call from 100us to a whopping 60ms.
      
      This patch takes the approach of only probing for machine types
      when the mtime of the emulator binary changed since the last time
      the capabilities were generated.
      
      * src/capabilities.h: cache the emulator binary mtime
      
      * src/qemu_conf.c: add qemudGetOldMachines() to copy the machine
        types from the old caps struct if the mtime for the binary hasn't
        changed
      
      * src/qemu_conf.h, src/qemu_driver.c: pass the old caps pointer to
        qemudCapsInit()
      707302b2
    • M
      Add canonical machine name to capabilities output · 0f15d034
      Mark McLoughlin 提交于
      e.g. <machine canonical='pc'>pc-0.11</machine>
      
      * src/capabilities.c: output the canonical machine names in the
        capabilities output, if available
      
      * docs/schemas/capabilities.rng: add the new attribute
      0f15d034
    • M
      Probe QEMU directly for machine aliases if not found in capabilties · c14c6b08
      Mark McLoughlin 提交于
      Not all possible emulators are actually in the capabilities, so if we
      don't find the supplied emulator we should probe it directly for machine
      types.
      
      * src/qemu_driver.c: add qemudCanonicalizeMachineDirect() to directly
        probe an emulator for the canonical machine type
      c14c6b08
    • M
      Canonicalize qemu machine types · be291b33
      Mark McLoughlin 提交于
      In qemu-0.11 there is a 'pc-0.10' machine type which allows you to run
      guests with a machine which is compatible with the pc machine in
      qemu-0.10 - e.g. using the original PCI class for virtio-blk and
      virtio-console and disabling MSI support in virtio-net. The idea here
      is that we don't want to suprise guests by changing the hardware when
      qemu is updated.
      
      I've just posted some patches for qemu-0.11 which allows libvirt to
      canonicalize the 'pc' machine alias to the latest machine version.
      
      This patches makes us use that so that when a guest is configured to
      use the 'pc' machine type, we resolve that to 'pc-0.11' machine and
      save that in the guest XML.
      
      See also:
      
        https://fedoraproject.org/wiki/Features/KVM_Stable_Guest_ABI
      
      * src/qemu_conf.c: add qemudCanonicalizeMachine() to canonicalize
        the machine type according to the machine aliases in capabilities
      
      * src/qemu_driver.c: parse aliases in qemudParseMachineTypesStr()
      be291b33
    • M
      Add virCapsGuestMachine structure · 38fd207e
      Mark McLoughlin 提交于
      A subsequent commit will add a "canonical" field to this structure,
      this patch basically just prepares the way for that.
      
      The new type is added, along with virCapabilitiesAlloc/FreeMachines()
      helpers and a whole bunch of code to make the transition.
      
      One quirk is that virCapabilitiesAddGuestDomain() and
      virCapabilitiesAddGuest() take ownership of the machine list rather
      than duping it. This makes sense to avoid needless copying.
      
      * src/capabilities.h: add the virCapsGuestMachine struct and use it
        in virCapsGuestDomainInfo, add prototypes for new functions and
        update the AddGuest() prototypes
      
      * src/capabilities.c: add code for allocating and freeing the new
        type, change the machines parameter to AddGuest() etc.
      
      * src/libvirt_private.syms: export the new helpers
      
      * src/qemu_conf.c: update all the machine type code to use the new
        struct
      
      * src/xen_internal.c: ditto
      
      * tests/testutilsqemu.c: ditto
      38fd207e
    • M
      Probe for QEMU machine types · d412487e
      Mark McLoughlin 提交于
      Currently we hardcode the QEMU machine types. We should really just
      parse the output of 'qemu -M ?' so the lists don't get out of sync.
      
      xenner doesn't support '-M ?', so we still need to hardcode that.
      
      The horrible (const char *const *) is removed in a subsequent patch.
      
      * src/qemu_conf.c: kill the arch_info*machines tables, retain the
        hardcoded xenner machine type, add qemudProbeMachineTypes() to
        run and parse 'qemu -M ?' and use it in qemudCapsInitGuest()
      d412487e
    • M
      Cleanup qemu binary detection logic in qemudCapsInitGuest() · 7803e6f3
      Mark McLoughlin 提交于
      There's no need for the hasbase/hasaltbase confusion, just store the
      first binary path found in a variable.
      
      * src/qemu_conf.c: kill hasbase/hasaltbase logic in qemudCapsInitGuest()
      7803e6f3
    • M
      ESX driver accept VI API version 4.0 · 84255632
      Matthias Bolte 提交于
      * src/esx/esx_driver.c src/esx/esx_vi.c src/esx/esx_vi.h
        src/esx/esx_vmx.c src/esx/esx_vmx.h: extend the VI API version checks
        to accept version 4.0 and takes care of the virtualHW.version change
        from 4 to 7.
      84255632
    • M
      Allow leading dots in VMX config entry names · b557a368
      Matthias Bolte 提交于
      * src/conf.c: the virConfParser must accept leading dot when in VMX mode
      b557a368
    • M
      Add no_verify query parameter to ESX URIs · e4e50f52
      Matthias Bolte 提交于
      * src/esx/esx_driver.c src/esx/esx_util.c src/esx/esx_util.h
        src/esx/esx_vi.c src/esx/esx_vi.h: adds a no_verify query parameter to
        stop libcurl from verifying theserver certificate for the https
        transport.
      e4e50f52
    • M
      Fix memory leaks in esxDomainDumpXML · e74d6c50
      Matthias Bolte 提交于
      * src/esx/esx_driver.c: remove leaks in esxDomainDumpXML() and simplify
        esxDomainXMLFromNative()
      e74d6c50
    • C
      test: Implement BlockStats and InterfaceStats · b4ad955d
      Cole Robinson 提交于
      We fake stats values based on the current time, similar to how it's done
      for cpu time.
      b4ad955d
    • C
      test: Generate net interface names when assigning XML. · 3b4a542c
      Cole Robinson 提交于
      We need interface names to implement InterfaceStats.
      3b4a542c
    • C
      Don't allow NULL paths for BlockStats and InterfaceStats · 13f3d40c
      Cole Robinson 提交于
      Do the check in libvirt.c, to save drivers from the burden. This changes
      behavior slightly in the qemu driver: we no longer explictly error if
      passed an empty string. An error will still be thrown when the device
      lookup fails.
      13f3d40c
  2. 25 7月, 2009 2 次提交
    • D
      Fix misc build problems due to new drivers · 484640ea
      Daniel P. Berrange 提交于
      * autobuild.sh: Disable esx/phyp build on mingw32
      * configure.in: Fix handling of --without-phyp so it actually works
      * libvirt.spec.in: Add missing interface.rng
      * mingw32-libvirt.spec.in: Disable phyp/esx drivers
      * src/phyp/phyp_driver.c: Fix missing i18n of error messages
      484640ea
    • P
      Add support for VBox 3 and event callbacks on vbox · 41e097e9
      Pritesh Kothari 提交于
      * src/vbox/vbox_driver.c: remove some old 2.5 switches and plug the
        3.0 driver
      * src/vbox/vbox_V3_0.c src/vbox/vbox_CAPI_v3_0.h: the driver for
        VirtualBox 3.0
      * src/vbox/vbox_tmpl.c: handle the new driver and add event support
      * src/Makefile.am: plug in the new module
      41e097e9
  3. 24 7月, 2009 10 次提交
    • D
      Fix cgroup compile warnings · 1112330e
      Daniel P. Berrange 提交于
      * src/cgroup.c: Fix cast to uint64 from unsigned long long
      1112330e
    • E
      First version of the Power Hypervisor driver · a7a82f98
      Eduardo Otubo 提交于
      Features supported:
      - Connects to HMC/VIOS or IVM systems.
      - Life cycle commands (resume and shutdown).
      - dumpxml
      - 'list' and 'list --all'
      
      What is being implemented:
      - better and centralized control for UUID
      - definexml
      - CPU management commands
      
      * src/domain_conf.c src/domain_conf.h: first version of the driver
      * configure.in src/Makefile.am include/libvirt/virterror.h
        src/domain_conf.[ch] src/libvirt.c src/virterror.c: glue the driver
        in the general framework
      a7a82f98
    • M
      First version of the driver for VMWare ESX · e2aeee68
      Matthias Bolte 提交于
      * src/esx/esx_*.[ch]: the driver, uses a remote minimal SOAP client
        to talk to the VI services on ESX nodes.
      * configure.in include/libvirt/virterror.h src/Makefile.am src/driver.h
        src/libvirt.c src/virterror.c: glue in the new driver
      e2aeee68
    • D
      Make QEMU cgroups use configurable · f4c3acdf
      Daniel P. Berrange 提交于
       * qemud/libvirtd_qemu.aug, qemud/test_libvirtd_qemu.aug,
         src/qemu.conf: Add 'cgroups_controllers' and 'cgroups_device_acl'
         parameters
       * src/qemu_conf.h, src/qemu_conf.c: Load & parse configuration params
         for cgroups
       * src/qemu_driver.c: Only use cgroups controllers that are activated,
         and use configured device whitelist instead of default, if set.
      f4c3acdf
    • D
      Use cgroups for block device whitelisting in QEMU guests · e88d638a
      Daniel P. Berrange 提交于
      * src/qemu_driver.c: Set a restrictive block device whitelist for
        all QEMU guests. Update whitelist when hotplugging disks.
      * src/cgroup.h, src/cgroup.c: Add some more convenience methods
        for dealing with block device whitelists.
      e88d638a
    • D
      Implement schedular tunables API using cgroups · 55bc5090
      Daniel P. Berrange 提交于
      * src/qemu_driver.c:  Add driver methods qemuGetSchedulerType,
        qemuGetSchedulerParameters, qemuSetSchedulerParameters
      * src/lxc_driver.c: Fix to use unsigned long long consistently
        for schedular parameters
      * src/cgroup.h, src/cgroup.c: Fix cpu_shares to take unsigned
        long long
      * src/util.c, src/util.h, src/libvirt_private.syms: Add a
        virStrToDouble helper
      * src/virsh.c: Fix handling of --set arg to schedinfo command
        to honour the designated data type of each schedular tunable
        as declared by the driver
      55bc5090
    • D
      Place every QEMU guest in a private cgroup · 38f6f47b
      Daniel P. Berrange 提交于
      * src/qemu_driver.c: Place guest in cgroup upon startup. Remove
        cgroup upon shutdown
      38f6f47b
    • D
      Refactor cgroups to allow a group per driver to be managed directly · 946c489c
      Daniel P. Berrange 提交于
      Allow the driver level cgroup to be managed explicitly by the
      hypervisor drivers, in order to detect whether to enable or
      disable cgroup support for domains. Provides better error
      reporting of failures. Also allow for creation of cgroups for
      unprivileged drivers if controller is accessible by the user.
      
      * src/cgroup.c, src/cgroup.h: Add an API to obtain a driver cgroup
      * src/lxc_conf.h, src/lxc_controller.c, src/lxc_driver.c:
        Obtain a driver cgroup at startup and use that instead of
        re-creating everytime.
      * src/util.c, src/util.h, src/libvirt_private.syms: Add a
        virGetUserName() helper
      946c489c
    • D
      Make cgroups a little more efficient · de1ecd53
      Daniel P. Berrange 提交于
      * src/cgroup.c: Detect the mount location of every controller at
        time a virCgroupPtr is created. Detect current process' placement
        within group to avoid assuming it is in the root. Pass controller
        ID into SetValueStr/GetValueStr to enable much duplicated code to
        be eliminated
      de1ecd53
    • L
      Add bare format string to printf-derivatives troubles · 165ed4a0
      Laine Stump 提交于
      * src/datatypes.c src/domain_conf.c src/interface_conf.c
        src/lxc_driver.c src/qemu_driver.c src/storage_backend.c src/virsh.c:
        add bare %s format string to printf-derivatives called with no format
        string
      165ed4a0
  4. 23 7月, 2009 9 次提交