1. 27 8月, 2014 2 次提交
    • E
      API: Tweak virDomainOpenGraphics to return fd directly · b259e459
      Eric Blake 提交于
      Let's fix this before we bake in a painful API.  Since we know
      that we have exactly one non-negative fd on success, we might
      as well return the fd directly instead of forcing the user to
      pass in a pointer.  Furthermore, I found some memory and fd
      leaks while reviewing the code - the idea is that on success,
      libvirtd will have handed two fds in two different directions:
      one to qemu, and one to the RPC client.
      
      * include/libvirt/libvirt.h.in (virDomainOpenGraphicsFD): Drop
      unneeded parameter.
      * src/driver.h (virDrvDomainOpenGraphicsFD): Likewise.
      * src/libvirt.c (virDomainOpenGraphicsFD): Adjust interface to
      return fd directly.
      * daemon/remote.c (remoteDispatchDomainOpenGraphicsFd): Adjust
      semantics.
      * src/qemu/qemu_driver.c (qemuDomainOpenGraphicsFD): Likewise,
      and plug fd leak.
      * src/remote/remote_driver.c (remoteDomainOpenGraphicsFD):
      Likewise, and plug memory and fd leak.
      Signed-off-by: NEric Blake <eblake@redhat.com>
      b259e459
    • J
  2. 26 8月, 2014 2 次提交
    • E
      blkdeviotune: check for overflow when parsing XML · 2f0944de
      Erik Skultety 提交于
      According to docs/schemas/domaincommon.rng and _virDomainBlockIoTuneInfo
      all the iotune values are interpreted as unsigned long long, however
      according to qemu_monitor_json.c, qemu silently truncates numbers
      larger than LLONG_MAX. There's really not much of a usage for such
      large numbers anyway yet. This patch provides the same overflow
      check during a domain start as it does during setting
      a blkdeviotune element in qemu_driver.c and thus reports an error when
      a larger number than LLONG_MAX is detected.
      
      https://bugzilla.redhat.com/show_bug.cgi?id=1131876
      2f0944de
    • A
      Add new 'kvm' domain feature and ability to hide KVM signature · d0711642
      Alex Williamson 提交于
      QEMU 2.1 added support for the kvm=off option to the -cpu command,
      allowing the KVM hypervisor signature to be hidden from the guest.
      This enables disabling of some paravirualization features in the
      guest as well as allowing certain drivers which test for the
      hypervisor to load.  Domain XML syntax is as follows:
      
      <domain type='kvm>
        ...
        <features>
          ...
          <kvm>
            <hidden state='on'/>
          </kvm>
        </features>
        ...
      Signed-off-by: NAlex Williamson <alex.williamson@redhat.com>
      d0711642
  3. 25 8月, 2014 2 次提交
  4. 23 8月, 2014 1 次提交
    • E
      qemu: check for active domain after agent interaction · 2c551d34
      Eric Blake 提交于
      Commit b606bbb4 reminded me that any time we drop locks to run
      back-to-back guest interaction commands, we have to check that
      the guest didn't disappear in between the two commands.  A quick
      audit found a couple of spots that were missing this check.
      
      * src/qemu/qemu_driver.c (qemuDomainShutdownFlags)
      (qemuDomainSetVcpusFlags): Check that domain is still up.
      Signed-off-by: NEric Blake <eblake@redhat.com>
      2c551d34
  5. 22 8月, 2014 2 次提交
  6. 21 8月, 2014 1 次提交
    • J
      Perform disk config validity checking for attach-device config · 33188c9f
      John Ferlan 提交于
      https://bugzilla.redhat.com/show_bug.cgi?id=1078126
      
      Using 'virsh attach-device --config' (or --persistent) to attach a
      file backed lun device will succeed; however, subsequent domain restarts
      will result in failure because the configuration of a file backed lun
      is not supported.
      
      Although allowing 'illegal configurations' is something that can be
      allowed, it may not be practical in this case. Generally, when attaching
      a device to a domain means the domain must be running. A way around
      this is using the --config (or --persistent) option. When an attach
      is done to a running domain, a temporary configuration is modified
      first followed by the live update. The live update will make a number
      of disk validity checks when building the qemu command to attach the
      disk. If any fail, then change is rejected.
      
      Rather than allow a potentially illegal combination, adjust the code
      in the configuration path to make the same checks as the running path
      will make with respect to disk validity checks. This way we avoid
      having the potential for some subsequent start/reboot to fail because
      an illegal combination was allowed.
      
      NB: The live path still checks the configuration since it is possible
      to just do --live guest modification...
      33188c9f
  7. 20 8月, 2014 21 次提交
  8. 19 8月, 2014 1 次提交
  9. 18 8月, 2014 4 次提交
  10. 15 8月, 2014 1 次提交
  11. 14 8月, 2014 1 次提交
  12. 12 8月, 2014 2 次提交
    • M
      qemu_conf: Undefine the correct symbol · bf4cbe40
      Michal Privoznik 提交于
      At the beginning of the qemu config file parsing function there
      are 3 helper macros defined: GET_VALUE_BOOL, GET_VALUE_LONG and
      GET_VALUE_STR. Later, when they are no longer needed they are
      undefined in order to keep the namespace clean. However, the
      GET_VALUE_STRING is undefined instead of GET_VALUE_STR.
      Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
      bf4cbe40
    • 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