1. 01 3月, 2016 1 次提交
    • J
      virsh: Add support for text based polkit authentication · ea48397b
      John Ferlan 提交于
      https://bugzilla.redhat.com/show_bug.cgi?id=872166
      
      When the login session doesn't have an ssh -X type display agent in
      order for libvirtd to run the polkit session authentication, attempts
      to run 'virsh -c qemu:///system list' from an unauthorized user (or one
      that isn't part of the libvirt /etc/group) will fail with the following
      error from libvirtd:
      
      error: authentication unavailable: no polkit agent available to
             authenticate action 'org.libvirt.unix.manage'
      
      In order to handle the local authentication, we will use the new
      virPolkitAgentCreate API in order to create a text based authentication
      agent for our non readonly session to authenticate with.
      
      The new code will execute in a loop allowing 5 failures to authenticate
      before failing out.
      
      With this patch in place, the following occurs:
      
      $ virsh -c qemu:///system list
      ==== AUTHENTICATING FOR org.libvirt.unix.manage ===
      System policy prevents management of local virtualized systems
      Authenticating as: Some User (SUser)
      Password:
      ==== AUTHENTICATION COMPLETE ===
       Id    Name                           State
       ----------------------------------------------------
        1     somedomain                     running
      
      $
      ea48397b
  2. 26 2月, 2016 1 次提交
  3. 22 2月, 2016 2 次提交
  4. 19 2月, 2016 2 次提交
  5. 18 2月, 2016 2 次提交
    • J
      vsh: use virBufferTrim in vshOutputLogFile · b4c6fa44
      Ján Tomko 提交于
      Use virBufferTrim to strip the extra newline at the end
      of the message instead of open-coding it after the buffer's
      string is formatted.
      b4c6fa44
    • P
      virsh: Remove <backingStore> when changing cdrom media source · 3ad5186e
      Peter Krempa 提交于
      Since the code is changing the source image path by modifying the
      existing XML snippet the <backingStore> stays in place.
      
      As <backingStore> is relevant to the <source> part of the image, the
      update of that part makes the element invalid.
      
      CD/floppy images usually don't have a backing chain and the element is
      currently ignored though but it might start being used in the future so
      let's start behaving correctly.
      
      Drop the <backingStore> subtree once we want to update the XML.
      
      Before this patch, you'd get:
      $ virsh change-media --eject --print-xml 10 hdc
      <disk type="file" device="cdrom">
            <driver name="qemu" type="qcow2"/>
      
            <backingStore type="file" index="1">
              <format type="qcow2"/>
              <source file="/var/lib/libvirt/images/vm.1436949097"/>
              <backingStore/>
            </backingStore>
            <target dev="hdc" bus="ide"/>
            ...
          </disk>
      
      After:
      
       $ virsh change-media --eject --print-xml 10 hdc
      <disk type="file" device="cdrom">
            <driver name="qemu" type="qcow2"/>
      
            <target dev="hdc" bus="ide"/>
            ...
          </disk>
      3ad5186e
  6. 17 2月, 2016 1 次提交
  7. 15 2月, 2016 3 次提交
    • J
      Spell VMware with a lowercase w · d6165440
      Ján Tomko 提交于
      Replace all occurrences of VMWare outside the news.
      d6165440
    • P
      vsh: Replace vshPrint macro with function · 27fa42b2
      Peter Krempa 提交于
      The macro would eat the first parameter. In some cases the format string
      for vshPrint was eaten. In other cases the calls referenced variables
      which did not exist in the given context. Avoid errors by doing compile
      time checking.
      27fa42b2
    • P
      vsh: Simplify bailing out on OOM conditions · 018010f0
      Peter Krempa 提交于
      When we hit OOM it doesn't really make sense to format the error message
      by attempting to allocate it. Introduce a simple helper that prints a
      static message and terminates the execution.
      018010f0
  8. 12 2月, 2016 2 次提交
  9. 04 2月, 2016 1 次提交
  10. 02 2月, 2016 4 次提交
  11. 30 1月, 2016 1 次提交
    • W
      storage: Add TRIM algorithm to storage volume API · 63cdc92f
      Wido den Hollander 提交于
      This new algorithm adds support for wiping volumes using TRIM.
      
      It does not overwrite all the data in a volume, but it tells the
      backing storage pool/driver that all bytes in a volume can be
      discarded.
      
      It depends on the backing storage pool how this is handled.
      
      A SCSI backend might send UNMAP commands to remove all data present
      on a LUN.
      
      A Ceph backend might use rbd_discard() to instruct the Ceph cluster
      that all data on that RBD volume can be discarded.
      Signed-off-by: NWido den Hollander <wido@widodh.nl>
      63cdc92f
  12. 26 1月, 2016 3 次提交
  13. 25 1月, 2016 3 次提交
  14. 21 1月, 2016 2 次提交
    • J
      Introduce migration iteration event · 0b50f4a0
      Jiri Denemark 提交于
      The VIR_DOMAIN_EVENT_ID_MIGRATION_ITERATION event will be triggered
      whenever VIR_DOMAIN_JOB_MEMORY_ITERATION changes its value, i.e.,
      whenever a new iteration over guest memory pages is started during
      migration.
      Signed-off-by: NJiri Denemark <jdenemar@redhat.com>
      0b50f4a0
    • M
      virsh: Don't fetch status for all domains in cmdList · 3bd2ee5d
      Michal Privoznik 提交于
      We are getting the list of domains and after that we iterate over
      the list and try to get status for each domain hoping it will
      skip over domains that disappeared meanwhile. However, this
      solution to race is bogus - domain may disappear right after we
      have checked its state and before we exec another API over it
      (e.g. virDomainHasManagedSaveImage()). Also, when printing just
      names or uuids (list --name / --uuid) we issue APIs to obtain the
      values, however these require no RPC call as all requested info
      is in virDomain object that client already has.
      Therefore move the status obtaining only to the place that really
      needs it.
      Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
      3bd2ee5d
  15. 14 1月, 2016 2 次提交
  16. 13 1月, 2016 3 次提交
  17. 12 1月, 2016 7 次提交
    • A
      46c551fd
    • J
      virsh: Create macro for common "interface" option · 545e5571
      John Ferlan 提交于
      Rather than continually cut-n-paste the strings into each command,
      create a common macro to be used generically.  Note that not all
      '{.name = "interface",' entries are replaced, just those that have the
      common .help string of "interface name or MAC address".
      Signed-off-by: NJohn Ferlan <jferlan@redhat.com>
      545e5571
    • J
      virsh: Create macro for common "network" option · 21655228
      John Ferlan 提交于
      Rather than continually cut-n-paste the strings into each command,
      create a common macro to be used generically.  Note that not all
      '{.name = "network",' entries are replaced, just those that have the
      common .help string of "network name or uuid".
      Signed-off-by: NJohn Ferlan <jferlan@redhat.com>
      21655228
    • J
      virsh: Create macros for common "vol" options · 5b436359
      John Ferlan 提交于
      Rather than continually cut-n-paste the strings into each command,
      create common macros to be used generically.  Replace the more commonly
      used "vol" option with a macro. This also adjusts 2 commands that
      didn't have the correct helpstr - 'vol-create-from' and 'vol-clone'.
      Both are described in the man page as taking vol, path, or key and
      the code uses the virshCommandOptVol instead of virshCommandOptVolBy.
      Signed-off-by: NJohn Ferlan <jferlan@redhat.com>
      5b436359
    • J
      virsh: Create macro for common "file" option · febf69b5
      John Ferlan 提交于
      Rather than continually cut-n-paste the strings into each command,
      create a common macro to be used generically. The macro will take a
      single argument _helpstr for the less common help string for each
      command option.  Note that only file options using "OT_DATA" and
      "OFLAG_REQ" will be replace - others are left as is.
      Signed-off-by: NJohn Ferlan <jferlan@redhat.com>
      febf69b5
    • J
      virsh: Create macro for common "current" option · 5b42dbed
      John Ferlan 提交于
      Rather than continually cut-n-paste the strings into each command,
      create a common macro to be used generically. The macro will take a
      single argument _helpstr which for many options in virsh-domain.c
      is simply "affect current domain". So, create a second macro within that
      file in order to define the more common use as a revector to the
      common macro with the common _helpstr.
      Signed-off-by: NJohn Ferlan <jferlan@redhat.com>
      5b42dbed
    • J
      virsh: Create macro for common "live" option · 8e4108f0
      John Ferlan 提交于
      Rather than continually cut-n-paste the strings into each command,
      create a common macro to be used generically. The macro will take a
      single argument _helpstr which for many options in virsh-domain.c
      is simply "affect running domain". So, create a second macro within that
      file in order to define the more common use as a revector to the
      common macro with the common _helpstr.
      Signed-off-by: NJohn Ferlan <jferlan@redhat.com>
      8e4108f0