1. 20 10月, 2010 3 次提交
    • J
      Add process= support for 'qemu-kvm -name' · c08c7b01
      John Morrissey 提交于
      This sets the process name to the same value as the Windows title,
      but since the name is limited to 16 chars only this is kept as a
      configuration option and turned off by default
      * src/qemu/qemu.conf src/qemu/qemu_conf.[ch]: hceck for support in the
        QEmu help output, add the option in qemu conf file and augment
        qemudBuildCommandLine to add it if switched on
      * src/qemu/libvirtd_qemu.aug src/qemu/test_libvirtd_qemu.aug: augment
        the augeas lenses accordingly
      * tests/qemuhelptest.c: cope with the extra flag being detected now
      c08c7b01
    • E
      vcpu: improve vcpu support in qemu command line · d67c189e
      Eric Blake 提交于
      * src/qemu/qemu_conf.c (qemuParseCommandLineSmp): Distinguish
      between vcpus and maxvcpus, for new enough qemu.
      * tests/qemuargv2xmltest.c (mymain): Add new test.
      * tests/qemuxml2argvtest.c (mymain): Likewise.
      * tests/qemuxml2xmltest.c (mymain): Likewise.
      * tests/qemuxml2argvdata/qemuxml2argv-smp.args: New file.
      d67c189e
    • 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
  2. 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
  3. 13 10月, 2010 4 次提交
    • D
      Enable support for nested SVM · f98a6cd6
      Daniel P. Berrange 提交于
      This enables support for nested SVM using the regular CPU
      model/features block. If the CPU model or features include
      'svm', then the '-enable-nesting' flag will be added to the
      QEMU command line. Latest out of tree patches for nested
      'vmx', no longer require the '-enable-nesting' flag. They
      instead just look at the cpu features. Several of the models
      already include svm support, but QEMU was just masking out
      the svm bit silently. So this will enable SVM on such
      models
      
      * src/qemu/qemu_conf.h: flag for -enable-nesting
      * src/qemu/qemu_conf.c: Use -enable-nesting if VMX or SVM are in
        the CPUID
      * src/cpu/cpu.h, src/cpu/cpu.c: API to check for a named feature
      * src/cpu/cpu_x86.c: x86 impl of feature check
      * src/libvirt_private.syms: Add cpuHasFeature
      * src/qemuhelptest.c: Add nesting flag where required
      f98a6cd6
    • D
      Implement support for virtio plan9fs filesystem passthrough in QEMU · a5c646a7
      Daniel P. Berrange 提交于
      Make use of the existing <filesystem> element to support plan9fs
      filesystem passthrough in the QEMU driver
      
          <filesystem type='mount'>
            <source dir='/export/to/guest'/>
            <target dir='/import/from/host'/>
          </filesystem>
      
      NB, the target is not actually a directory, it is merely a arbitrary
      string tag that is exported to the guest as a hint for where to mount
      it.
      a5c646a7
    • N
      Adding memtunables to qemuSetupCgroup · 261ad74e
      Nikunj A. Dadhania 提交于
      QEmu startup will pick up the memory tunables specified in the domain
      configuration file
      261ad74e
    • 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
  4. 12 10月, 2010 1 次提交
  5. 10 9月, 2010 1 次提交
    • D
      Fix off-by-1 in QEMU boot arg array handling · 48ab2099
      Daniel P. Berrange 提交于
      A QEMU guest can have upto VIR_DOMAIN_BOOT_LAST boot entries
      defined. When building the QEMU arg, each entry takes a
      single byte. This means the array must be declared to be
      VIR_DOMAIN_BOOT_LAST+1 bytes in length to allow for the
      trailing null
      
      * src/qemu/qemu_conf.c: Fix off-by-1 boot arg array size
      48ab2099
  6. 23 8月, 2010 1 次提交
    • D
      Add support for -enable-kqemu flag · 6e44ec7a
      Daniel P. Berrange 提交于
      Previously QEMU enabled KQEMU by default and had -no-kqemu.
      0.11.x switched to requiring -enable-kqemu. 0.12.x dropped
      kqemu entirely. This patch adds support for -enable-kqemu
      so 0.11.x works. It replaces a huge set of if() with a
      switch() to make the code a bit more readable.
      
      * src/qemu/qemu_conf.c, src/qemu/qemu_conf.h: Support
        -enable-kqemu
      6e44ec7a
  7. 20 8月, 2010 2 次提交
  8. 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
  9. 06 8月, 2010 2 次提交
  10. 05 8月, 2010 1 次提交
    • D
      Do not use boot=on on IDE device · 634ea3fa
      Daniel Veillard 提交于
      the followup on the boot=on problem, basically it's not needed to
      specify it when booting out of IDE devices when using KVM
      * src/qemu/qemu_conf.c: do not use boot=on for IDE devices
      * tests/qemuxml2argvdata/qemuxml2argv*.args: this changes the output
        for 5 of the tests
      634ea3fa
  11. 04 8月, 2010 1 次提交
    • J
      qemu: Fix PCI address allocation · bf0bf4e7
      Jiri Denemark 提交于
      Patch version revamped by Eric Blake <eblake@redhat.com> of Jiri
      Denemark <jdenemar@redhat.com> original patch
      
      When attaching a PCI device which doesn't explicitly set its PCI
      address, libvirt allocates the address automatically. The problem is
      that when checking which PCI address is unused, we only check for those
      with slot number higher than the highest slot number ever used.
      
      Thus attaching/detaching such device several times in a row (31 is the
      theoretical limit, less then 30 tries are enough in practise) makes any
      further device attachment fail. Furthermore, attaching a device with
      predefined PCI address to 0:0:31 immediately forbids attachment of any
      PCI device without explicit address.
      
      This patch changes the logic so that we always check all PCI addresses
      before we say there is no PCI address available.
      
      Modifications from v1: revert back to remembering the last slot
      reserved, but allow wraparound to not be limited by the end.
      In this way, slots are still assigned in the same order as
      before the patch, rather than filling in the gaps closest to
      0 and risking making windows guests mad.
      
      * src/qemu/qemu_conf.c: fix pci reservation code to do a round-robbin
        check of all available PCI splot availability before failing.
      bf0bf4e7
  12. 30 7月, 2010 2 次提交
    • D
      Do not activate boot=on on devices when not using KVM · e7da8722
      Daniel Veillard 提交于
        Basically the 'boot=on' boot selection device is something present in
      KVM but not in upstream QEmu, as a result if we boot a QEmu domain
      without KVM acceleration we must disable boot=on ... even if the front
      end kvm binary expose that capability in the help page.
      
      * src/qemu/qemu_conf.c: in qemudBuildCommandLine if -no-kvm
        is passed, then deactivate QEMUD_CMD_FLAG_DRIVE_BOOT
      e7da8722
    • C
      Fix a memory leak in the qemudBuildCommandLine. · 4313e1b9
      Chris Lalancette 提交于
      ADD_ARG_LIT should only be used for literal arguments,
      since it duplicates the memory.  Since virBufferContentAndReset
      is already allocating memory, we should only use ADD_ARG.
      Signed-off-by: NChris Lalancette <clalance@redhat.com>
      4313e1b9
  13. 29 7月, 2010 4 次提交
  14. 28 7月, 2010 3 次提交
    • D
      Invert logic for checking for QEMU disk cache options · 9749d94f
      Daniel P. Berrange 提交于
      QEMU has had two different syntax for disk cache options
      
       Old: on|off
       New: writeback|writethrough|none
      
      QEMU recently added another 'unsafe' option which broke the
      libvirt check. We can avoid this & future breakage, if we
      do a negative check for the old syntax, instead of a positive
      check for the new syntax
      
      * src/qemu/qemu_conf.c: Invert cache option check
      9749d94f
    • C
      qemu: Allow setting boot menu on/off · 4f24ca01
      Cole Robinson 提交于
      Add a new element to the <os> block:
      
        <bootmenu enable="yes|no"/>
      
      Which maps to -boot,menu=on|off on the QEMU command line.
      
      I decided to use an explicit 'enable' attribute rather than just make the
      bootmenu element boolean. This allows us to treat lack of a bootmenu element
      as 'use hypervisor default'.
      4f24ca01
    • C
      qemu: Error on unsupported graphics config · 6fe9025e
      Cole Robinson 提交于
      Throw an explicit error if multiple graphics devices are specified, or
      an unsupported type is specified (rdp).
      6fe9025e
  15. 24 7月, 2010 2 次提交
    • C
      Handle arbitrary qemu command-lines in qemuParseCommandLine. · ae027de3
      Chris Lalancette 提交于
      Now that we have the ability to specify arbitrary qemu
      command-line parameters in the XML, use it to handle unknown
      command-line parameters when doing a native-to-xml conversion.
      
      Changes since v1:
       - Rename num_extra to num_args
       - Fix up a memory leak on an error path
      
      Changes since v2:
       - Add a VIR_WARN when adding the argument via qemu:arg
      
      Changes since v3:
       - None
      Signed-off-by: NChris Lalancette <clalance@redhat.com>
      ae027de3
    • C
      Qemu arbitrary command-line arguments. · 869939a5
      Chris Lalancette 提交于
      Implement the qemu hooks for XML namespace data.  This
      allows us to specify a qemu XML namespace, and then
      specify:
      
      <qemu:commandline>
       <qemu:arg value='arg'/>
       <qemu:env name='name' value='value'/>
      </qemu:commandline>
      
      In the domain XML.
      
      Changes since v1:
       - Change the <qemu:arg>arg</qemu:arg> XML to <qemu:arg value='arg'/> XML
       - Fix up some memory leaks in qemuDomainDefNamespaceParse
       - Rename num_extra and extra to num_args and args, respectively
       - Fixed up some error messages
       - Make sure to escape user-provided data in qemuDomainDefNamespaceFormatXML
      
      Changes since v2:
       - Add checking to ensure environment variable names are valid
       - Invert the logic in qemuDomainDefNamespaceFormatXML to return early
      
      Changes since v3:
       - Change strspn() to c_isalpha() check of first letter of environment variable
      Signed-off-by: NChris Lalancette <clalance@redhat.com>
      869939a5
  16. 23 7月, 2010 2 次提交
    • 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
    • D
      Fix PCI address assignment if no IDE controller is present · 020d2204
      Daniel P. Berrange 提交于
      The PCI slot 1 must be reserved at all times, since PIIX3 is
      always present, even if no IDE device is in use for guest disks
      
      * src/qemu/qemu_conf.c: Always reserve slot 1 for PIIX3
      020d2204
  17. 21 7月, 2010 4 次提交
    • D
      Re-arrange PCI device address assignment to match QEMU's default · 0e308c2c
      Daniel P. Berrange 提交于
      To try and ensure that people upgrading from old QEMU get guests
      with the same PCI device ordering, change the way we assign addrs
      to match QEMU's default order. This should make Windows less
      annoyed.
      
      * src/qemu/qemu_conf.c: Follow QEMU's default PCI ordering
        logic when assigning addresses
      * tests/*.args: Update for changed PCI addresses
      0e308c2c
    • D
      Explicitly represent balloon device in XML and handle PCI address · b2f18635
      Daniel P. Berrange 提交于
      To allow compatibility with older QEMU PCI device slot assignment
      it is necessary to explicitly track the balloon device in the
      XML. This introduces a new device
      
         <memballoon model='virtio|xen'/>
      
      It can also have a PCI address, auto-assigned if necessary.
      
      The memballoon will be automatically added to all Xen and QEMU
      guests by default.
      
      * docs/schemas/domain.rng: Add <memballoon> element
      * src/conf/domain_conf.c, src/conf/domain_conf.h: parsing
        and formatting for memballoon device. Always add a memory
        balloon device to Xen/QEMU if none exists in XML
      * src/libvirt_private.syms: Export memballoon model APIs
      * src/qemu/qemu_conf.c, src/qemu/qemu_conf.h: Honour the
        PCI device address in memory balloon device
      * tests/*: Update to test new functionality
      b2f18635
    • D
      Rearrange VGA/IDE controller address reservation · ccd2c82e
      Daniel P. Berrange 提交于
      The first VGA and IDE devices need to have fixed PCI address
      reservations. Currently this is handled inline with the other
      non-primary VGA/IDE devices. The fixed virtio balloon device
      at slot 3, ensures auto-assignment skips the slots 1/2. The
      virtio address will shortly become configurable though. This
      means the reservation of fixed slots needs to be done upfront
      to ensure that they don't get re-used for other devices.
      
      This is more or less reverting the previous changeset:
      
        commit 83acdeaf
        Author: Daniel P. Berrange <berrange@redhat.com>
        Date:   Wed Feb 3 16:11:29 2010 +0000
      
        Fix restore of QEMU guests with PCI device reservation
      
      The difference is that this time, instead of unconditionally
      reserving the address, we only reserve the address if it was
      initially type=none. Addresses of type=pci were handled
      earlier in process by qemuDomainPCIAddressSetCreate(). This
      ensures restore step doesn't have problems
      
      * src/qemu/qemu_conf.c: Reserve first VGA + IDE address
        upfront
      ccd2c82e
    • D
      Remove inappropriate use of VIR_ERR_NO_SUPPORT · 021251bd
      Daniel P. Berrange 提交于
      The VIR_ERR_NO_SUPPORT refers to an API which is not implemented.
      There is a separate VIR_ERR_CONFIG_UNSUPPORTED for XML config
      options that are not available with the current hypervisor.
      
      * src/qemu/qemu_conf.c, src/qemu/qemu_driver.c: Remove
        many VIR_ERR_NO_SUPPORT replace with VIR_ERR_CONFIG_UNSUPPORTED
      021251bd
  18. 20 7月, 2010 1 次提交
  19. 13 7月, 2010 1 次提交
  20. 02 7月, 2010 1 次提交
  21. 25 6月, 2010 1 次提交
    • L
      Check for presence of qemu -nodefconfig option before using it · 7d02393b
      Laine Stump 提交于
      We previously assumed that if the -device option existed in qemu, that
      -nodefconfig would also exist. It turns out that isn't the case, as
      demonstrated by qemu-kvm-0.12.3 in Fedora 13.
      
      */src/qemu/qemu_conf.[hc] - add a new QEMUD_CMD_FLAG, set it via the
                                  help output, and check it before adding
                                  -nodefconfig to the qemu commandline.
      7d02393b
  22. 24 6月, 2010 1 次提交
    • M
      Add wide SCSI bus disk address generation support · f8f29b1f
      Matthias Bolte 提交于
      The domain XML parsing code autogenerates disk address and
      controller elements when they are not explicitly specified.
      The code assumes a narrow SCSI bus (7 units per bus). ESX
      uses a wide SCSI bus (16 units per bus).
      
      This is a step towards controller support for the ESX driver.
      f8f29b1f