1. 29 9月, 2011 6 次提交
    • M
      esx: Report an error for acceptable URI schemes with a transport · 3d308f75
      Matthias Bolte 提交于
      Before, URIs such as esx+ssh:// have been declined by the ESX driver
      resulting in the remote driver trying to connect to an non-existing
      libvirtd.
      
      Now such URIs trigger an error in the ESX driver suggesting to try
      again without the transport part in the scheme.
      3d308f75
    • D
      formatdomain.html.in: fix tickpolicy · c7d1f598
      Douglas Schilling Landgraf 提交于
      there is no option "none":
      
      >From libvirt/src/conf/domain_conf.c
      
      <snip>
      VIR_ENUM_IMPL(virDomainTimerTickpolicy,
      VIR_DOMAIN_TIMER_TICKPOLICY_LAST,
                    "delay",
                    "catchup",
                    "merge",
                    "discard");
      </snip>
      
      Replacing with delay.
      Signed-off-by: NDouglas Schilling Landgraf <dougsland@redhat.com>
      c7d1f598
    • D
      virsh: describe attach-interface parameter target · dd09da70
      Daniel Veillard 提交于
      This patch is based on a improvement suggested by Kazuhiro Kikuchi
      of Fujitsu, it gives a description of the target parameter for that
      command
      
      * tools/virsh.pod: add description for target parameter of
        attach-interface
      dd09da70
    • D
      virsh: update man page for cpu_shares parameter · 0c92e142
      Daniel Veillard 提交于
      The man page suggest that the cpu_shares parameter of schedinfo
      allows values 0-262144, but the kernel remaps values 0 and 1 to
      the minimum 2, just document that behaviour:
      
      [root@test ~]# cat /cgroup/cpu/libvirt/qemu/cpu.shares
      1024
      [root@test ~]# echo 0 > /cgroup/cpu/libvirt/qemu/cpu.shares
      [root@test ~]# cat /cgroup/cpu/libvirt/qemu/cpu.shares
      2
      [root@test ~]# echo 1 > /cgroup/cpu/libvirt/qemu/cpu.shares
      [root@test ~]# cat /cgroup/cpu/libvirt/qemu/cpu.shares
      2
      [root@test ~]#
      
      * tools/virsh.pod: update description of the cpu_shares parameter
        to indicate the values 0 and 1 are automatically changed by the
        kernel to minimal value 2
      0c92e142
    • M
      qemu: Check for ejected media during startup and migration · b1b5b51a
      Michal Privoznik 提交于
      If the daemon is restarted so we reconnect to monitor, cdrom media
      can be ejected. In that case we don't want to show it in domain xml,
      or require it on migration destination.
      
      To check for disk status use 'info block' monitor command.
      b1b5b51a
    • A
      qemu: add return value check · b6dd366a
      Alex Jia 提交于
      * src/qemu/qemu_migration.c: if 'vmdef' is NULL, the function
        virDomainSaveConfig still dereferences it, it doesn't make
        sense, so should add return value check to make sure 'vmdef'
        is non-NULL before calling virDomainSaveConfig, in addition,
        in order to debug later, also should record error information
        into log.
      Signed-off-by: NAlex Jia <ajia@redhat.com>
      b6dd366a
  2. 28 9月, 2011 16 次提交
    • E
      snapshot: implement getparent in qemu · 4ee8092d
      Eric Blake 提交于
      First hypervisor implementation of the new API.
      Allows 'virsh snapshot-list --tree' to be more efficient.
      
      * src/qemu/qemu_driver.c (qemuDomainSnapshotGetParent): New
      function.
      4ee8092d
    • E
      snapshot: add virsh snapshot-list --tree · 1cf0e3db
      Eric Blake 提交于
      Reuse the tree listing of nodedev-list, coupled with the new helper
      function to efficiently grab snapshot parent names, to produce
      tree output for a snapshot hierarchy.  For example:
      
      $ virsh snapshot-list dom --tree
      root1
       |
        +- sibling1
        +- sibling2
        |   |
        |   +- grandchild
        |
        +- sibling3
      
      root2
       |
        +- child
      
      * tools/virsh.c (cmdSnapshotList): Add --tree.
      * tools/virsh.pod (snapshot-list): Document it.
      1cf0e3db
    • E
      snapshot: refactor virsh snapshot parent computation · d1be48f9
      Eric Blake 提交于
      Make parent computation reusable, using virDomainSnapshotGetParent
      when possible.
      
      * tools/virsh.c (vshGetSnapshotParent): New helper.
      (cmdSnapshotParent): Use it.
      d1be48f9
    • E
      snapshot: remote protocol for getparent · 3ca4296f
      Eric Blake 提交于
      Mostly straight-forward, although this is the first API that
      returns a new snapshot based on a snapshot rather than a domain.
      
      * src/remote/remote_protocol.x
      (REMOTE_PROC_DOMAIN_SNAPSHOT_GET_PARENT): New rpc.
      (remote_domain_snapshot_get_parent_args)
      (remote_domain_snapshot_get_parent_ret): New structs.
      * src/rpc/gendispatch.pl: Adjust generator.
      * src/remote/remote_driver.c (remote_driver): Use it.
      * src/remote_protocol-structs: Update.
      3ca4296f
    • E
      snapshot: new virDomainSnapshotGetParent API · a2f706de
      Eric Blake 提交于
      Although a client can already obtain a snapshot's parent by
      dumping and parsing the xml, then doing a snapshot lookup by
      name, it is more efficient to get the parent in one step, which
      in turn will make operations that must traverse a snapshot
      hierarchy easier to perform.
      
      * include/libvirt/libvirt.h.in (virDomainSnapshotGetParent):
      Declare.
      * src/libvirt.c (virDomainSnapshotGetParent): New function.
      * src/libvirt_public.syms: Export it.
      * src/driver.h (virDrvDomainSnapshotGetParent): New callback.
      a2f706de
    • E
      docs: document node device XML · b1746239
      Eric Blake 提交于
      Coupled with the recent virsh nodedev-* doc patch, this should now
      give a better picture of libvirt node device handling.
      
      * docs/formatnode.html.in: Fill in page.
      b1746239
    • E
      docs: document virsh nodedev-* commands · beeab559
      Eric Blake 提交于
      This section of the man page was completely missing; I stumbled on
      it when I had no clue that I had to use nodedev-reattach after
      I was done playing with <hostdev> device passthrough to one of my
      guests.
      
      * tools/virsh.pod (NODEDEV COMMANDS): New section.
      (attach-device, detach-device): Add cross-references.
      beeab559
    • L
      security: properly chown/label bidirectional and unidirectional fifos · 46e8dc71
      Laine Stump 提交于
      This patch fixes the regression with using named pipes for qemu serial
      devices noted in:
      
        https://bugzilla.redhat.com/show_bug.cgi?id=740478
      
      The problem was that, while new code in libvirt looks for a single
      bidirectional fifo of the name given in the config, then relabels that
      and continues without looking for / relabelling the two unidirectional
      fifos named ${name}.in and ${name}.out, qemu looks in the opposite
      order. So if the user had naively created all three fifos, libvirt
      would relabel the bidirectional fifo to allow qemu access, but qemu
      would attempt to use the two unidirectional fifos and fail (because it
      didn't have proper permissions/rights).
      
      This patch changes the order that libvirt looks for the fifos to match
      what qemu does - first it looks for the dual fifos, then it looks for
      the single bidirectional fifo. If it finds the dual unidirectional
      fifos first, it labels/chowns them and ignores any possible
      bidirectional fifo.
      
      (Note commit d37c6a3a (which first appeared in libvirt-0.9.2) added
      the code that checked for a bidirectional fifo. Prior to that commit,
      bidirectional fifos for serial devices didn't work because libvirt
      always required the ${name}.(in|out) fifos to exist, and qemu would
      always prefer those.
      46e8dc71
    • J
      qemu: Preserve fakeReboot flag in domain status · bd83b2a3
      Jiri Denemark 提交于
      Thus, when libvirtd is restarted, it will know if a domain is supposed
      to be killed or reset when it shuts down.
      bd83b2a3
    • J
      qemu: Finish domain shutdown on reconnect · cc0e4e8d
      Jiri Denemark 提交于
      If a domain started with -no-shutdown shuts down while libvirtd is not
      running, it will be seen as paused when libvirtd reconnects to it. Use
      the paused reason to detect if a domain was stopped because of shutdown
      and finish the process just as if a SHUTDOWN event is delivered from
      qemu.
      cc0e4e8d
    • J
      qemu: Check domain status details when reconnecting monitor · c20b7c98
      Jiri Denemark 提交于
      Current qemu is able to give us detailed domain status (not just if it
      is running or not) which we can translate into a status reason.
      c20b7c98
    • J
      qemu: Always remove domain object if MigratePrepare fails · 1cb031a2
      Jiri Denemark 提交于
      If migration failed in Prepare phase after virDomainAssignDef and before
      a job was started, the domain object was not properly removed.
      1cb031a2
    • J
      fix AppArmor driver for pipe character devices · 03d89991
      Jamie Strandboge 提交于
      The AppArmor security driver adds only the path specified in the domain
      XML for character devices of type 'pipe'. It should be using <path>.in
      and <path>.out. We do this by creating a new vah_add_file_chardev() and
      use it for char devices instead of vah_add_file(). Also adjust
      valid_path() to accept S_FIFO (since qemu chardevs of type 'pipe' use
      fifos). This is https://launchpad.net/bugs/832507
      03d89991
    • P
      virsh: Allow using complete <capabilities> elements with cpu-baseline · b0889eae
      Peter Krempa 提交于
      This patch cleans the cpu baseline function using new libvirt helper
      functions and fixes XPath expression that selects <cpu> elements from
      the source file, that can contain concatenated <capabilities> XMLs,
      domain XMLs and bare <cpu> elements. The fixed XPath expression ensures
      not to select NUMA <cpu id=... elements.
      
      This patch also removes vshRealloc function, that remained unused after
      cleaning up cpu-baseline.
      
      https://bugzilla.redhat.com/show_bug.cgi?id=731645
      b0889eae
    • P
      virsh: Allow using domain and capabilities XMLs with cpu-compare · 882e768e
      Peter Krempa 提交于
      This patch adds extraction of the <cpu> element from capabilities and
      domain definition XML documents to improve user experience.
      
      https://bugzilla.redhat.com/show_bug.cgi?id=731151
      882e768e
    • E
      snapshot: fix man page typos · 63b2edc8
      Eric Blake 提交于
      pod2man from perl-5.8.8 (RHEL 5) errors out on ill-formed POD:
      
      *** ERROR: unterminated I<...> at line 1114 in file virsh.pod
      *** ERROR: unterminated I<...> at line 1851 in file virsh.pod
      
      Newer pod2man appears to be more tolerant (which is a shame,
      because it meant that this error is harder to detect).
      
      * tools/virsh.pod (undefine, snapshot-current): Add missing >.
      63b2edc8
  3. 27 9月, 2011 9 次提交
    • L
      qemu: add ability to set PCI device "rombar" on or off · dc79852a
      Laine Stump 提交于
      This patch was made in response to:
      
        https://bugzilla.redhat.com/show_bug.cgi?id=738095
      
      In short, qemu's default for the rombar setting (which makes the
      firmware ROM of a PCI device visible/not on the guest) was previously
      0 (not visible), but they recently changed the default to 1
      (visible). Unfortunately, there are some PCI devices that fail in the
      guest when rombar is 1, so the setting must be exposed in libvirt to
      prevent a regression in behavior (it will still require explicitly
      setting <rom bar='off'/> in the guest XML).
      
      rombar is forced on/off by adding:
      
        <rom bar='on|off'/>
      
      inside a <hostdev> element that defines a PCI device. It is currently
      ignored for all other types of devices.
      
      At the moment there is no clean method to determine whether or not the
      rombar option is supported by QEMU - this patch uses the advice of a
      QEMU developer to assume support for qemu-0.12+. There is currently a
      patch in the works to put this information in the output of "qemu-kvm
      -device pci-assign,?", but of course if we switch to keying off that,
      we would lose support for setting rombar on all the versions of qemu
      between 0.12 and whatever version gets that patch.
      dc79852a
    • E
      spec: F15 still uses cgconfig, RHEL lacks hyperv · ba6cbb18
      Eric Blake 提交于
      Commit ecd8725c dropped attempts to probe the cgconfig service on
      new enough Fedora where systemd took over that aspect of the system,
      but mistakenly used F14 instead of F15 as the cutoff point.
      
      https://bugzilla.redhat.com/show_bug.cgi?id=741358
      
      Also, RHEL does not include HyperV support yet.
      
      * libvirt.spec.in (with_cgconfig): Check cgconfig service in F15.
      (%{?rhel}): Provide default for with_hyperv.
      ba6cbb18
    • J
      qemu: Relax -no-shutdown check to [0.14.0, 0.15.50) · 75e31492
      Jiri Denemark 提交于
      SIGTERM handling for -no-shutdown is already fixed in qemu git and
      libvirt can safely use it. The downside is that 0.15.50 version of qemu
      can be any qemu compiled from git, even that without the fix for
      SIGTERM. However, I think this patch is worth it since excluding 0.15.50
      from the check makes testing current qemu with libvirt much easier and
      someone running qemu from git should be able to rebuild fixed qemu from
      git if they hit the problem with a hang on shutdown.
      75e31492
    • J
      virsh: Better document --copy-storage migrate options · 2c1a3dd8
      Jiri Denemark 提交于
      Both --copy-storage-{all,inc} options require disk images to be present
      on destination host.
      2c1a3dd8
    • J
      virsh: Enhance documentation of commands starting jobs · d82ce384
      Jiri Denemark 提交于
      Some virsh commands start a (long-running) job that can be monitored
      using domjobinfo and aborted with domjobabort. Let's be explicit about
      this in virsh man page.
      d82ce384
    • M
      virLockManagerNopInit: Rename flags to unused_flags · 62cb8ad7
      Michal Privoznik 提交于
      As these might be not used and make syntax-check complains about checking
      them via virCheckFlags.
      62cb8ad7
    • P
      daemon: Don't remove pidfiles in init scripts · 831977df
      Peter Krempa 提交于
      Init scripts removed pid file of the daemon. Removing pid files may be
      harmful as new api for crash-safe pidfiles is used (introduced by
      c8a3a265).
      831977df
    • M
      debug: Annotate some variables as unused · 45ad3d69
      Michal Privoznik 提交于
      as they are not used with debugging turned off.
      45ad3d69
    • O
      storage: Do not break the whole vol lookup process in the middle · 05e2fc51
      Osier Yang 提交于
      * src/storage/storage_driver.c: As virStorageVolLookupByPath lookups
      all the pool objs of the drivers, breaking when failing on getting
      the stable path of the pool will just breaks the whole lookup process,
      it can cause the API fails even if the vol exists indeed. It won't get
      any benefit. This patch is to fix it.
      05e2fc51
  4. 24 9月, 2011 1 次提交
  5. 23 9月, 2011 4 次提交
    • O
      Add unsafe cache mode support for disk driver · f887334d
      Oskari Saarenmaa 提交于
      QEMU 0.13 introduced cache=unsafe for -drive, this patch exposes
      it in the libvirt layer.
      
        * Introduced a new QEMU capability flag ($prefix_CACHE_UNSAFE),
          as even if $prefix_CACHE_V2 is set, we can't know if unsafe
          is supported.
      
        * Improved the reliability of qemu cache type detection.
      f887334d
    • D
      Fix synchronous reading of stream data · cb610092
      Daniel P. Berrange 提交于
      commit 984840a2 removed the
      notification of waiting calls when VIR_NET_CONTINUE messages
      arrive. This was to fix the case of a virStreamAbort() call
      being prematurely notified of completion.
      
      The problem is that sometimes there are dummy calls from a
      virStreamRecv() call waiting that *do* need to be notified.
      
      These dummy calls should have a status VIR_NET_CONTINUE. So
      re-add the notification upon VIR_NET_CONTINUE, but only if
      the waiter also has a status of VIR_NET_CONTINUE.
      
      * src/rpc/virnetclient.c: Notify waiting call if stream data
        arrives
      * src/rpc/virnetclientstream.c:  Mark dummy stream read packet
        with status VIR_NET_CONTINUE
      cb610092
    • M
      selinux: Correctly report warning if virt_use_nfs not set · 1888363d
      Michal Privoznik 提交于
      Previous patch c9b37fee tried to deal with virt_use_nfs. But
      setfilecon() returns EOPNOTSUPP on NFS so we need to move the
      warning to else branch.
      1888363d
    • P
      virsh: Improve virsh manual for virsh memtune command · c4111bd0
      Peter Krempa 提交于
      Commit 0a22f542 added --min-guarantee option for the memtune command.
      This option is supported only by the ESX hypervisor. This patch adds a
      statement about this fact, to prevent user confusion.
      
      This patch also adds explanation how to clear/set to unlimited the
      memory tunables. (documments the -1 value).
      c4111bd0
  6. 22 9月, 2011 4 次提交