1. 24 3月, 2011 1 次提交
    • E
      domain_conf: drop unused ref-count in snapshot object · e904ce3c
      Eric Blake 提交于
      The ref count was assigned to 1 at creation, then never modified again
      until it was decremented just before freeing the object.
      
      * src/conf/domain_conf.h (_virDomainSnapshotObj): Delete unused
      field.
      (virDomainSnapshotObjUnref): Delete unused prototype.
      * src/libvirt_private.syms: Likewise.
      * src/conf/domain_conf.c (virDomainSnapshotObjNew)
      (virDomainSnapshotObjListDataFree): Update users.
      (virDomainSnapshotObjUnref): Delete.
      e904ce3c
  2. 18 3月, 2011 1 次提交
  3. 18 2月, 2011 2 次提交
    • L
      Add txmode attribute to interface XML for virtio backend · e9bd5c0e
      Laine Stump 提交于
      This is in response to:
      
         https://bugzilla.redhat.com/show_bug.cgi?id=629662
      
      Explanation
      
      qemu's virtio-net-pci driver allows setting the algorithm used for tx
      packets to either "bh" or "timer". This is done by adding ",tx=bh" or
      ",tx=timer" to the "-device virtio-net-pci" commandline option.
      
      'bh' stands for 'bottom half'; when this is set, packet tx is all done
      in an iothread in the bottom half of the driver. (In libvirt, this
      option is called the more descriptive "iothread".)
      
      'timer' means that tx work is done in qemu, and if there is more tx
      data than can be sent at the present time, a timer is set before qemu
      moves on to do other things; when the timer fires, another attempt is
      made to send more data. (libvirt retains the name "timer" for this
      option.)
      
      The resulting difference, according to the qemu developer who added
      the option is:
      
          bh makes tx more asynchronous and reduces latency, but potentially
          causes more processor bandwidth contention since the cpu doing the
          tx isn't necessarily the cpu where the guest generated the
          packets.
      
      Solution
      
      This patch provides a libvirt domain xml knob to change the option on
      the qemu commandline, by adding a new attribute "txmode" to the
      <driver> element that can be placed inside any <interface> element in
      a domain definition. It's use would be something like this:
      
          <interface ...>
            ...
            <model type='virtio'/>
            <driver txmode='iothread'/>
            ...
          </interface>
      
      I chose to put this setting as an attribute to <driver> rather than as
      a sub-element to <tune> because it is specific to the virtio-net
      driver, not something that is generally usable by all network drivers.
      (note that this is the same placement as the "driver name=..."
      attribute used to choose kernel vs. userland backend for the
      virtio-net driver.)
      
      Actually adding the tx=xxx option to the qemu commandline is only done
      if the version of qemu being used advertises it in the output of
      
          qemu -device virtio-net-pci,?
      
      If a particular txmode is requested in the XML, and the option isn't
      listed in that help output, an UNSUPPORTED_CONFIG error is logged, and
      the domain fails to start.
      e9bd5c0e
    • L
      Restructure domain struct interface "driver" data for easier expansion · b670a412
      Laine Stump 提交于
      When the <driver> element (and its "name" attribute) was added to the
      domain XML's interface element, a "backend" enum was simply added to
      the toplevel of the virDomainNetDef struct.
      
      Ignoring the naming inconsistency ("name" vs. "backend"), this is fine
      when there's only a single item contained in the driver element of the
      XML, but doesn't scale well as we add more attributes that apply to
      the backend of the virtio-net driver, or add attributes applicable to
      other drivers.
      
      This patch changes virDomainNetDef in two ways:
      
      1) Rename the item in the struct from "backend" to "name", so that
         it's the same in the XML and in the struct, hopefully avoiding
         confusion for someone unfamiliar with the function of the
         attribute.
      
      2) Create a "driver" union within virDomainNetDef, and a "virtio"
         struct in that struct, which contains the "name" enum value.
      
      3) Move around the virDomainNetParse and virDomainNetFormat functions
         to allow for simple plugin of new attributes without disturbing
         existing code. (you'll note that this results in a seemingly
         redundant if() in the format function, but that will no longer be
         the case as soon as a 2nd attribute is added).
      
      In the future, new attributes for the virtio driver backend can be
      added to the "virtio" struct, and any other network device backend that
      needs an attribute will have its own struct added to the "driver"
      union.
      b670a412
  4. 09 2月, 2011 1 次提交
  5. 05 2月, 2011 1 次提交
    • E
      smartcard: add spicevmc support · 79f9267f
      Eric Blake 提交于
      Adds <smartcard mode='passthrough' type='spicevmc'/>, which uses the
      new <channel name='smartcard'/> of <graphics type='spice'>.
      
      * docs/schemas/domain.rng: Support new XML.
      * docs/formatdomain.html.in: Document it.
      * src/conf/domain_conf.h (virDomainGraphicsSpiceChannelName): New
      enum value.
      (virDomainChrSpicevmcName): New enum.
      (virDomainChrSourceDef): Distinguish spicevmc types.
      * src/conf/domain_conf.c (virDomainGraphicsSpiceChannelName): Add
      smartcard.
      (virDomainSmartcardDefParseXML): Parse it.
      (virDomainChrDefParseXML, virDomainSmartcardDefParseXML): Set
      spicevmc name.
      (virDomainChrSpicevmc): New enum conversion functions.
      * src/libvirt_private.syms: Export new functions.
      * src/qemu/qemu_command.c (qemuBuildChrChardevStr): Conditionalize
      name.
      * tests/qemuxml2argvtest.c (domain): New test.
      * tests/qemuxml2argvdata/qemuxml2argv-smartcard-passthrough-spicevmc.args:
      New file.
      * tests/qemuxml2argvdata/qemuxml2argv-smartcard-passthrough-spicevmc.xml:
      Likewise.
      79f9267f
  6. 04 2月, 2011 3 次提交
    • D
      spicevmc: support new qemu chardev · be87a123
      Daniel P. Berrange 提交于
      Inspired by https://bugzilla.redhat.com/show_bug.cgi?id=615757
      
      Add a new character device backend for virtio serial channels that
      activates the QEMU spice agent on the main channel using the vdagent
      spicevmc connection.  The <target> must be type='virtio', and supports
      an optional name that specifies how the guest will see the channel
      (for now, name must be com.redhat.spice.0).
      
      <channel type='spicevmc'>
        <target type='virtio'/>
        <address type='virtio-serial' controller='1' bus='0' port='3'/>
      </channel>
      
      * docs/schemas/domain.rng: Support new XML.
      * docs/formatdomain.html.in: Document it.
      * src/conf/domain_conf.h (virDomainChrType): New enum value.
      * src/conf/domain_conf.c (virDomainChr): Add spicevmc.
      (virDomainChrDefParseXML, virDomainChrSourceDefParseXML)
      (virDomainChrDefParseTargetXML): Parse and enforce proper use.
      (virDomainChrSourceDefFormat, virDomainChrDefFormat): Format.
      * src/qemu/qemu_command.c (qemuBuildChrChardevStr)
      (qemuBuildCommandLine): Add qemu support.
      * tests/qemuxml2argvtest.c (domain): New test.
      * tests/qemuxml2argvdata/qemuxml2argv-channel-spicevmc.xml: New
      file.
      * tests/qemuxml2argvdata/qemuxml2argv-channel-spicevmc.args:
      Likewise.
      Signed-off-by: NEric Blake <eblake@redhat.com>
      be87a123
    • E
      smartcard: add domain conf support · c1be1a2e
      Eric Blake 提交于
      * src/conf/domain_conf.h (virDomainSmartcardType): New enum.
      (virDomainSmartcardDef, virDomainDeviceCcidAddress): New structs.
      (virDomainDef): Include smartcards.
      (virDomainSmartcardDefIterator): New typedef.
      (virDomainSmartcardDefFree, virDomainSmartcardDefForeach): New
      prototypes.
      (virDomainControllerType, virDomainDeviceAddressType): Add ccid
      enum values.
      (virDomainDeviceInfo): Add ccid address type.
      * src/conf/domain_conf.c (virDomainSmartcard): Convert between
      enum and string.
      (virDomainSmartcardDefParseXML, virDomainSmartcardDefFormat)
      (virDomainSmartcardDefFree, virDomainDeviceCcidAddressParseXML)
      (virDomainDefMaybeAddSmartcardController): New functions.
      (virDomainDefParseXML): Parse the new XML.
      (virDomainDefFormat): Convert back to XML.
      (virDomainDefFree): Clean up.
      (virDomainDeviceInfoIterate): Iterate over passthrough aliases.
      (virDomainController, virDomainDeviceAddress)
      (virDomainDeviceInfoParseXML, virDomainDeviceInfoFormat)
      (virDomainDefAddImplicitControllers): Support new values.
      * src/libvirt_private.syms (domain_conf.h): New exports.
      * cfg.mk (useless_free_options): List new function.
      c1be1a2e
    • J
      Support booting from hostdev devices · 83e335f9
      Jiri Denemark 提交于
      83e335f9
  7. 29 1月, 2011 1 次提交
  8. 25 1月, 2011 1 次提交
    • C
      qemu: sound: Support intel 'ich6' model · 6cabc0b0
      Cole Robinson 提交于
      In QEMU, the card itself is a PCI device, but it requires a codec
      (either -device hda-output or -device hda-duplex) to actually output
      sound. Specifying <sound model='ich6'/> gives us -device intel-hda
      -device hda-duplex I think it's important that a simple <sound model='ich6'/>
      sets up a useful codec, to have consistent behavior with all other sound cards.
      
      This is basically Dan's proposal of
      
          <sound model='ich6'>
              <codec type='output' slot='0'/>
              <codec type='duplex' slot='3'/>
          </sound>
      
      without the codec bits implemented.
      
      The important thing is to keep a consistent API here, we don't want some
      <sound> devs require tweaking codecs but not others. Steps I see to
      accomplishing this:
      
          - every <sound> device has a <codec type='default'/> (unless codecs are
              manually specified)
          - <codec type='none'/> is required to specify 'no codecs'
          - new audio settings like mic=on|off could then be exposed in
              <sound> or <codec> in a consistent manner for all sound models
      
      v2:
          Use model='ich6'
      
      v3:
          Use feature detection, from eblake
          Set codec id, bus, and cad values
      
      v4:
          intel-hda isn't supported if -device isn't available
      
      v5:
          Comment spelling fixes
      6cabc0b0
  9. 22 1月, 2011 2 次提交
    • C
      qemu: Allow serving VNC over a unix domain socket · 1d9c0a08
      Cole Robinson 提交于
      QEMU supports serving VNC over a unix domain socket rather than traditional
      TCP host/port. This is specified with:
      
      <graphics type='vnc' socket='/foo/bar/baz'/>
      
      This provides better security access control than VNC listening on
      127.0.0.1, but will cause issues with tools that rely on the lax security
      (virt-manager in fedora runs as regular user by default, and wouldn't be
      able to access a socket owned by 'qemu' or 'root').
      
      Also not currently supported by any clients, though I have patches for
      virt-manager, and virt-viewer should be simple to update.
      
      v2:
          schema: Make listen vs. socket a <choice>
      1d9c0a08
    • C
      qemu: Set domain def transient at beginning of startup process · cb4c2694
      Cole Robinson 提交于
      This will allow us to record transient runtime state in vm->def, like
      default VNC parameters. Accomplish this by adding an extra 'live' parameter
      to SetDefTransient, with similar semantics to the 'live' flag for
      AssignDef.
      cb4c2694
  10. 18 1月, 2011 1 次提交
    • J
      Introduce per-device boot element · 94234fa2
      Jiri Denemark 提交于
      Currently, boot order can be specified per device class but there is no
      way to specify exact disk/NIC device to boot from.
      
      This patch adds <boot order='N'/> element which can be used inside
      <disk/> and <interface/>. This is incompatible with the older os/boot
      element. Since not all hypervisors support per-device boot
      specification, new deviceboot flag is included in capabilities XML for
      hypervisors which understand the new boot element. Presence of the flag
      allows (but doesn't require) users to use the new style boot order
      specification.
      94234fa2
  11. 15 1月, 2011 4 次提交
    • L
      Enable tuning of qemu network tap device "sndbuf" size · fe053dbe
      Laine Stump 提交于
      This is in response to a request in:
      
         https://bugzilla.redhat.com/show_bug.cgi?id=665293
      
      In short, under heavy load, it's possible for qemu's networking to
      lock up due to the tap device's default 1MB sndbuf being
      inadequate. adding "sndbuf=0" to the qemu commandline -netdevice
      option will alleviate this problem (sndbuf=0 actually sets it to
      0xffffffff).
      
      Because we must be able to explicitly specify "0" as a value, the
      standard practice of "0 means not specified" won't work here. Instead,
      virDomainNetDef also has a sndbuf_specified, which defaults to 0, but
      is set to 1 if some value was given.
      
      The sndbuf value is put inside a <tune> element of each <interface> in
      the domain. The intent is that further tunable settings will also be
      placed inside this element.
      
           <interface type='network'>
             ...
             <tune>
               <sndbuf>0</sndbuf>
             ...
             </tune>
           </interface>
      fe053dbe
    • L
      Add XML config switch to enable/disable vhost-net support · 175077fd
      Laine Stump 提交于
      This patch is in response to
      
        https://bugzilla.redhat.com/show_bug.cgi?id=643050
      
      The existing libvirt support for the vhost-net backend to the virtio
      network driver happens automatically - if the vhost-net device is
      available, it is always enabled, otherwise the standard userland
      virtio backend is used.
      
      This patch makes it possible to force whether or not vhost-net is used
      with a bit of XML. Adding a <driver> element to the interface XML, eg:
      
           <interface type="network">
             <model type="virtio"/>
             <driver name="vhost"/>
      
      will force use of vhost-net (if it's not available, the domain will
      fail to start). if driver name="qemu", vhost-net will not be used even
      if it is available.
      
      If there is no <driver name='xxx'/> in the config, libvirt will revert
      to the pre-existing automatic behavior - use vhost-net if it's
      available, and userland backend if vhost-net isn't available.
      175077fd
    • E
      qemu: move monitor device out of domain_conf common code · 30b9e608
      Eric Blake 提交于
      * src/conf/domain_conf.h (virDomainChrDeviceType): Drop monitor.
      * src/conf/domain_conf.c (virDomainChrDevice)
      (virDomainChrDefParseTargetXML, virDomainChrDefFormat): Drop
      monitor support.
      * src/qemu/qemu_command.h (qemuBuildCommandLine): Alter signature.
      * src/qemu/qemu_monitor.h (qemuMonitorOpen): Likewise.
      * src/qemu/qemu_domain.h (_qemuDomainObjPrivate): Change type of
      monConfig.
      * src/qemu/qemu_domain.c (qemuDomainObjPrivateFree)
      (qemuDomainObjPrivateXMLFormat, qemuDomainObjPrivateXMLParse):
      Adjust to type change.
      * src/qemu/qemu_command.c (qemuBuildCommandLine): Likewise.
      * src/qemu/qemu_driver.c (qemuPrepareMonitorChr)
      (qemudStartVMDaemon, qemuDomainXMLToNative, qemuConnectMonitor)
      (qemudShutdownVMDaemon): Likewise.
      * src/qemu/qemu_hotplug.c (qemuDomainAttachNetDevice): Likewise.
      * src/qemu/qemu_monitor.c (qemuMonitorOpen): Likewise.
      * tests/qemuxml2argvtest.c (testCompareXMLToArgvFiles): Likewise.
      30b9e608
    • 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
  12. 14 1月, 2011 1 次提交
    • J
      Add HAP to virDomainFeature enum · 48a5dccd
      Jim Fehlig 提交于
      Extend the virDomainFeature enumeration to include HAP (hardware
      assisted paging) feature.
      
      Hardware features such as Extended Page Table and Nested Page
      Table augment hypervisor software techniques such as shadow
      page table.  Adding HAP to the virDomainFeature enumeration
      allows users to select between hardware and software memory
      management mechanisms for their guests.
      48a5dccd
  13. 10 12月, 2010 3 次提交
    • J
      qemu: Add RBD support and some network disk fixes · 85400fb9
      Josh Durgin 提交于
      Changes common to all network disks:
      -Make source name optional in the domain schema, since NBD doesn't use it
      -Add a hostName type to the domain schema, and use it instead of genericName, which doesn't include .
      -Don't leak host names or ports
      -Set the source protocol in qemuParseCommandline
      Signed-off-by: NJosh Durgin <joshd@hq.newdream.net>
      85400fb9
    • M
      add network disk support · 036ad505
      MORITA Kazutaka 提交于
      This patch adds network disk support to libvirt/QEMU.  The currently
      supported protocols are nbd, rbd, and sheepdog.  The XML syntax is like
      this:
      
          <disk type="network" device="disk">
            <driver name="qemu" type="raw" />
            <source protocol='rbd|sheepdog|nbd' name="...some image identifier...">
              <host name="mon1.example.org" port="6000">
              <host name="mon2.example.org" port="6000">
              <host name="mon3.example.org" port="6000">
            </source>
            <target dev="vda" bus="virtio" />
          </disk>
      Signed-off-by: NMORITA Kazutaka <morita.kazutaka@lab.ntt.co.jp>
      036ad505
    • H
      Add a watchdog action `dump' · e19cdbfc
      Hu Tao 提交于
      `dump' watchdog action lets libvirtd to dump the guest when receives a
      watchdog event (which probably means a guest crash)
      
      Currently only qemu is supported.
      e19cdbfc
  14. 24 11月, 2010 1 次提交
    • O
      virDomainIsUpdated: define the new public API · 347d73f2
      Osier Yang 提交于
      introduce new public API "virDomainIsUpdated"
      
      * src/conf/domain_conf.h (new member "updated" for "virDomainObj")
      * src/libvirt_public.syms
      * include/libvirt/libvirt.h.in
      347d73f2
  15. 23 11月, 2010 2 次提交
    • C
      qemu: setvcpus: Simplify altering the persistent config · 39b62654
      Cole Robinson 提交于
      Do this by adding a helper function to get the persistent domain config. This
      should be useful for other functions that may eventually want to alter
      the persistent domain config (attach/detach device). Also make similar changes
      to the test drivers setvcpus command.
      
      A caveat is that the function will return the running config for a transient
      domain, rather than error. This simplifies callers, as long as they use
      other methods to ensure the guest is persistent.
      39b62654
    • C
      domain_conf: Add virDomainObjSetDefTransient · 08a72a7d
      Cole Robinson 提交于
      This function sets the running domain definition as transient, by reparsing
      the persistent config and assigning it to newDef. This ensures that any
      changes made to the running definition and not the persistent config are
      discarded when the VM is shutdown.
      08a72a7d
  16. 09 11月, 2010 5 次提交
    • 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
      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 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
    • 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
  17. 08 11月, 2010 3 次提交
    • D
      Add a sysinfo util module and read host info API · 778c0976
      Daniel Veillard 提交于
      Move existing routines about virSysinfoDef to an util module,
      add a new entry point virSysinfoRead() to read the host values
      with dmidecode
      
      * src/conf/domain_conf.c src/conf/domain_conf.h src/util/sysinfo.c
        src/util/sysinfo.h: move to a new module, add virSysinfoRead()
      * src/Makefile.am: handle the new module build
      * src/libvirt_private.syms: new internal symbols
      * include/libvirt/virterror.h src/util/virterror.c: defined a new
        error code for that module
      * po/POTFILES.in: add new file for translations
      778c0976
    • D
      Add smbios element to schema and configuration to HVM os · d528b52f
      Daniel Veillard 提交于
      the element has a mode attribute allowing only 3 values:
        - emulate: use the smbios emulation from the hypervisor
        - host: try to use the smbios values from the node
        - sysinfo: grab the values from the <sysinfo> fields
      
      * docs/schemas/domain.rng: extend the schemas
      * src/conf/domain_conf.h: add the flag to the domain config
      * src/conf/domain_conf.h: parse and serialize the smbios if present
      d528b52f
    • D
      Sysinfo parsing and saving to/from configuration files · ebb7a0dd
      Daniel Veillard 提交于
      * src/conf/domain_conf.h: defines a new internal type added to the
        domain structure
      * src/conf/domain_conf.c: parsing and serialization of that new type
      ebb7a0dd
  18. 20 10月, 2010 1 次提交
    • E
      vcpu: support maxvcpu in domain_conf · 4617eedf
      Eric Blake 提交于
      Although this patch adds a distinction between maximum vcpus and
      current vcpus in the XML, the values should be identical for all
      drivers at this point.  Only in subsequent per-driver patches will
      a distinction be made.
      
      In general, virDomainGetInfo should prefer the current vcpus.
      
      * src/conf/domain_conf.h (_virDomainDef): Adjust vcpus to unsigned
      short, to match virDomainGetInfo limit.  Add maxvcpus member.
      * src/conf/domain_conf.c (virDomainDefParseXML)
      (virDomainDefFormat): parse and print out vcpu details.
      * src/xen/xend_internal.c (xenDaemonParseSxpr)
      (xenDaemonFormatSxpr): Manage both vcpu numbers, and require them
      to be equal for now.
      * src/xen/xm_internal.c (xenXMDomainConfigParse)
      (xenXMDomainConfigFormat): Likewise.
      * src/phyp/phyp_driver.c (phypDomainDumpXML): Likewise.
      * src/openvz/openvz_conf.c (openvzLoadDomains): Likewise.
      * src/openvz/openvz_driver.c (openvzDomainDefineXML)
      (openvzDomainCreateXML, openvzDomainSetVcpusInternal): Likewise.
      * src/vbox/vbox_tmpl.c (vboxDomainDumpXML, vboxDomainDefineXML):
      Likewise.
      * src/xenapi/xenapi_driver.c (xenapiDomainDumpXML): Likewise.
      * src/xenapi/xenapi_utils.c (createVMRecordFromXml): Likewise.
      * src/esx/esx_vmx.c (esxVMX_ParseConfig, esxVMX_FormatConfig):
      Likewise.
      * src/qemu/qemu_conf.c (qemuBuildSmpArgStr)
      (qemuParseCommandLineSmp, qemuParseCommandLine): Likewise.
      * src/qemu/qemu_driver.c (qemudDomainHotplugVcpus): Likewise.
      * src/opennebula/one_conf.c (xmlOneTemplate): Likewise.
      4617eedf
  19. 14 10月, 2010 1 次提交
    • H
      new attribute accessmode to filesystem element · 75a6a9a8
      Harsh Prateek Bora 提交于
      This introduces new attribute to filesystem element
      to support customizable access mode for mount type.
      Valid accessmode are: passthrough, mapped and squash.
      
      Usage:
              <filesystem type='mount' accessmode='passthrough'>
                <source dir='/export/to/guest'/>
                <target dir='mount_tag'/>
              </filesystem>
      
      passthrough is the default model if not specified, that's
      also the current behaviour.
      75a6a9a8
  20. 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
  21. 02 10月, 2010 1 次提交
    • M
      esx: Add support for virtual serial device network backing · 02e11b83
      Matthias Bolte 提交于
      Since version 4.1 ESX(i) can expose virtual serial devices over TCP.
      
      Add support in the VMX handling code for this, add test cases to cover
      it and add links to some documentation.
      
      ESX supports two additional protocols: TELNETS and TLS. Add them to
      the list of serial-over-TCP protocols.
      02e11b83
  22. 25 8月, 2010 1 次提交
  23. 21 8月, 2010 1 次提交
    • J
      Add actions to virDomainLifecycle enum · b9c10268
      Jim Fehlig 提交于
      Xen supports on_crash actions coredump-{destroy,restart}.  libvirt
      cannot parse config returned by xend that contains either of these
      actions
      
      xen52 # xm li -l test | grep on_crash
          (on_crash coredump-restart)
      xen52 # virsh dumpxml test
      error: internal error unknown lifecycle type coredump-restart
      
      This patch adds a new virDomainLifecycleCrash enum and appends
      the new options to existing destroy, restart, preserve, and
      rename-restart options.
      b9c10268
  24. 11 8月, 2010 1 次提交
    • D
      allow memballoon type of none to desactivate it · 79c27a62
      Daniel Veillard 提交于
        The balloon device is automatically added to qemu guests if supported,
      but it may be useful to desactivate it. The simplest to not change the
      existing behaviour is to allow
        <memballoon type="none"/>
      as an extra option to desactivate it (it is automatically added if the
      memballoon construct is missing for the domain).
      The following simple patch just adds the extra option and does not
      change the default behaviour but avoid creating a balloon device if
      type="none" is used.
      
      * docs/schemas/domain.rng: add the extra type attribute value
      * src/conf/domain_conf.c src/conf/domain_conf.h: add the extra enum
        value
      * src/qemu/qemu_conf.c: if enum is NONE, don't activate the device,
        i.e. don't pass the args to qemu/kvm
      79c27a62