1. 25 2月, 2015 1 次提交
  2. 24 2月, 2015 1 次提交
  3. 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
  4. 20 2月, 2015 2 次提交
  5. 16 2月, 2015 1 次提交
  6. 13 2月, 2015 3 次提交
  7. 11 2月, 2015 1 次提交
    • L
      virsh: fix IP address in domdisplay for listen type='network' · 1ba8156c
      Luyao Huang 提交于
      https://bugzilla.redhat.com/show_bug.cgi?id=1191016
      
      virsh's domdisplay command looks in /domain/devices/graphics/@listen
      of the domain's XML for the listen address, however for listen
      type='network' (added in libvirt 0.9.4), the <graphics> element
      doesn't have a listen attribute, but has a <listen> subelement,
      *still* with no address (this is the inactive XML):
      
       <graphics type='spice' autoport='yes' keymap='en-us'>
        <listen type='network' network='default'/>
       </graphics>
      
      However, at domain start time the <listen> subelement gets its address
      attribute filled in once libvirt figures out the IP address associated
      with the named network (this is the status XML):
      
       <graphics type='spice' port='5901' autoport='yes' keymap='en-us'>
        <listen type='network' address='192.168.122.1' network='default'/>
       </graphics>
      
      So in these cases, we need to look at
      /domain/devices/graphics/listen/@address instead.
      
      Even though another patch is being pushed that will backfill
      listen/@address into @listen, this patch is still useful, as it fixes
      domdisplay for cases of a new virsh (with this patch) connecting to a
      libvirtd that is newer than 0.9.4 but doesn't have the followup patch.
      Signed-off-by: NLuyao Huang <lhuang@redhat.com>
      Signed-off-by: NLaine Stump <laine@laine.org>
      1ba8156c
  8. 09 2月, 2015 1 次提交
  9. 04 2月, 2015 1 次提交
  10. 29 1月, 2015 2 次提交
  11. 16 1月, 2015 1 次提交
    • D
      virsh: add support for domain XML validation · d7565bd8
      Daniel P. Berrange 提交于
      The 'virsh edit' command gets XML validation enabled by default,
      with a --skip-validate option to disable it. The 'virsh define'
      and 'virsh create' commands get a --validate option to enable
      it, to avoid regressions for existing scripts.
      
      The quality of error reporting from libxml2 varies depending
      on the type of XML error made. Sometimes it is quite clear
      and useful, other times it is obscure & inaccurate. At least
      the user will see an error now, rather than having their
      XML modification silently disappear.
      d7565bd8
  12. 14 1月, 2015 1 次提交
  13. 12 1月, 2015 1 次提交
  14. 09 1月, 2015 1 次提交
  15. 17 12月, 2014 1 次提交
    • E
      getstats: add new flag for block backing chain · 4bffafb2
      Eric Blake 提交于
      This patch introduces access to allocation information about
      a backing chain of a live domain.  While querying storage
      volumes for read-only disks could provide some of the details,
      we do NOT want to read() a file while qemu is writing it.
      Also, there is one case where we have to rely on qemu: when
      doing a block commit into a backing file, where that file is
      stored in qcow2 format on a host block device, we want to know
      the current highest write offset into that image, in order to
      know if the disk must be resized larger.  qemu-img does not
      (currently) show this information, and none of the earlier
      block APIs were extensible enough to expose it.  But
      virDomainListGetStats is perfect for the job!
      
      We don't need a new group of statistics, as the existing block
      group is sufficient.  On the other hand, as existing libvirt
      releases already report 1:1 mapping of block.count to <disk>
      devices, changing the array size could confuse older clients;
      and even with newer clients, the time and memory taken to
      report additional statistics is not always necessary (backing
      files are generally read-only except for block-commit, so while
      read statistics may change, sizing statistics will not).  So
      the choice here is to add a new flag that only newer callers
      will pass, when they are prepared for the additional information.
      
      This patch introduces the new API, but it will take more
      patches to get it implemented for qemu.
      
      * include/libvirt/libvirt-domain.h
      (VIR_CONNECT_GET_ALL_DOMAINS_STATS_BACKING): New flag.
      * src/libvirt-domain.c (virConnectGetAllDomainStats): Document it,
      and add a new field when it is in use.
      * tools/virsh-domain-monitor.c (cmdDomstats): Use new flag.
      * tools/virsh.pod (domstats): Document it.
      Signed-off-by: NEric Blake <eblake@redhat.com>
      4bffafb2
  16. 10 12月, 2014 1 次提交
    • J
      virsh.pod: Fix typo · 1548f226
      John Ferlan 提交于
      Commit id 'c9ffd3ea' updated the descriptions, but pointed at the
      wrong place for the pool-define-as (it should have been pool-create-as)
      1548f226
  17. 09 12月, 2014 1 次提交
    • E
      getstats: add block.n.path stat · 7b499262
      Eric Blake 提交于
      I'm about to make block stats optionally more complex to cover
      backing chains, where block.count will no longer equal the number
      of <disks> for a domain.  For these reasons, it is nicer if the
      statistics output includes the source path (for local files).
      This patch doesn't add anything for network disks, although we
      may decide to add that later.
      
      With this patch, I now see the following for the same domain as
      in the previous patch (one qcow2 file, and an empty cdrom drive):
      $ virsh domstats --block foo
      Domain: 'foo'
        block.count=2
        block.0.name=hda
        block.0.path=/var/lib/libvirt/images/foo.qcow2
        block.1.name=hdc
      
      * src/libvirt-domain.c (virConnectGetAllDomainStats): Document
      new field.
      * tools/virsh.pod (domstats): Document new field.
      * src/qemu/qemu_driver.c (qemuDomainGetStatsBlock): Return the new
      stat for local files/block devices.
      (QEMU_ADD_NAME_PARAM): Add parameter.
      (qemuDomainGetStatsInterface): Update caller.
      Signed-off-by: NEric Blake <eblake@redhat.com>
      7b499262
  18. 08 12月, 2014 1 次提交
  19. 06 12月, 2014 3 次提交
  20. 03 12月, 2014 1 次提交
  21. 25 11月, 2014 1 次提交
  22. 24 11月, 2014 2 次提交
    • T
      virsh: expose virDomainGetFSInfo · fadfcd91
      Tomoki Sekiyama 提交于
      Add a "domfsinfo" command that shows a list of filesystems info mounted in
      the guest. For example:
      
      virsh # domfsinfo vm1
      Mountpoint                           Name     Type     Target
      -------------------------------------------------------------------
      /                                    sda1     ext4     hdc
      /opt                                 dm-2     vfat     vda,vdb
      /mnt/test                            sdb1     xfs      sda
      Signed-off-by: NTomoki Sekiyama <tomoki.sekiyama@hds.com>
      fadfcd91
    • P
      event: Add guest agent lifecycle event · 1a460910
      Peter Krempa 提交于
      As qemu is now able to notify us about change of the channel state used
      for communication with the guest agent we now can more precisely track
      the state of the guest agent.
      
      To allow notifying management apps this patch implements a new event
      that will be triggered on changes of the guest agent state.
      1a460910
  23. 21 11月, 2014 1 次提交
  24. 20 11月, 2014 2 次提交
    • E
      build: avoid 32-bit failure on older gcc · 0d516839
      Eric Blake 提交于
      On 32-bit platforms with old gcc (hello RHEL 5 gcc 4.1.2), the
      build fails with:
      virsh-domain.c: In function 'cmdBlockCopy':
      virsh-domain.c:2172: warning: comparison is always false due to limited range of data type
      
      Adjust the code to silence the warning.
      
      * tools/virsh-domain.c (cmdBlockCopy): Pacify RHEL 5 gcc.
      Signed-off-by: NEric Blake <eblake@redhat.com>
      0d516839
    • E
      virsh: Fix msg: blockjob is aborted from another client · 8312d44d
      Erik Skultety 提交于
      When a block{pull, copy, commit} is aborted via keyboard interrupt,
      the job is properly canceled followed by proper error message.
      However, when the job receives an abort from another client connected
      to the same domain, the error message incorrectly indicates that
      a blockjob has been finished successfully, though the abort request
      took effect. This patch introduces a new blockjob abort handler, which
      is registered when the client calls block{copy,commit,pull} routine,
      providing its caller the status of the finished blockjob.
      
      Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1135442
      8312d44d
  25. 19 11月, 2014 1 次提交
    • E
      maint: forbid 'int foo = true' · eb909376
      Eric Blake 提交于
      I noticed this while working on qemuDomainGetBlockInfo.  Assigning
      a bool value to an int variable compiles fine, but raises red flags
      on the maintenance front as it becomes too easy to assign -1 or 2
      or any other non-bool value to the same variable.
      
      * cfg.mk (sc_prohibit_int_assign_bool): New rule.
      * src/conf/snapshot_conf.c (virDomainSnapshotRedefinePrep): Fix
      offenders.
      * src/qemu/qemu_driver.c (qemuDomainGetBlockInfo)
      (qemuDomainSnapshotCreateXML): Likewise.
      * src/test/test_driver.c (testDomainSnapshotAlignDisks):
      Likewise.
      * src/util/vircgroup.c (virCgroupSupportsCpuBW): Likewise.
      * src/util/virpci.c (virPCIDeviceBindToStub): Likewise.
      * src/util/virutil.c (virIsCapableVport): Likewise.
      * tools/virsh-domain-monitor.c (cmdDomMemStat): Likewise.
      * tools/virsh-domain.c (cmdBlockResize, cmdScreenshot)
      (cmdInjectNMI, cmdSendKey, cmdSendProcessSignal)
      (cmdDetachInterface): Likewise.
      Signed-off-by: NEric Blake <eblake@redhat.com>
      eb909376
  26. 15 11月, 2014 2 次提交
  27. 13 11月, 2014 3 次提交
  28. 11 11月, 2014 2 次提交