1. 18 1月, 2011 2 次提交
    • E
      qemu: use -incoming fd:n to avoid qemu holding fd indefinitely · 1859939a
      Eric Blake 提交于
      https://bugzilla.redhat.com/show_bug.cgi?id=620363
      
      When using -incoming stdio or -incoming exec:, qemu keeps the
      stdin fd open long after the migration is complete.  Not to
      mention that exec:cat is horribly inefficient, by doubling the
      I/O and going through a popen interface in qemu.
      
      The new -incoming fd: of qemu 0.12.0 closes the fd after using
      it, and allows us to bypass an intermediary cat process for
      less I/O.
      
      * src/qemu/qemu_command.h (qemuBuildCommandLine): Add parameter.
      * src/qemu/qemu_command.c (qemuBuildCommandLine): Support
      migration via fd: when possible.  Consolidate migration handling
      into one spot, now that it is more complex.
      * src/qemu/qemu_driver.c (qemudStartVMDaemon): Update caller.
      * tests/qemuxml2argvtest.c (mymain): Likewise.
      * tests/qemuxml2argvdata/qemuxml2argv-restore-v2-fd.args: New file.
      * tests/qemuxml2argvdata/qemuxml2argv-restore-v2-fd.xml: Likewise.
      1859939a
    • J
      tests: Add tests for per-device boot elements · e182ba87
      Jiri Denemark 提交于
      e182ba87
  2. 15 1月, 2011 2 次提交
    • 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
  3. 18 12月, 2010 1 次提交
  4. 11 12月, 2010 1 次提交
    • E
      tests: plug memory leaks · 7d5e79ff
      Eric Blake 提交于
      * tests/qemuxml2argvtest.c (testCompareXMLToArgvFiles): Don't
      allocate, since we don't use virDomainChrDefFree.
      7d5e79ff
  5. 10 12月, 2010 2 次提交
  6. 08 12月, 2010 1 次提交
  7. 03 12月, 2010 1 次提交
    • E
      qemu: convert to virCommand · 6a7e7c4f
      Eric Blake 提交于
      * src/qemu/qemu_conf.c (qemudExtractVersionInfo): Check for file
      before executing it here, rather than in callers.
      (qemudBuildCommandLine): Rewrite with virCommand.
      * src/qemu/qemu_conf.h (qemudBuildCommandLine): Update signature.
      * src/qemu/qemu_driver.c (qemuAssignPCIAddresses)
      (qemudStartVMDaemon, qemuDomainXMLToNative): Adjust callers.
      6a7e7c4f
  8. 02 12月, 2010 2 次提交
    • J
      tests: Add tests for CPU selection in qemu driver · 6fda7ea5
      Jiri Denemark 提交于
      6fda7ea5
    • J
      tests: Support for faking emulator in qemuxml2argv · 9237e955
      Jiri Denemark 提交于
      This patch allows for using custom scripts instead of /usr/bin/qemu
      emulator in domain XML. To do so, one would specify relative path to the
      custom script in <emulator/>. The path needs to be relative to
      qemuxml2argvdata directory and it will be transparently made absolute in
      runtime. The expected command line needs to contain the exact relative
      path as was used in domain XML.
      
      The problem is RelaxNG schema for domain XML only allows for absolute
      path within <emulator/>. To workaround it, an extra '/' must be added at
      the beginning of the path. That is, instead of "./qemu.sh" or
      "../emulator/qemu.sh" one would use "/./qemu.sh" or
      "/../emulator/qemu.sh". The extra slash is removed before further
      processing. I don't like this workaround, it's very ugly but it's the
      best option I was able to come up with. Relaxing domain XML schema is
      not an option IMO.
      9237e955
  9. 01 12月, 2010 1 次提交
    • D
      Release of libvirt 0.8.6 · a33db6cb
      Daniel Veillard 提交于
      - configure.ac libvirt.spec.in: bump version, add a missing systemtap
        build requirement
      - docs/news.html.in: add informations about the release
      - po/*: updated Polish and Dutch localizations, and regenerated
      - tests/qemuxml2argvtest.c: Fix build problem
      a33db6cb
  10. 29 11月, 2010 1 次提交
  11. 09 11月, 2010 3 次提交
    • D
      Add SPICE support for QEMU driver configuration file · b5c99209
      Daniel P. Berrange 提交于
      In common with VNC, the QEMU driver configuration file is used
      specify the host level TLS certificate location and a default
      password / listen address
      
      * src/qemu/qemu.conf: Add spice_listen, spice_tls,
        spice_tls_x509_cert_dir & spice_password config params
      * src/qemu/qemu_conf.c, src/qemu/qemu_conf.h: Parsing of
        spice config parameters and updating -spice arg generation
        to use them
      * tests/qemuxml2argvdata/qemuxml2argv-graphics-spice-rhel6.args,
        tests/qemuxml2argvtest.c: Expand test case to cover driver
        level configuration
      b5c99209
    • D
      Implement QEMU/KVM support for SPICE graphics · 9b57fa65
      Daniel P. Berrange 提交于
      This supports the -spice argument posted for review against
      the latest upstream QEMU/KVM. This supports the bare minimum
      config with port, TLS port & listen address. The x509 bits are
      added in a later patch.
      
      * src/qemu_conf.c, src/qemu_conf.h: Add SPICE flag. Check for
        -spice availability. Format -spice arg for command line
      * qemuhelptest.c: Add SPICE flag
      * qemuxml2argvdata/qemuxml2argv-graphics-spice.args: Add <graphics>
        for spice
      * qemuxml2argvdata/qemuxml2argv-graphics-spice.xml: Add -spice arg
      * qemuxml2argvtest.c: Add SPICE flag
      9b57fa65
    • D
      Implement QEMU/KVM QXL video card support in QEMU driver · 635f9ca1
      Daniel P. Berrange 提交于
      This supports the '-vga qxl' parameter in upstream QEMU/KVM
      which has SPICE support added. This isn't particularly useful
      until you get the next patch for -spice support. Also note that
      while the libvirt XML supports multiple video devices, this
      patch only supports a single one. A later patch can add support
      for 2nd, 3rd, etc PCI devices for QXL
      
      * src/qemu/qemu_conf.h: Flag for QXL support
      * src/qemu/qemu_conf.c: Probe for '-vga qxl' support and implement it
      * tests/qemuxml2argvtest.c, tests/qemuxml2xmltest.c,
        tests/qemuxml2argvdata/qemuxml2argv-graphics-spice.args,
        tests/qemuxml2argvdata/qemuxml2argv-graphics-spice.xml: Test
        case for generating spice args with RHEL6 kvm
      635f9ca1
  12. 08 11月, 2010 1 次提交
  13. 26 10月, 2010 1 次提交
    • J
      qemu: Fix detection of drive readonly option · 69b75521
      Jiri Denemark 提交于
      So far, readonly=on option is used when qemu supports -device. However,
      there are qemu versions which support readonly option with -drive
      although they don't have support for -device.
      69b75521
  14. 23 10月, 2010 1 次提交
  15. 20 10月, 2010 1 次提交
    • 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
  16. 13 10月, 2010 1 次提交
    • 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
  17. 29 7月, 2010 2 次提交
  18. 28 7月, 2010 1 次提交
    • 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
  19. 24 7月, 2010 1 次提交
    • C
      Add tests for the new Qemu namespace XML. · a71be01f
      Chris Lalancette 提交于
      Thanks to DV for knocking together the Relax-NG changes
      quickly for me.
      
      Changes since v1:
       - Change the domain.rng to correspond to the new schema
       - Don't allocate caps->ns in testQemuCapsInit since it is a static table
      
      Changes since v2:
       - Change domain.rng to add restrictions on allowed environment names
      
      Changes since v3:
       - Remove a bogus comment in the tests
      Signed-off-by: NChris Lalancette <clalance@redhat.com>
      a71be01f
  20. 21 7月, 2010 1 次提交
    • 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
  21. 25 6月, 2010 1 次提交
    • D
      Fix test case failure due to missing -nodefconfig · 39f8af38
      Daniel P. Berrange 提交于
      The previous change which split -nodefconfig probing off
      from -device broke the test case because it missed adding
      the QEMUD_CMD_FLAG_NODEFCONFIG to the test
      
      * src/util/bridge.c: Set QEMUD_CMD_FLAG_NODEFCONFIG for all
        configs with QEMUD_CMD_FLAG_DEVICE set
      39f8af38
  22. 08 6月, 2010 1 次提交
    • D
      Fix test breakage from virtio serial changes · 9cb08020
      Daniel P. Berrange 提交于
      The virtio serial changes broke the test suite because they forgot
      to add the new address attribute to the domain XML schema. The
      xml2xml test also broke because the XML no longer roundtrips. This
      is due to testing of auto-addition of <controller> elements. Split
      that test case off into a separate XML file to avoid breakage
      
      * docs/schemas/domain.rng: Allow port number for virtio serial addresses
      * tests/qemuxml2argvdata/qemuxml2argv-channel-virtio.args,
        tests/qemuxml2argvdata/qemuxml2argv-channel-virtio.xml: Revert to
        a simple config to avoid breaking xml2xml test
      * tests/qemuxml2argvdata/qemuxml2argv-channel-virtio-auto.xml,
        tests/qemuxml2argvdata/qemuxml2argv-channel-virtio-auto.args: Add
        complex test case for auto-controller addition for xml2argv test
      * tests/qemuxml2argvtest.c: Add channel-virtio-auto test
      9cb08020
  23. 05 4月, 2010 1 次提交
  24. 27 3月, 2010 1 次提交
    • D
      Add disk error policy to domain XML · 447c586a
      David Allan 提交于
      * Fixes per feedback from Dan and Daniel
      * Added test datafiles
      * Re-disabled JSON flags
      * Added code to print the error policy attribute when generating XML
      * Re-add empty tag
      447c586a
  25. 16 3月, 2010 1 次提交
    • D
      qemu: pass the information when disks are read-only · f92c041a
      Daniel Veillard 提交于
      * src/qemu/qemu_conf.c: add the ",readonly=on" for read-only disks
        and also parse it back in qemuParseCommandLineDisk()
      * tests/qemuxml2argvtest.c
        tests/qemuxml2argvdata/qemuxml2argv-disk-drive-readonly-disk.args
        tests/qemuxml2argvdata/qemuxml2argv-disk-drive-readonly-disk.xml:
        add a specific regression test
      f92c041a
  26. 10 3月, 2010 1 次提交
  27. 02 3月, 2010 2 次提交
    • D
      Allow configurable timezones with QEMU · 74042b8f
      Daniel P. Berrange 提交于
      Allow an arbitrary timezone with QEMU by setting the $TZ environment
      variable when launching QEMU
      
      * src/qemu/qemu_conf.c: Set TZ environment variable if a timezone
        is requested
      * tests/qemuxml2argvtest.c: Add test case for timezones
      * tests/qemuxml2argvdata/qemuxml2argv-clock-france.xml,
        tests/qemuxml2argvdata/qemuxml2argv-clock-france.args: Data
        for timezone tests
      74042b8f
    • D
      Support variable clock offset mode in QEMU · 200c83b2
      Daniel P. Berrange 提交于
      This allows QEMU guests to be started with an arbitrary clock
      offset
      
      The test case can't actually be enabled, since QEMU argv expects
      an absolute timestring, and this will obviously change every
      time the test runs :-( Hopefully QEMU will allow a relative
      time offset in the future.
      
      * src/qemu/qemu_conf.c, src/qemu/qemu_conf.h: Use the -rtc arg
        if available to support variable clock offset mode
      * tests/qemuhelptest.c: Add QEMUD_CMD_FLAG_RTC for qemu 0.12.1
      * qemuxml2argvdata/qemuxml2argv-clock-variable.args,
        qemuxml2argvdata/qemuxml2argv-clock-variable.xml,
        qemuxml2argvtest.c: Test case, except we can't actually enable
        it yet.
      200c83b2
  28. 19 2月, 2010 1 次提交
    • M
      Add QEMU support for virtio channel · 3ec09478
      Matthew Booth 提交于
      Support virtio-serial controller and virtio channel in QEMU backend.
      Will output
      the following for virtio-serial controller:
      
      -device
      virtio-serial-pci,id=virtio-serial0,bus=pci.0,addr=0x4,max_ports=16,vectors=4
      
      and the following for a virtio channel:
      
      -chardev pty,id=channel0 \
      -device
      virtserialport,bus=virtio-serial0.0,chardev=channel0,name=org.linux-kvm.port.0
      
      * src/qemu/qemu_conf.c: Add argument output for virtio
      * tests/qemuxml2argvtest.c
        tests/qemuxml2argvdata/qemuxml2argv-channel-virtio.args: Add test for
        QEMU command line generation
      3ec09478
  29. 17 2月, 2010 1 次提交
  30. 10 2月, 2010 3 次提交
    • D
      Annotate some virConnectPtr as mandatory non-null · 38536d6f
      Daniel P. Berrange 提交于
      Use the ATTRIBUTE_NONNULL annotation to mark some virConnectPtr
      args as mandatory non-null so the compiler can warn of mistakes
      
      * src/conf/domain_event.h: All virConnectPtr args must be non-null
      * src/qemu/qemu_conf.h: qemudBuildCommandLine and
        qemudNetworkIfaceConnect() must be given non-null connection
      * tests/qemuxml2argvtest.c: Provide a non-null (dummy) connection to
        qemudBuildCommandLine()
      38536d6f
    • D
      Convert qemu command line flags to 64-bit int · 910b019f
      Daniel P. Berrange 提交于
      The QEMU flags are commonly stored as a signed or unsigned int,
      allowing only 31 flags. This limit is rather close, so to aid
      future patches, change it to a 64-bit int
      
      * src/qemu/qemu_conf.c, src/qemu/qemu_conf.h, src/qemu/qemu_driver.c,
        tests/qemuargv2xmltest.c, tests/qemuhelptest.c, tests/qemuxml2argvtest.c:
        Use 'unsigned long long' for QEMU flags
      910b019f
    • D