1. 15 8月, 2014 1 次提交
  2. 12 8月, 2014 2 次提交
    • R
      storage: ZFS support · 0257d06b
      Roman Bogorodskiy 提交于
      Implement ZFS storage backend driver. Currently supported
      only on FreeBSD because of ZFS limitations on Linux.
      
      Features supported:
      
       - pool-start, pool-stop
       - pool-info
       - vol-list
       - vol-create / vol-delete
      
      Pool definition looks like that:
      
       <pool type='zfs'>
        <name>myzfspool</name>
        <source>
          <name>actualpoolname</name>
        </source>
       </pool>
      
      The 'actualpoolname' value is a name of the pool on the system,
      such as shown by 'zpool list' command. Target makes no sense
      here because volumes path is always /dev/zvol/$poolname/$volname.
      
      User has to create a pool on his own, this driver doesn't
      support pool creation currently.
      
      A volume could be used with Qemu by adding an entry like this:
      
          <disk type='volume' device='disk'>
            <driver name='qemu' type='raw'/>
            <source pool='myzfspool' volume='vol5'/>
            <target dev='hdc' bus='ide'/>
          </disk>
      0257d06b
    • G
      Make 'uri' command a bit more prominent. · 7dc11d6b
      Guido Günther 提交于
      This tries to address
      
          https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=688778
      
      were libvirt autodetected vbox:///session and it wasn't listed in the
      manpage.
      7dc11d6b
  3. 08 8月, 2014 1 次提交
    • L
      virsh: clean up attach-interface paragraph in man page · f91aa931
      Laine Stump 提交于
      This makes the paragaph about attach-interface more descriptive and
      correct, adding in a few bits of information that were previously
      missing, e.g. --script is only allowed for bridge interfaces of Xen
      domains, target name is regenerated if it starts with vnet, mac
      address will be autogenerated if not specified.
      
      (I did this in response to an email asking why a script couldn't be
      specified for a bridge interface of a qemu domain, and why an
      interface of type='ethernet' couldn't be created with
      attach-interface)
      f91aa931
  4. 04 8月, 2014 2 次提交
  5. 25 7月, 2014 1 次提交
  6. 24 7月, 2014 3 次提交
  7. 18 7月, 2014 2 次提交
    • J
      virsh: Document bandwidth maximum more clearly · 83a928ef
      John Ferlan 提交于
      Commit id '0e2d7305' modified the code to allow a negative value to be
      supplied for the bandwidth argument of the various block virsh commands
      and the migrate-setspeed; however, it failed to update the man page to
      describe the "feature" whereby a very large value could be interpreted
      by the hypervisor to mean maximum value allowed. Although initially
      designed to handle a -1 value, the reality is just about any negative
      value could be provided and essentially perform the same feature.
      83a928ef
    • J
      virsh vol-upload/download disallow negative offset · 570d0f63
      John Ferlan 提交于
      https://bugzilla.redhat.com/show_bug.cgi?id=1087104
      
      Commit id 'c6212539' explicitly allowed a negative value to be used for
      offset and length as a shorthand for the largest value after commit id
      'f18c02ec' modified virStrToLong_ui() to essentially disallow a negative
      value.
      
      However, allowing a negative value for offset ONLY worked if the negative
      value was -1 since the eventual lseek() does allow a -1 to mean the end
      of the file.  Providing other negative values resulted in errors such as:
      
      $ virsh vol-download --pool default qcow3-vol2 /home/vm-images/raw \
        --offset -2 --length -1000
      error: cannot download from volume qcow3-vol2
      error: Unable to seek /home/vm-images/qcow3-vol2 to 18446744073709551614: Invalid argument
      
      $
      
      Thus, it seems unreasonable to expect or allow a negative value for offset
      since the only benefit is to lseek() to the end of the file and then only
      take advantage of how the OS would handle such a seek. For the purposes of
      upload or download of volume data, that seems to be a no-op.  Therefore,
      disallow a negative value for offset.
      
      Additionally, modify the man page for vol-upload and vol-download to provide
      more details regarding the valid values for both offset and length.
      570d0f63
  8. 16 7月, 2014 2 次提交
    • M
      Fix const correctness · 607806f8
      Michal Privoznik 提交于
      In many places we define a variable as a 'const char *' when in fact
      we modify it just a few lines below. Or even free it. We should not do
      that.
      
      There's one exception though, in xenSessionFree() xenapi_utils.c. We
      are freeing the xen_session structure which is defined in
      xen/api/xen_common.h public header. The structure contains session_id
      which is type of 'const char *' when in fact it should have been just
      'char *'. So I'm leaving this unmodified, just noticing the fact in
      comment.
      Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
      607806f8
    • J
      Fix assignment of comparison against zero · 3103a977
      Ján Tomko 提交于
      Assign the value we're comparing:
      (val = func()) < 0
      instead of assigning the comparison value:
      (val = func() < 0)
      
      Both were introduced along with the code,
      the TLS tests by commit bd789dff in 0.9.4
      net events by commit de87691f in 1.2.2.
      
      Note that the event id type fix is a no-op:
      vshNetworkEventIdTypeFromString can only return
      -1 (failure) and the event is never used or
      0 (the only possible event) and the value of 0 < 0 is still 0.
      3103a977
  9. 14 7月, 2014 2 次提交
  10. 09 7月, 2014 1 次提交
  11. 08 7月, 2014 3 次提交
  12. 07 7月, 2014 1 次提交
  13. 04 7月, 2014 2 次提交
    • M
      wireshark: Honor API change coming with 1.12 release · e74fa570
      Michal Privoznik 提交于
      https://bugs.gentoo.org/show_bug.cgi?id=508336
      
      At wireshark, they have this promise to change public dissector APIs
      only with minor version number change. Which they did when releasing
      the version of 1.12.
      
      Firstly, they've changed tvb_memdup() in
      a0c53ffaa1bb46d8c9db2ec739401aa411c9790e so now it takes four arguments
      instead of three. The new argument is placed at the very beginning of
      the list of arguments and basically says the scope where we'd like to
      allocate the memory. According to the documentation NULL should be the
      default value.
      
      Then, the tcp_dissect_pdus() signature changed too. Well, the function
      that actually dissects reassembled packets as tcp_dissect_pdus()
      reorder TCP packets into one big chunk and then calls a user function
      to dissect the PDU at once. The change is dated back to
      8081cf1d90397cbbb4404f9720595e1537ed5e14.
      
      Then, WS_DLL_PUBLIC_NOEXTERN was replaced with WS_DLL_PUBLIC_DEF in
      5d87a8c46171f572568db5a47c093423482e342f.
      Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
      e74fa570
    • M
      wireshark: Include more of libvirt internals · 906d0abf
      Michal Privoznik 提交于
      The rationale is to not duplicate code which is done in
      packet-libvirt.h for instance. Moreover, this way we can drop
      __attribute_((unused)) used int packet-libvirt.c in favor of
      ATTRIBUTE_UNUSED.
      Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
      906d0abf
  14. 03 7月, 2014 1 次提交
  15. 02 7月, 2014 1 次提交
  16. 27 6月, 2014 1 次提交
  17. 26 6月, 2014 2 次提交
  18. 24 6月, 2014 2 次提交
    • N
      net-dhcp-leases: Add virsh support · 59cac9a9
      Nehal J Wani 提交于
      Use virNetworkGetDHCPLeases and virNetworkGetDHCPLeasesForMAC in virsh.
      
      The new feature supports the follwing methods:
      
      1. Retrieve leases info for a given virtual network
      
      2. Retrieve leases info for given network interface
      
      tools/virsh-domain-monitor.c
         * Introduce new command : net-dhcp-leases
           Example Usage: net-dhcp-leases <network> [mac]
      
         virsh # net-dhcp-leases --network default6
         Expiry Time          MAC address        Protocol  IP address                Hostname        Client ID or DUID
         -------------------------------------------------------------------------------------------------------------------
         2014-06-16 03:40:14  52:54:00:85:90:e2  ipv4      192.168.150.231/24        fedora20-test   01:52:54:00:85:90:e2
         2014-06-16 03:40:17  52:54:00:85:90:e2  ipv6      2001:db8:ca2:2:1::c0/64   fedora20-test   00:04:b1:d8:86:42:e1:6a:aa:cf:d5:86:94:23:6f:94:04:cd
         2014-06-16 03:34:42  52:54:00:e8:73:eb  ipv4      192.168.150.181/24        ubuntu14-vm     -
         2014-06-16 03:34:46  52:54:00:e8:73:eb  ipv6      2001:db8:ca2:2:1::5b/64   -               00:01:00:01:1b:30:c6:aa:52:54:00:e8:73:eb
      
      tools/virsh.pod
         * Document new command
      
      src/internal.h
         * Introduce new macro: EMPTYSTR
      59cac9a9
    • M
      cmdFreepages: initialize @tmp · 8d8e1d9d
      Michal Privoznik 提交于
      In the 404bac14 the @tmp variable was introduced. It's purpose is to
      avoid typecasting when parsing --pagesize argument. However, if the
      argument is not presented, tmp may be used uninitialized resulting in
      bogus virNodeGetFreePages() API call:
      
      virsh freepages --cellno 2
      error: Failed to open file '/sys/devices/system/node/node2/hugepages/hugepages-4294967295kB/free_hugepages': No such file or directory
      Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
      8d8e1d9d
  19. 19 6月, 2014 4 次提交
    • E
      virsh: fix broken code in freepages · 404bac14
      Eric Blake 提交于
      Commit 9e3efe53 broke the build under valgrind or clang, by writing
      8 bytes through an allocation of 4 bytes.  It also risks multiplication
      overflow when mallocing (that's a pervasive problem that needs an
      audit in the rest of the code, but we might as well fix this one while
      we are here), and had a typo.
      
      * tools/virsh-host.c (cmdFreepages): Avoid integer overflow and
      undefined behavior.
      Signed-off-by: NEric Blake <eblake@redhat.com>
      404bac14
    • M
      virsh: Expose virNodeGetFreePages · 9e3efe53
      Michal Privoznik 提交于
      The new API is exposed under 'freepages' command.
      Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
      9e3efe53
    • E
      virsh: expose new active commit controls · f182da20
      Eric Blake 提交于
      Add knobs to virsh to manage a 2-phase active commit of the top
      layer, similar to knobs already present on blockcopy.  While this
      code will fail until later patches actually implement the new
      knobs in the qemu driver, doing it now proves that the API is
      usable and also makes it easier for testing the qemu changes as
      they are made.
      
      * tools/virsh-domain.c (cmdBlockCommit): Add --active, --pivot,
      and --keep-overlay options, modeled after blockcopy.
      (blockJobImpl): Support --active flag.
      * tools/virsh.pod (blockcommit): Document new flags.
      (blockjob): Mention 2-phase commit interaction.
      Signed-off-by: NEric Blake <eblake@redhat.com>
      f182da20
    • E
      blockjob: use stable disk string in job event · 1bfe73a1
      Eric Blake 提交于
      When the block job event was first added, it was for block pull,
      where the active layer of the disk remains the same name.  It was
      also in a day where we only cared about local files, and so we
      always had a canonical absolute file name.  But two things have
      changed since then: we now have network disks, where determining
      a single absolute string does not really make sense; and we have
      two-phase jobs (copy and active commit) where the name of the
      active layer changes between the first event (ready, on the old
      name) and second (complete, on the pivoted name).
      
      Adam Litke reported that having an unstable string between events
      makes life harder for clients.  Furthermore, all of our API that
      operate on a particular disk of a domain accept multiple strings:
      not only the absolute name of the active layer, but also the
      destination device name (such as 'vda').  As this latter name is
      stable, even for network sources, it serves as a better string
      to supply in block job events.
      
      But backwards-compatibility demands that we should not change the
      name handed to users unless they explicitly request it.  Therefore,
      this patch adds a new event, BLOCK_JOB_2 (alas, I couldn't think of
      any nicer name - but at least Migrate2 and Migrate3 are precedent
      for a number suffix).  We must double up on emitting both old-style
      and new-style events according to what clients have registered for
      (see also how IOError and IOErrorReason emits double events, but
      there the difference was a larger struct rather than changed
      meaning of one of the struct members).
      
      Unfortunately, adding a new event isn't something that can easily
      be broken into pieces, so the commit is rather large.
      
      * include/libvirt/libvirt.h.in (virDomainEventID): Add a new id
      for VIR_DOMAIN_EVENT_ID_BLOCK_JOB_2.
      (virConnectDomainEventBlockJobCallback): Document new semantics.
      * src/conf/domain_event.c (_virDomainEventBlockJob): Rename field,
      to ensure we catch all clients.
      (virDomainEventBlockJobNew): Add parameter.
      (virDomainEventBlockJobDispose)
      (virDomainEventBlockJobNewFromObj)
      (virDomainEventBlockJobNewFromDom)
      (virDomainEventDispatchDefaultFunc): Adjust clients.
      (virDomainEventBlockJob2NewFromObj)
      (virDomainEventBlockJob2NewFromDom): New functions.
      * src/conf/domain_event.h: Add new prototypes.
      * src/libvirt_private.syms (domain_event.h): Export new functions.
      * src/qemu/qemu_driver.c (qemuDomainBlockJobImpl): Generate two
      different events.
      * src/qemu/qemu_process.c (qemuProcessHandleBlockJob): Likewise.
      * src/remote/remote_protocol.x
      (remote_domain_event_block_job_2_msg): New struct.
      (REMOTE_PROC_DOMAIN_EVENT_BLOCK_JOB_2): New RPC.
      * src/remote/remote_driver.c
      (remoteDomainBuildEventBlockJob2): New handler.
      (remoteEvents): Register new event.
      * daemon/remote.c (remoteRelayDomainEventBlockJob2): New handler.
      (domainEventCallbacks): Register new event.
      * tools/virsh-domain.c (vshEventCallbacks): Likewise.
      (vshEventBlockJobPrint): Adjust client.
      * src/remote_protocol-structs: Regenerate.
      Signed-off-by: NEric Blake <eblake@redhat.com>
      1bfe73a1
  20. 18 6月, 2014 2 次提交
  21. 13 6月, 2014 1 次提交
    • E
      virsh: improve blockcopy UI · 17840379
      Eric Blake 提交于
      Peter's review of an early version of my addition of active block
      commit pointed out some issues that I was copying from the block
      copy code; fix them up now before perpetuating them.
      
      For virsh commands that manage a single API call, it's nice to have
      a 1:1 mapping of options to flags, so that we can test that
      lower-layer software handles flag combinations correctly.  But where
      virsh is introducing syntactic sugar to combine multiple API calls
      into a single user interface, we might as well make that interface
      compact.  That is, we should allow the shorter command-line of
      'blockcopy $dom $disk --pivot' without having to explicitly specify
      --wait, because this isn't directly a flag passed to a single
      underlying API call.
      
      Also, my use of embedded ?: ternaries bordered on unreadable.
      
      * tools/virsh-domain.c (cmdBlockCopy): Make --pivot, --finish,
      and --timeout imply --wait. Drop excess ?: operators.
      * tools/virsh.pod (blockcopy): Update documentation.
      Signed-off-by: NEric Blake <eblake@redhat.com>
      17840379
  22. 12 6月, 2014 3 次提交