1. 05 12月, 2017 1 次提交
    • M
      tests: Drop qemuxml2argv- prefix for qemuxml2argv-*.xml test cases · 2e02f2b2
      Michal Privoznik 提交于
      These XMLs live in a separate directory, there's no need for them
      to have a special prefix in addition. It also doesn't play nicely
      with ':e' completion in Vim, finding proper file based on
      qemuxml2argvtest.c is also needlessly complicated.
      
      The files were renamed using the following commands. From
      qemuxml2argvdata:
      
        for i in qemuxml2argv-*.xml; do mv $i ${i#qemuxml2argv-}; done
      
      and then (to fix broken symlinks) from qemuxml2argvdata and
      qemuxml2xmloutdata:
      
        for i in $(find . -xtype l); do \
            ln -sf $(readlink $i | sed 's/qemuxml2argv-//') $i;
        done
      Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
      2e02f2b2
  2. 30 11月, 2017 1 次提交
    • J
      virQEMUCapsHasPCIMultiBus: assume true if we have no version information · 65108d94
      Ján Tomko 提交于
      In status XML, we do not store the QEMU version information, we only
      format all the capabilities. We dropped QEMU_CAPS_PCI_MULTIBUS
      in commit 5b783379 which was released in libvirt 3.2.0.
      
      Therefore the only way of telling if the already running domain
      at the time of daemon restart has been started with a QEMU that does
      use 'pci.0' or not on PPC is to look at the pci-root controller's
      alias. This is not an option if the domain has a user-specified alias
      for the pci-root.
      
      Instead of reintroducing the capability, assume 'pci.0' when we have
      no version information. That way the only left broken use case would
      be the combination of user aliases and very old QEMU.
      
      Partially reverts commit 3a37af1e.
      
      https://bugzilla.redhat.com/show_bug.cgi?id=1518148
      65108d94
  3. 28 11月, 2017 6 次提交
  4. 25 11月, 2017 1 次提交
    • J
      qemu: Use secret objects to pass iSCSI passwords · c5c96545
      John Ferlan 提交于
      https://bugzilla.redhat.com/show_bug.cgi?id=1425757
      
      The blockdev-add code provides a mechanism to sanely provide user
      and password-secret arguments for iscsi without placing them on the
      command line to be viewable by a 'ps -ef' type command or needing
      to create separate -iscsi devices for each disk/volume found.
      
      So modify the iSCSI command line building to check for the presence
      of the capability in order properly setup and use the domain master
      secret object to encrypt the password in a secret object and alter
      the parameters for the command line to utilize.
      
      Modify the xml2argvtest to exhibit the syntax for both disk and
      hostdev configurations.
      c5c96545
  5. 24 11月, 2017 2 次提交
  6. 23 11月, 2017 1 次提交
  7. 20 11月, 2017 3 次提交
  8. 18 11月, 2017 1 次提交
    • M
      qemu: add vmcoreinfo support · 7e4177a3
      Marc-André Lureau 提交于
      Starting from qemu 2.11, the `-device vmcoreinfo` will create a fw_cfg
      entry for a guest to store dump details, necessary to process kernel
      dump with KASLR enabled and providing additional kernel details.
      
      In essence, it is similar to -fw_cfg name=etc/vmcoreinfo,file=X but in
      this case it is not backed by a file, but collected by QEMU itself.
      
      Since the device is a singleton and shouldn't use additional hardware
      resources, it is presented as a <feature> element in the libvirt
      domain XML.
      
      The device is arm/x86 only for now (targets that support fw_cfg+dma).
      
      Related to:
      https://bugzilla.redhat.com/show_bug.cgi?id=1395248Signed-off-by: NMarc-André Lureau <marcandre.lureau@redhat.com>
      7e4177a3
  9. 14 11月, 2017 1 次提交
  10. 03 11月, 2017 1 次提交
    • A
      Remove backslash alignment attempts · 3e7db8d3
      Andrea Bolognani 提交于
      Right-aligning backslashes when defining macros or using complex
      commands in Makefiles looks cute, but as soon as any changes is
      required to the code you end up with either distractingly broken
      alignment or unnecessarily big diffs where most of the changes
      are just pushing all backslashes a few characters to one side.
      
      Generated using
      
        $ git grep -El '[[:blank:]][[:blank:]]\\$' | \
          grep -E '*\.([chx]|am|mk)$$' | \
          while read f; do \
            sed -Ei 's/[[:blank:]]*[[:blank:]]\\$/ \\/g' "$f"; \
          done
      Signed-off-by: NAndrea Bolognani <abologna@redhat.com>
      3e7db8d3
  11. 23 10月, 2017 1 次提交
  12. 20 10月, 2017 2 次提交
    • J
      conf: Add/Allow parsing the encryption in the disk source · 37537a7c
      John Ferlan 提交于
      Since the virStorageEncryptionPtr encryption; is a member of
       _virStorageSource it really should be allowed to be a subelement
      of the disk <source> for various disk formats:
      
         Source{File|Dir|Block|Volume}
         SourceProtocol{RBD|ISCSI|NBD|Gluster|Simple|HTTP}
      
      NB: Simple includes sheepdog, ftp, ftps, tftp
      
      That way we can set up to allow the <encryption> element to be
      formatted within the disk source, but we still need to be wary
      from whence the element was read - see keep track and when it
      comes to format the data, ensure it's written in the correct place.
      
      Modify the qemuxml2argvtest to add a parse failure when there is an
      <encryption> as a child of <disk> *and* an <encryption> as a child
      of <source>.
      
      The virschematest will read the new test files and validate from a
      RNG viewpoint things are fine.
      37537a7c
    • J
      conf: Add/Allow parsing the auth in the disk source · 8002d3cb
      John Ferlan 提交于
      Since the virStorageAuthDefPtr auth; is a member of _virStorageSource
      it really should be allowed to be a subelement of the disk <source>
      for the RBD and iSCSI prototcols. That way we can set up to allow
      the <auth> element to be formatted within the disk source.
      
      Since we've allowed the <auth> to be a child of <disk>, we'll need
      to keep track of how it was read so that when writing out we'll know
      whether to format as child of <disk> or <source>. For the argv2xml
      parsing, let's format under <source> as a preference. Do not allow
      <auth> to be both a child of <disk> and <source>.
      
      Modify the qemuxml2argvtest to add a parse failure when there is an
      <auth> as a child of <disk> *and* an <auth> as a child of <source>.
      
      Add tests to validate that if the <auth> was found in <source>, then
      the resulting xml2xml and xml2arg works just fine.  The two new .args
      file are exact copies of the non "-source" version of the file.
      
      The virschematest will read the new test files and validate from a
      RNG viewpoint things are fine
      
      Update the virstoragefile, virstoragetest, and args2xml file to show
      the "preference" to place <auth> as a child of <source>.
      8002d3cb
  13. 16 10月, 2017 1 次提交
  14. 04 10月, 2017 1 次提交
    • L
      qemu: Support multiqueue virtio-blk · abca72fa
      Lin Ma 提交于
      qemu 2.7.0 introduces multiqueue virtio-blk(commit 2f27059).
      This patch introduces a new attribute "queues". An example of
      the XML:
      
      <disk type='file' device='disk'>
        <driver name='qemu' type='qcow2' queues='4'/>
      
      The corresponding QEMU command line:
      
      -device virtio-blk-pci,scsi=off,num-queues=4,id=virtio-disk0
      Signed-off-by: NLin Ma <lma@suse.com>
      Signed-off-by: NJán Tomko <jtomko@redhat.com>
      abca72fa
  15. 29 9月, 2017 1 次提交
  16. 28 9月, 2017 1 次提交
    • A
      qemu: Add TLS support for Veritas HyperScale (VxHS) · 6885b51e
      Ashish Mittal 提交于
      Alter qemu command line generation in order to possibly add TLS for
      a suitably configured domain.
      
      Sample TLS args generated by libvirt -
      
          -object tls-creds-x509,id=objvirtio-disk0_tls0,dir=/etc/pki/qemu,\
          endpoint=client,verify-peer=yes \
          -drive file.driver=vxhs,file.tls-creds=objvirtio-disk0_tls0,\
          file.vdisk-id=eb90327c-8302-4725-9e1b-4e85ed4dc251,\
          file.server.type=tcp,file.server.host=192.168.0.1,\
          file.server.port=9999,format=raw,if=none,\
          id=drive-virtio-disk0,cache=none \
          -device virtio-blk-pci,bus=pci.0,addr=0x4,drive=drive-virtio-disk0,\
          id=virtio-disk0
      
      Update the qemuxml2argvtest with a couple of examples. One for a
      simple case and the other a bit more complex where multiple VxHS disks
      are added where at least one uses a VxHS that doesn't require TLS
      credentials and thus sets the domain disk source attribute "tls = 'no'".
      
      Update the hotplug to be able to handle processing the tlsAlias whether
      it's to add the TLS object when hotplugging a disk or to remove the TLS
      object when hot unplugging a disk.  The hot plug/unplug code is largely
      generic, but the addition code does make the VXHS specific checks only
      because it needs to grab the correct config directory and generate the
      object as the command line would do.
      Signed-off-by: NAshish Mittal <Ashish.Mittal@veritas.com>
      Signed-off-by: NJohn Ferlan <jferlan@redhat.com>
      6885b51e
  17. 21 9月, 2017 4 次提交
  18. 20 9月, 2017 1 次提交
  19. 18 9月, 2017 1 次提交
  20. 15 9月, 2017 2 次提交
    • J
      conf: Add invalid domain disk encryption test · 411cdb61
      John Ferlan 提交于
      Add a test to prove checking for invalid luks disk formatting check.
      The error message will indicate supplying the <cipher> element is
      unnecessary.
      411cdb61
    • J
      conf: Add invalid secrettype checks · fbad3ed0
      John Ferlan 提交于
      Add a couple of tests to "validate" checks in domain_conf that either
      a missing secrettype (CONFIG_UNSUPPORTED) or an mismatched secrettype
      of ceph for an iSCSI disk (INTERNAL_ERROR) will cause a parsing error.
      fbad3ed0
  21. 11 9月, 2017 1 次提交
    • J
      tests: merge iommu tests · 190a5bc1
      Ján Tomko 提交于
      Using intremap without <ioapic driver='qemu'/> does not work.
      Merge the tests to avoid a duplicit test once we start validating it.
      190a5bc1
  22. 05 9月, 2017 1 次提交
  23. 30 8月, 2017 1 次提交
    • P
      qemu: set bind mode for chardev while parsing XML · be6a415e
      Pavel Hrdina 提交于
      Currently while parsing domain XML we clear the UNIX path if it matches
      one of the auto-generated paths by libvirt.  After that when the guest
      is started new path is generated but the mode is also changed to "bind".
      
      In the real-world use-case the mode should not change, it only happens
      if a user provides a mode='connect' and path that matches one of the
      auto-generated path or not provides a path at all.
      
      Before *reconnect* feature was introduced there was no issue, but with
      the new feature we need to make sure that it's used only with "connect"
      mode, therefore we need to move the mode change into parsing in order
      to have a proper error reported by validation code.
      Signed-off-by: NPavel Hrdina <phrdina@redhat.com>
      be6a415e
  24. 29 8月, 2017 2 次提交
  25. 21 8月, 2017 1 次提交
  26. 17 8月, 2017 1 次提交
    • C
      tests: add qemu x86 kvm 32-on-64 test · 21de51c3
      Cole Robinson 提交于
      There's some specific logic in qemuBuildCpuCommandLine to support
      auto adding -cpu qemu 32 for arch=i686 with an x86_64 qemu binary.
      Add a test case for it
      21de51c3