1. 11 5月, 2011 1 次提交
    • M
      Rename internal DumpXML functions to GetXMLDesc · 9817604a
      Matthias Bolte 提交于
      This matches the public API and helps to get rid of some special
      case code in the remote generator.
      
      Rename driver API functions and XDR protocol structs.
      
      No functional change included outside of the remote generator.
      9817604a
  2. 06 5月, 2011 1 次提交
    • E
      maint: rename virBufferVSprintf to virBufferAsprintf · 68ea80cf
      Eric Blake 提交于
      We already have virAsprintf, so picking a similar name helps for
      seeing a similar purpose.  Furthermore, the prefix V before printf
      generally implies 'va_list', even though this variant was '...', and
      the old name got in the way of adding a new va_list version.
      
      global rename performed with:
      
      $ git grep -l virBufferVSprintf \
        | xargs -L1 sed -i 's/virBufferVSprintf/virBufferAsprintf/g'
      
      then revert the changes in ChangeLog-old.
      68ea80cf
  3. 18 2月, 2011 1 次提交
    • L
      Allow brAddTap to create a tap device that is down · 13ae7a02
      Laine Stump 提交于
      An upcoming patch has a use for a tap device to be created that
      doesn't need to be actually put into the "up" state, and keeping it
      "down" keeps the output of ifconfig from being unnecessarily cluttered
      (ifconfig won't show down interfaces unless you add "-a").
      
      bridge.[ch]: add "up" as an arg to brAddTap()
      uml_conf.c, qemu_command.c: add "up" (set to "true") to brAddTap() call.
      13ae7a02
  4. 15 1月, 2011 1 次提交
    • E
      domain_conf: split source data out from ChrDef · 98334e7c
      Eric Blake 提交于
      This opens up the possibility of reusing the smaller ChrSourceDef
      for both qemu monitor and a passthrough smartcard device.
      
      * src/conf/domain_conf.h (_virDomainChrDef): Factor host
      details...
      (_virDomainChrSourceDef): ...into new struct.
      (virDomainChrSourceDefFree): New prototype.
      * src/conf/domain_conf.c (virDomainChrDefFree)
      (virDomainChrDefParseXML, virDomainChrDefFormat): Split...
      (virDomainChrSourceDefClear, virDomainChrSourceDefFree)
      (virDomainChrSourceDefParseXML, virDomainChrSourceDefFormat):
      ...into new functions.
      (virDomainChrDefParseTargetXML): Update clients to reflect type
      split.
      * src/vmx/vmx.c (virVMXParseSerial, virVMXParseParallel)
      (virVMXFormatSerial, virVMXFormatParallel): Likewise.
      * src/xen/xen_driver.c (xenUnifiedDomainOpenConsole): Likewise.
      * src/xen/xend_internal.c (xenDaemonParseSxprChar)
      (xenDaemonFormatSxprChr): Likewise.
      * src/vbox/vbox_tmpl.c (vboxDomainDumpXML, vboxAttachSerial)
      (vboxAttachParallel): Likewise.
      * src/security/security_dac.c (virSecurityDACSetChardevLabel)
      (virSecurityDACSetChardevCallback)
      (virSecurityDACRestoreChardevLabel)
      (virSecurityDACRestoreChardevCallback): Likewise.
      * src/security/security_selinux.c (SELinuxSetSecurityChardevLabel)
      (SELinuxSetSecurityChardevCallback)
      (SELinuxRestoreSecurityChardevLabel)
      (SELinuxSetSecurityChardevCallback): Likewise.
      * src/security/virt-aa-helper.c (get_files): Likewise.
      * src/lxc/lxc_driver.c (lxcVmStart, lxcDomainOpenConsole):
      Likewise.
      * src/uml/uml_conf.c (umlBuildCommandLineChr): Likewise.
      * src/uml/uml_driver.c (umlIdentifyOneChrPTY, umlIdentifyChrPTY)
      (umlDomainOpenConsole): Likewise.
      * src/qemu/qemu_command.c (qemuBuildChrChardevStr)
      (qemuBuildChrArgStr, qemuBuildCommandLine)
      (qemuParseCommandLineChr): Likewise.
      * src/qemu/qemu_domain.c (qemuDomainObjPrivateXMLFormat)
      (qemuDomainObjPrivateXMLParse): Likewise.
      * src/qemu/qemu_cgroup.c (qemuSetupChardevCgroup): Likewise.
      * src/qemu/qemu_hotplug.c (qemuDomainAttachNetDevice): Likewise.
      * src/qemu/qemu_driver.c (qemudFindCharDevicePTYsMonitor)
      (qemudFindCharDevicePTYs, qemuPrepareChardevDevice)
      (qemuPrepareMonitorChr, qemudShutdownVMDaemon)
      (qemuDomainOpenConsole): Likewise.
      * src/qemu/qemu_command.h (qemuBuildChrChardevStr)
      (qemuBuildChrArgStr): Delete, now that they are static.
      * src/libvirt_private.syms (domain_conf.h): New exports.
      * cfg.mk (useless_free_options): Update list.
      * tests/qemuxml2argvtest.c (testCompareXMLToArgvFiles): Update
      tests.
      98334e7c
  5. 03 12月, 2010 1 次提交
    • D
      uml: convert to virCommand · 98c379b3
      Daniel P. Berrange 提交于
      * src/uml/uml_conf.c (umlBuildCommandLineChr)
      (umlBuildCommandLine): Rewrite with virCommand.
      * src/uml/uml_conf.h (umlBuildCommandLine): Update signature.
      * src/uml/uml_driver.c (umlStartVMDaemon): Adjust caller.
      98c379b3
  6. 10 11月, 2010 1 次提交
    • 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
  7. 13 10月, 2010 1 次提交
    • N
      XML parsing for memory tunables · d390fce4
      Nikunj A. Dadhania 提交于
      Adding parsing code for memory tunables in the domain xml file
      also change the internal define structures used for domain memory
      informations
      Adds a new specific test
      d390fce4
  8. 10 9月, 2010 1 次提交
  9. 01 9月, 2010 1 次提交
    • S
      Explicitly pass uml_dir argument to user-mode-linux · 0a58eed3
      Soren Hansen 提交于
      uml_dir overrides user-mode-linux's default of ~/.uml. This is needed
      for a couple of different reasons:
      
      libvirt expects this to default to virGetUserDirectory(geteuid()) +
      '/.uml'. However, user-mode-linux actually uses the HOME environment
      variable to determine where to look for the uml sockets, but if running
      libvirtd under sudo (which I routinely do during development), $HOME is
      pointing at my user's homedir, while my euid is 0, so libvirt looks in
      /root.
      
      Also (and this was my actual motivation for this patch), if HOME isn't
      set at all, user-mode-linux utterly fails. Looking at the code, it seems
      it's meant to emit a warning, but alas, it doesn't for some reason.
      If running libvirtd from upstart, HOME is not set, so any system using
      upstart will need this change.
      Signed-off-by: NSoren Hansen <soren@linux2go.dk>
      0a58eed3
  10. 24 8月, 2010 1 次提交
  11. 15 8月, 2010 2 次提交
  12. 11 8月, 2010 2 次提交
  13. 29 7月, 2010 1 次提交
    • C
      domain conf: Track <console> target type · 6b247552
      Cole Robinson 提交于
      All <console> devices now export a <target> type attribute. QEMU defaults
      to 'serial', UML defaults to 'uml, xen can be either 'serial' or 'xen'
      depending on fullvirt. Understandably there is lots of test fallout.
      
      This will be used to differentiate between a serial vs. virtio console for
      QEMU.
      Signed-off-by: NCole Robinson <crobinso@redhat.com>
      6b247552
  14. 23 7月, 2010 1 次提交
    • D
      Set a stable & high MAC addr for guest TAP devices on host · 6ea90b84
      Daniel P. Berrange 提交于
      A Linux software bridge will assume the MAC address of the enslaved
      interface with the numerically lowest MAC addr. When the bridge
      changes MAC address there is a period of network blackout, so a
      change should be avoided. The kernel gives TAP devices a completely
      random MAC address. Occassionally the random TAP device MAC is lower
      than that of the physical interface (eth0, eth1etc) that is enslaved,
      causing the bridge to change its MAC.
      
      This change sets an explicit MAC address for all TAP devices created
      using the configured MAC from the XML, but with the high byte set
      to 0xFE. This should ensure TAP device MACs are higher than any
      physical interface MAC.
      
      * src/qemu/qemu_conf.c, src/uml/uml_conf.c: Pass in a MAC addr
        for the TAP device with high byte set to 0xFE
      * src/util/bridge.c, src/util/bridge.h: Set a MAC when creating
        the TAP device to override random MAC
      6ea90b84
  15. 26 5月, 2010 1 次提交
    • D
      Expose a host UUID in the capabilities XML · 60881161
      Daniel P. Berrange 提交于
      Allow for a host UUID in the capabilities XML. Local drivers
      will initialize this from the SMBIOS data. If a sanity check
      shows SMBIOS uuid is invalid, allow an override from the
      libvirtd.conf configuration file
      
      * daemon/libvirtd.c, daemon/libvirtd.conf: Support a host_uuid
        configuration option
      * docs/schemas/capability.rng: Add optional host uuid field
      * src/conf/capabilities.c, src/conf/capabilities.h: Include
        host UUID in XML
      * src/libvirt_private.syms: Export new uuid.h functions
      * src/lxc/lxc_conf.c, src/qemu/qemu_driver.c,
        src/uml/uml_conf.c: Set host UUID in capabilities
      * src/util/uuid.c, src/util/uuid.h: Support for host UUIDs
      * src/node_device/node_device_udev.c: Use the host UUID functions
      * tests/confdata/libvirtd.conf, tests/confdata/libvirtd.out: Add
        new host_uuid config option to test
      60881161
  16. 06 4月, 2010 1 次提交
  17. 27 3月, 2010 1 次提交
    • S
      Use enum of virDomainNetType · 9bcad690
      Stefan Berger 提交于
      To find out where the net type 'direct' needs to be handled I introduced
      the 'enum virDomainNetType' in the virDomainNetDef structure and let the
      compiler tell me where the case statement is missing. Then I added the
      unhandled device statement to the UML driver.
      
      * src/conf/domain_conf.h: change _virDomainNetDef type from int to
        virDomainNetType enum
      * src/conf/domain_conf.c src/lxc/lxc_driver.c src/qemu/qemu_conf.c
        src/uml/uml_conf.c: make sure all enum cases are properly handled
        in switches
      9bcad690
  18. 09 2月, 2010 2 次提交
  19. 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
  20. 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
  21. 21 9月, 2009 1 次提交
    • D
      Move UML driver to src/uml/ · c8b2f622
      Daniel P. Berrange 提交于
      * src/uml_conf.c, src/uml_conf.h, src/uml_driver.c,
        src/uml_driver.h: Move to src/uml/
      * daemon/qemud.c, src/Makefile.am: Adjust for changed paths
      c8b2f622
  22. 04 9月, 2009 1 次提交
  23. 18 8月, 2009 2 次提交
    • M
      Fix bridge/tap system error reporting · 3ec80d01
      Mark McLoughlin 提交于
      * src/qemu_conf.c, src/uml_conf.c: use virReportSystemError() to report
        system errors
      3ec80d01
    • M
      Don't expose 'vnet%d' to the user · 2b1f67d4
      Mark McLoughlin 提交于
      https://bugzilla.redhat.com/517371
      
      Matt Booth points out that if you use a non-existent bridge name when
      start a guest you get a weird error message:
      
        Failed to add tap interface 'vnet%d' to bridge 'virbr0'
      
      and dev='vnet%d' appears in the dumpxml output.
      
      Fix that by not including 'vnet%d' in the error message and freeing the
      'vnet%d' string if adding the tap device to the bridge fails.
      
      * src/qemu_conf.c, src/uml_conf.c: fix qemudNetworkIfaceConnect()
        and umlConnectTapDevice() to not expose 'vnet%d' to the user
      2b1f67d4
  24. 13 8月, 2009 1 次提交
    • D
      Make LXC / UML drivers robust against NUMA topology brokenness · 19bac57b
      Daniel P. Berrange 提交于
      Some kernel versions expose broken NUMA topology for some machines.
      This causes the LXC/UML drivers to fail to start. QEMU driver was
      already fixed for this problem
      
      * src/lxc_conf.c: Log and ignore failure to populate NUMA info
      * src/uml_conf.c: Log and ignore failure to populate NUMA info
      * src/capabilities.c: Reset nnumaCell to 0 after freeing
      19bac57b
  25. 29 7月, 2009 1 次提交
  26. 03 6月, 2009 2 次提交
  27. 29 1月, 2009 1 次提交
    • J
      error-reporting calls using VIR_ERR_NO_MEMORY: use virReportOOMError instead · bc18a91f
      Jim Meyering 提交于
      * src/uml_conf.c (VIR_FROM_THIS): Define to VIR_FROM_UML.
      * src/xs_internal.c (VIR_FROM_THIS): Define to VIR_FROM_XEN.
      * src/xml.c (VIR_FROM_THIS): Define to VIR_FROM_XML.
      * src/stats_linux.c (VIR_FROM_THIS): Define to VIR_FROM_STATS_LINUX.
      * src/datatypes.c (VIR_FROM_THIS): Define to VIR_FROM_NONE.
      * src/lxc_conf.c (VIR_FROM_THIS): Define to VIR_FROM_LXC.
      * src/libvirt.c (VIR_FROM_THIS): Define to VIR_FROM_NONE.
      * src/node_device_conf.c (VIR_FROM_THIS): Define to VIR_FROM_NODEDEV.
      * src/openvz_conf.c (VIR_FROM_THIS): Define to VIR_FROM_OPENVZ.
      * src/openvz_driver.c (VIR_FROM_THIS): Define to VIR_FROM_OPENVZ.
      * src/conf.c (VIR_FROM_THIS): Define to VIR_FROM_CONF.
      Note: this loses config_filename:config_lineno diagnostics,
      but that's ok.
      * src/node_device.c (VIR_FROM_THIS): Define to VIR_FROM_NODEDEV.
      * src/sexpr.c (VIR_FROM_THIS): Define to VIR_FROM_SEXPR.
      * po/POTFILES.in: remove src/sexpr.c and src/lxc_conf.c
      bc18a91f
  28. 23 12月, 2008 1 次提交
  29. 22 12月, 2008 2 次提交
    • D
      * src/uml_conf.c: another logging conversion · 0d575be4
      Daniel Veillard 提交于
      daniel
      0d575be4
    • J
      make NUMA-initialization code more portable and more robust · d010b689
      Jim Meyering 提交于
      qemudCapsInitNUMA and umlCapsInitNUMA were identical, so this change
      factors them into a new function, virCapsInitNUMA, and puts it in
      nodeinfo.c.
      
      In addition to factoring out the duplicates, this change also
      adjusts that function definition (along with its macros) so
      that it works with Fedora 9's numactl version 1, and makes it
      so the code will work even if someone builds the kernel with
      CONFIG_NR_CPUS > 4096.
      
      Finally, also perform this NUMA initialization for the lxc
      and openvz drivers.
      
      * src/nodeinfo.c: Include <stdint.h>, <numa.h> and "memory.h".
      (virCapsInitNUMA): Rename from qemudCapsInitNUMA and umlCapsInitNUMA.
      (NUMA_MAX_N_CPUS): Define depending on NUMA API version.
      (n_bits, MASK_CPU_ISSET): Define, adjust, use uint64 rather than long.
      * src/nodeinfo.h: Include "capabilities.h".
      (virCapsInitNUMA): Declare it.
      * examples/domain-events/events-c/Makefile.am:
      * src/Makefile.am: Add $(NUMACTL_CFLAGS) and $(NUMACTL_LIBS) to various
      compile/link-related variables.
      * src/qemu_conf.c: Include "nodeinfo.h".
      (qemudCapsInitNUMA): Remove duplicate code.  Adjust caller.
      * src/uml_conf.c (umlCapsInitNUMA): Likewise.
      Include "nodeinfo.h".
      * src/lxc_conf.c: Include "nodeinfo.h".
      (lxcCapsInit): Perform NUMA initialization here, too.
      * src/openvz_conf.c (openvzCapsInit): And here.
      Include "nodeinfo.h".
      * src/libvirt_sym.version.in: Add virCapsInitNUMA so that libvirtd
      can link to this function.
      d010b689
  30. 17 12月, 2008 1 次提交
    • J
      fix numa-related (and kernel-dependent) test failures · 7e6a06ae
      Jim Meyering 提交于
      This change is required on some kernels due to the way a change in
      the kernel's CONFIG_NR_CPUS propagates through the numa library.
      * src/qemu_conf.c (qemudCapsInitNUMA): Pass numa_all_cpus_ptr->size/8
      as the buffer-length-in-bytes in the call to numa_node_to_cpus, since
      that's what is required on second and subseqent calls.
      * src/uml_conf.c (umlCapsInitNUMA): Likewise.
      7e6a06ae
  31. 12 12月, 2008 1 次提交
  32. 28 11月, 2008 1 次提交
  33. 20 11月, 2008 1 次提交