1. 05 3月, 2015 6 次提交
  2. 04 3月, 2015 17 次提交
  3. 03 3月, 2015 14 次提交
    • M
      qemuProcessReconnect: Fill in pid file path · 63889e0c
      Michal Privoznik 提交于
      https://bugzilla.redhat.com/show_bug.cgi?id=1197600
      
      So, libvirt uses pid file to track pid of started qemus. Whenever
      a domain is started, its pid is put into corresponding pid file.
      The pid file path is generated based on domain name and stored
      into domain object internals. However, it's not stored in the
      status XML and therefore lost on daemon restarts. Hence, later,
      when domain is being shut down, the daemon does not know which
      pid file to unlink, and the correct pid file is left behind. To
      avoid this, lets generate the pid file path again in
      qemuProcessReconnect().
      Reported-by: NLuyao Huang <lhuang@redhat.com>
      Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
      63889e0c
    • P
      qemu: check defaultMode for spice graphics independently · a16e5f0a
      Pavel Hrdina 提交于
      Instead of checking defaultMode for every channel that has no mode
      configured, test it only once outside of channel loop.  This fixes a bug
      that in case all possible channels are fore example set to insecure, but
      defaultMode is set to secure, we wouldn't auto-generate TLS port.  This
      results in failure while starting a guest.
      
      Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1143832Signed-off-by: NPavel Hrdina <phrdina@redhat.com>
      a16e5f0a
    • P
      qemu: remove duplicated code for allocating spice ports · e4983952
      Pavel Hrdina 提交于
      We have two different places that needs to be updated while touching
      code for allocation spice ports.  Add a bool option to
      'qemuProcessSPICEAllocatePorts' function to switch between true and fake
      allocation so we can use this function also in qemu_driver to generate
      native domain definition.
      Signed-off-by: NPavel Hrdina <phrdina@redhat.com>
      e4983952
    • P
      8672a1e4
    • P
    • P
      schema: Fix interface link state schema · 8eb907b8
      Peter Krempa 提交于
      In commit edd1295e I've introduced an
      XML element that allows to configure state of the network interface
      link. Somehow the RNG schema hunk ended up in a weird place in the
      network schema definition. Move it to the right place and add a test
      case.
      
      Note that the link state is set up via the monitor at VM startup so I
      originally didn't think of adding a test case.
      
      Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1173468
      8eb907b8
    • M
      conf: De-duplicate scheduling policy enums · 2fd5880b
      Martin Kletzander 提交于
      Since adding the support for scheduler policy settings in commit
      8680ea97, there are two enums with the same information.  That was
      caused by rewriting the patch since first draft.
      
      Find out thanks to clang, but there was no impact whatsoever.
      Signed-off-by: NMartin Kletzander <mkletzan@redhat.com>
      2fd5880b
    • M
      qemu: Don't crash in qemuDomainOpenChannel() · b3ea0a8f
      Martin Kletzander 提交于
      The problem here was that when opening a channel, we were checking
      whether the channel given is alias (can't be NULL for running domain) or
      it's name, which can be NULL (for example with spicevmc).  In case of
      such domain qemuDomainOpenChannel() made the daemon crash.
      STREQ_NULLABLE() is safe to use since the code in question is wrapped in
      "if (name)" and is more readable, so use that instead of checking for
      non-NULL "vm->def->channels[i]->target.name".
      Signed-off-by: NMartin Kletzander <mkletzan@redhat.com>
      b3ea0a8f
    • J
      virsh.pod: Update find-storage-pool-sources[-as] man page · 567bd0fa
      John Ferlan 提交于
      https://bugzilla.redhat.com/show_bug.cgi?id=921426
      
      Add to the man page a more complete description of what exactly the
      command expects on input and will return on output based on what is
      currently supported.
      
      Perhaps missing findPoolSources implementations are backends for
      sheepdog and rbd.  Also missing any backend is zfs.
      567bd0fa
    • J
      iscsi: Adjust error message for findStorageSources backend · 30f69ae8
      John Ferlan 提交于
      The virStorageBackendISCSIFindPoolSources API only needs the 'host' name
      in order to discover iSCSI pools, it returns the various device paths.
      On input, it's also possible to further restrict a search by providing the
      port attribute for the host element and the (undocumented) initiator element.
      
      For example:
      
      $  virsh find-storage-pool-sources-as iscsi
      error: Failed to find any iscsi pool sources
      error: invalid argument: hostname and device path must be specified for iscsi sources
      
      $ virsh find-storage-pool-sources-as iscsi 192.168.122.1
      <sources>
        <source>
          <host name='192.168.122.1' port='3260'/>
          <device path='iqn.2013-12.com.example:iscsi-chap-lclpool'/>
        </source>
      </sources>
      30f69ae8
    • J
      virsh.pod: Add information regarding LXC for setmem, memtune, and dominfo · 69db32f9
      John Ferlan 提交于
      https://bugzilla.redhat.com/show_bug.cgi?id=1070695
      
      Modify the virsh man page to more accurately describe which values are
      set by the virsh setmem and displayed by the virsh memtune or dominfo
      based on the setmem command results.
      69db32f9
    • J
      disk: Provide a default storage source format type. · 832a9256
      John Ferlan 提交于
      https://bugzilla.redhat.com/show_bug.cgi?id=1181062
      
      According to the formatstorage.html description for <source> element
      and "format" attribute: "All drivers are required to have a default
      value for this, so it is optional."
      
      As it turns out the disk backend did not choose a default value, so I
      added a default of "msdos" if the source type is "unknown" as well as
      updating the storage.html backend disk volume driver documentation to
      indicate the default format is dos.
      832a9256
    • J
      disk: Disallow duplicated target 'dev' values · e0e29055
      John Ferlan 提交于
      https://bugzilla.redhat.com/show_bug.cgi?id=1142631
      
      This patch resolves a situation where the same "<target dev='$name'...>"
      can be used for multiple disks in the domain.
      
      While the $name is "mostly" advisory regarding the expected order that
      the disk is added to the domain and not guaranteed to map to the device
      name in the guest OS, it still should be unique enough such that other
      domblk* type operations can be performed.
      
      Without the patch, the domblklist will list the same Target twice:
      
      $ virsh domblklist $dom
      Target     Source
      ------------------------------------------------
      sda        /var/lib/libvirt/images/file.qcow2
      sda        /var/lib/libvirt/images/file.img
      
      Additionally, getting domblkstat, domblkerror, domblkinfo, and other block*
      type calls will not be able to reference the second target.
      
      Fortunately, hotplug disallows adding a "third" sda value:
      
      $ qemu-img create -f raw /var/lib/libvirt/images/file2.img 10M
      $ virsh attach-disk $dom /var/lib/libvirt/images/file2.img sda
      error: Failed to attach disk
      error: operation failed: target sda already exists
      
      $
      
      BUT, it since 'sdb' doesn't exist one would get the following on the same
      hotplug attempt, but changing to use 'sdb' instead of 'sda'
      
      $ virsh attach-disk $dom /var/lib/libvirt/images/file2.img sdb
      error: Failed to attach disk
      error: internal error: unable to execute QEMU command 'device_add': Duplicate ID 'scsi0-0-1' for device
      
      $
      
      Since we cannot fix this issue at parsing time, the best that can be done so
      as to not "lose" a domain is to make the check prior to starting the guest
      with the results as follows:
      
      $ virsh start $dom
      error: Failed to start domain $dom
      error: XML error: target 'sda' duplicated for disk sources '/var/lib/libvirt/images/file.qcow2' and '/var/lib/libvirt/images/file.img'
      
      $
      
      Running 'make check' found a few more instances in the tests where this
      duplicated target dev value was being used. These also exhibited some
      duplicated 'id=' values (negating the uniqueness argument of aliases) in
      the corresponding .args file and of course the *xmlout version of a few
      input XML files.
      e0e29055
    • J
      virsh: Adjust domblklist to understand disk volume syntax · 09aec2a4
      John Ferlan 提交于
      A disk using a source pool is listed as having a source '-' in domblklist
      because it doesn't check the right XML syntax to find the source.
      
      Add a check for "./source/volume" which is where the "path" (of sorts)
      to the volume name is described.
      09aec2a4
  4. 02 3月, 2015 3 次提交