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. 28 11月, 2017 7 次提交
  3. 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
  4. 24 11月, 2017 3 次提交
  5. 23 11月, 2017 4 次提交
  6. 20 11月, 2017 2 次提交
  7. 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
  8. 14 11月, 2017 1 次提交
  9. 10 11月, 2017 1 次提交
  10. 08 11月, 2017 1 次提交
  11. 07 11月, 2017 2 次提交
    • P
      storage: Don't store leading '/' in image name when splitting out volume · bb14d989
      Peter Krempa 提交于
      Libvirt historically stores storage source path including the volume as
      one string in the XML, but that is not really flexible enough when
      dealing with the fields in the code. Previously we'd store the slash
      separating the two as part of the image name. This was fine for gluster
      but it's not necessary and does not scale well when converting other
      protocols.
      
      Don't store the slash as part of the path. The resulting change from
      absolute to relative path within the gluster driver should be okay,
      as the root directory is the default when accessing gluster.
      bb14d989
    • P
      qemu: block: Use proper type for servers for VxHS disks · bd372137
      Peter Krempa 提交于
      Original implementation used 'SocketAddress' equivalent from qemu for
      the disk server field, while qemu documentation specifies
      'InetSocketAddress'. The backing store parser uses the correct parsing
      function but the formatter used the incorrect one (and also with the
      legacy mode enabled which was wrong).
      bd372137
  12. 23 10月, 2017 2 次提交
  13. 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
  14. 16 10月, 2017 2 次提交
    • D
      qemu: ensure TLS clients always verify the server certificate · 441d3eb6
      Daniel P. Berrange 提交于
      The default_tls_x509_verify (and related) parameters in qemu.conf
      control whether the QEMU TLS servers request & verify certificates
      from clients. This works as a simple access control system for
      servers by requiring the CA to issue certs to permitted clients.
      This use of client certificates is disabled by default, since it
      requires extra work to issue client certificates.
      
      Unfortunately the code was using this configuration parameter when
      setting up both TLS clients and servers in QEMU. The result was that
      TLS clients for character devices and disk devices had verification
      turned off, meaning they would ignore errors while validating the
      server certificate.
      
      This allows for trivial MITM attacks between client and server,
      as any certificate returned by the attacker will be accepted by
      the client.
      
      This is assigned CVE-2017-1000256  / LSN-2017-0002
      Reviewed-by: NEric Blake <eblake@redhat.com>
      Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
      441d3eb6
    • J
      qemu: reserve PCI addresses for implicit i440fx devices · d007ec33
      Ján Tomko 提交于
      Somewhere around commit 9ff9d9f5 reserving entire PCI slots was
      eliminated, as demonstrated by commit 6cc20142.
      
      Reserve the functions required by the implicit devices:
      00:01.0 ISA Bridge
      00:01.1 IDE Controller
      00:01.2 USB Controller (unless USB is disabled)
      00:01.3 Bridge
      
      https://bugzilla.redhat.com/show_bug.cgi?id=1460143
      d007ec33
  15. 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
  16. 29 9月, 2017 1 次提交
  17. 28 9月, 2017 2 次提交
    • 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
    • A
      util: Add TLS attributes to virStorageSource · f1705485
      Ashish Mittal 提交于
      Add an optional virTristateBool haveTLS to virStorageSource to
      manage whether a storage source will be using TLS.
      
      Sample XML for a VxHS disk:
      
      <disk type='network' device='disk'>
        <driver name='qemu' type='raw' cache='none'/>
        <source protocol='vxhs' name='eb90327c-8302-4725-9e1b-4e85ed4dc251' tls='yes'>
          <host name='192.168.0.1' port='9999'/>
        </source>
        <target dev='vda' bus='virtio'/>
      </disk>
      
      Additionally add a tlsFromConfig boolean to control whether the TLS
      setting was due to domain configuration or qemu.conf global setting
      in order to decide whether to Format the haveTLS setting for either
      a live or saved domain configuration file.
      
      Update the qemuxml2xmltest in order to add a test to show the proper
      parsing.
      
      Also update the docs to describe the tls attribute.
      Signed-off-by: NAshish Mittal <Ashish.Mittal@veritas.com>
      Signed-off-by: NJohn Ferlan <jferlan@redhat.com>
      f1705485
  18. 27 9月, 2017 1 次提交
  19. 21 9月, 2017 2 次提交
  20. 20 9月, 2017 3 次提交