1. 02 4月, 2015 1 次提交
    • J
      Remove unused includes from virsh · 8995e91b
      Ján Tomko 提交于
      After splitting out most of virsh command, some includes
      are no longer needed.
      
      Some files have the libXML includes despite not needing them.
      8995e91b
  2. 30 3月, 2015 1 次提交
  3. 29 3月, 2015 1 次提交
    • E
      build: avoid variable named 'interface', for mingw · 75d56f51
      Eric Blake 提交于
      Commit 2f36e694 (re-)introduced a use of an identifier 'interface',
      which causes this build failure on mingw:
      
      ../../tools/virsh-domain-monitor.c: In function 'cmdDomIfAddr':
      ../../tools/virsh-domain-monitor.c:2233:17: error: expected identifier or '(' before 'struct'
           const char *interface = NULL;
                            ^
      
      See also commit 6512c8b4.  Sadly, I'm not quite sure how to write a
      syntax check that can poison the use of this identifier.
      
      * tools/virsh-domain-monitor.c (cmdDomIfAddr): Use ifacestr instead.
      Signed-off-by: NEric Blake <eblake@redhat.com>
      75d56f51
  4. 26 3月, 2015 3 次提交
  5. 25 3月, 2015 1 次提交
  6. 23 3月, 2015 1 次提交
  7. 18 3月, 2015 6 次提交
    • J
      Use PAUSED state for domains that are starting up · 18441ab9
      Jiri Denemark 提交于
      When libvirt is starting a domain, it reports the state as SHUTOFF until
      it's RUNNING. This is not ideal because domain startup may take a long
      time (usually because of some configuration issues, firewalls blocking
      access to network disks, etc.) and domain lists provided by libvirt look
      awkward. One can see weird shutoff domains with IDs in a list of active
      domains or even shutoff transient domains. In any case, it looks more
      like a bug in libvirt than a normal state a domain goes through.
      Signed-off-by: NJiri Denemark <jdenemar@redhat.com>
      18441ab9
    • M
      cmdDomIfAddr: Free @ip_addr_str · 0aff8fa8
      Michal Privoznik 提交于
      The variable holds formatted suffix to each line printed out
      (address type, address and prefix). However, the variable is
      never freed. At the same time, honour fact, that data held in
      the variable is not constant.
      Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
      0aff8fa8
    • M
      virsh: Adapt to new HW address scenario · 50780207
      Michal Privoznik 提交于
      Make sure we don't print (null) (which in fact is printf()'s
      cleverness anyway, not ours). If no HW address is present, print
      "N/A" string just like we do for other fields.
      Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
      50780207
    • P
      virsh: domain: Fix the change-media command · f4b5f530
      Peter Krempa 提交于
      The command did not modify the disk type and thus didn't allow to change
      media from a file image to a block backed image or vice versa. In
      addition when operating on a network backed removable devices the
      command would replace the while <source> subelement with an invalid one.
      
      This patch adds the --block option that allows to specify that the new
      image is block backed and assumes that without that option all images
      are file backed. Since network backends were always mangled it should
      not cause problems.
      f4b5f530
    • P
      virsh: domain: Add --print-xml flag for command change-media · 4cbcaffb
      Peter Krempa 提交于
      Allow printing the XML that would be used mostly for debugging purposes.
      4cbcaffb
    • P
      virsh: domain: Don't use vshPrepareDiskXML for creating XML to detach disk · 1cc82093
      Peter Krempa 提交于
      Since cmdDetachDisk() calls into vshPrepareDiskXML() with
      type == VSH_PREPARE_DISK_XML_NONE && source == NULL this would result
      into skipping all the checks and effectively turn the function into a
      XML formatter.
      
      This patch changes the code to use the formatter directly so that the
      function can be refactored in a easier way.
      1cc82093
  8. 17 3月, 2015 3 次提交
    • N
      domifaddr: Add virsh support · 2f36e694
      Nehal J Wani 提交于
      tools/virsh-domain-monitor.c
         * Introduce new command : domifaddr
           Usage: domifaddr <domain> [interface] [--full] [--source lease|agent]
      
           Example outputs:
           virsh # domifaddr f20
           Name       MAC address          Protocol     Address
           -------------------------------------------------------------------------------
           lo         00:00:00:00:00:00    ipv4         127.0.0.1/8
           -          -                    ipv6         ::1/128
           vnet0      52:54:00:2e:45:ce    ipv4         10.1.33.188/24
           -          -                    ipv6         2001:db8:0:f101::2/64
           -          -                    ipv6         fe80::5054:ff:fe2e:45ce/64
           vnet1      52:54:00:b1:70:19    ipv4         192.168.105.201/16
           -          -                    ipv4         192.168.201.195/16
           -          -                    ipv6         fe80::5054:ff:feb1:7019/64
           vnet2      52:54:00:36:2a:e5    N/A          N/A
           vnet3      52:54:00:20:70:3d    ipv4         192.168.105.240/16
           -          -                    ipv6         fe80::5054:ff:fe20:703d/64
      
           virsh # domifaddr f20 eth1 --source lease
           Name       MAC address          Protocol     Address
           -------------------------------------------------------------------------------
           vnet1      52:54:00:b1:70:19    ipv4         192.168.105.201/16
           -          -                    ipv4         192.168.201.195/16
           -          -                    ipv6         fe80::5054:ff:feb1:7019/64
      
           virsh # domifaddr f20 eth0 --source agent --full
           Name       MAC address          Protocol     Address
           -------------------------------------------------------------------------------
           eth0       52:54:00:2e:45:ce    ipv4         10.1.33.188/24
           eth0       52:54:00:2e:45:ce    ipv6         2001:db8:0:f101::2/64
           eth0       52:54:00:2e:45:ce    ipv6         fe80::5054:ff:fe2e:45ce/64
      
      tools/virsh.pod
         * Document new command
      Signed-off-by: NNehal J Wani <nehaljw.kkd1@gmail.com>
      2f36e694
    • P
      wireshark: fix VPATH build · 57f726a5
      Pavel Hrdina 提交于
      Add $(top_builddir) paths to INCLUDES to fix VPATH build.
      Signed-off-by: NPavel Hrdina <phrdina@redhat.com>
      57f726a5
    • P
      rpm-build: use pkg-config to detect wireshark presence · 37397320
      Pavel Hrdina 提交于
      Wireshark supports pkg-config since 1.11.3.  Right now we build
      wireshark-dissectior tool as default trough rpm build only on
      fedora >= 21 and there is new wireshark that supports pkg-config.
      If someone wants to build libvirt with wireshark-dissector against old
      wireshark, they should specify the location by hand.
      
      This patch is mainly to fix wrong dependency on wireshark binary as it
      doesn't make sense to require that binary file to just get version info
      of that package in makefile.
      Signed-off-by: NPavel Hrdina <phrdina@redhat.com>
      37397320
  9. 15 3月, 2015 1 次提交
    • E
      virsh: fix report of non-active commit completion · ceec58ac
      Eric Blake 提交于
      Commit f182da20 (v1.2.6) caused a slight regression in virsh
      reporting of a non-active block job; where it used to state
      "Commit complete", it now states "Now in synchronized phase".
      But the synchronized phase is only possible for an active commit.
      
      For a reproducer, I created a chain 'a <- b <- c <- d <- e' and
      ran virsh blockcommit $dom vda --top c --base a --verbose --wait
      
      * tools/virsh-domain.c (cmdBlockCommit): Synchronized phase is
      only possible on active commits.
      Signed-off-by: NEric Blake <eblake@redhat.com>
      ceec58ac
  10. 12 3月, 2015 1 次提交
    • J
      virsh: Add iothreadpin command · 1cfc0a99
      John Ferlan 提交于
      https://bugzilla.redhat.com/show_bug.cgi?id=1135491
      
      $ virsh iothread --help
      
        NAME
          iothreadpin - control domain IOThread affinity
      
        SYNOPSIS
          iothreadpin <domain> <iothread> <cpulist> [--config] [--live] [--current]
      
        DESCRIPTION
          Pin domain IOThreads to host physical CPUs.
      
        OPTIONS
          [--domain] <string>  domain name, id or uuid
          [--iothread] <number>  IOThread ID number
          [--cpulist] <string>  host cpu number(s) to set
          --config         affect next boot
          --live           affect running domain
          --current        affect current domain
      
      Using the output from iothreadsinfo, allow changing the pinned CPUs for
      a single IOThread.
      
      $ virsh iothreadsinfo $dom
       IOThread ID    CPU Affinity
      ---------------------------------------------------
       1               2
       2               3
       3               0-1
      
      $ virsh iothreadpin $dom 3 0-2
      
      Then view the change
      
      $ virsh iothreadsinfo $dom
       IOThread ID    CPU Affinity
      ---------------------------------------------------
       1               2
       2               3
       3               0-2
      
      If an invalid value is supplied or require option missing,
      then an error will be displayed:
      
      $ virsh iothreadpin $dom 4 3
      error: invalid argument: iothread value out of range 4 > 3
      
      $ virsh iothreadpin $dom 3
      error: command 'iothreadpin' requires <cpulist> option
      1cfc0a99
  11. 11 3月, 2015 1 次提交
  12. 09 3月, 2015 4 次提交
  13. 06 3月, 2015 2 次提交
    • J
      virsh: Add 'iothreadsinfo' command · f41a5b84
      John Ferlan 提交于
      Add the 'iothreadsinfo' command to display IOThread Info data. Allow for
      [--live] or [--config] options in order to display live or config data
      for an active domain.
      
      $ virsh iothreadsinfo --help
        NAME
          iothreadsinfo - view domain IOThreads
      
        SYNOPSIS
          iothreadsinfo <domain> [--config] [--live] [--current]
      
        DESCRIPTION
          Returns basic information about the domain IOThreads.
      
        OPTIONS
          [--domain] <string>  domain name, id or uuid
          --config         affect next boot
          --live           affect running domain
          --current        affect current domain
      
      An active domain may return:
      
      $ virsh iothreads $dom
       IOThread ID     CPU Affinity
      ---------------------------------------------------
        1               2
        2               3
        3               0
      
      $ echo $?
      0
      
      For domains which don't have IOThreads the following is returned:
      
      $ virsh iothreads $dom
      No IOThreads found for the domain
      
      $ echo $?
      0
      
      For domains which are not running the following is returned:
      
      $ virsh iothreads $dom --live
      error: Unable to get domain IOThreads information
      error: Requested operation is not valid: domain is not running
      
      $ echo $?
      1
      
      Editing a domains configuration and modifying the iothreadpin data for
      thread 3 from nothing provided to setting a cpuset of '0-1' and then
      displaying using --config would display:
      
      $ virsh iothreads f18iothr --config
       IOThread ID     CPU Affinity
       ----------------------------
        1               2
        2               3
        3               0-1
      
      $
      Signed-off-by: NJohn Ferlan <jferlan@redhat.com>
      f41a5b84
    • P
      virsh: fix memtune to also accept 0 as valid value · c2020b08
      Pavel Hrdina 提交于
      Fix vshMemtuneGetSize to return correct value.  We can then decide
      according that return code whether a parameter is present and valid or
      not.  This will allow as to accept 0 as a valid value.
      Signed-off-by: NPavel Hrdina <phrdina@redhat.com>
      c2020b08
  14. 04 3月, 2015 2 次提交
  15. 03 3月, 2015 3 次提交
  16. 02 3月, 2015 2 次提交
  17. 25 2月, 2015 2 次提交
  18. 24 2月, 2015 1 次提交
  19. 23 2月, 2015 1 次提交
    • M
      libvirt-guests: Allow time sync on guests resume · 0fa15b19
      Michal Privoznik 提交于
      Well, imagine domains were running, and as the host went down, they
      were managesaved. Later, after some time, the host went up again and
      domains got restored. But without correct time. And depending on how
      long was the host shut off, it may take some time for ntp to sync the
      time too. But hey, wait a minute. We have an API just for that! So:
      
      1) Introduce SYNC_TIME variable in libvirt-guests.sysconf to allow
      users control over the new functionality
      2) Call 'virsh domtime --sync $dom' in the libvirt-guests script.
      
      Unfortunately, this is all-or-nothing approach (just like anything
      else with the script). Domains are required to have configured and
      running qemu-ga inside.
      Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
      0fa15b19
  20. 20 2月, 2015 2 次提交
  21. 16 2月, 2015 1 次提交