1. 29 10月, 2014 7 次提交
  2. 28 10月, 2014 1 次提交
    • E
      qemu: forbid snapshot-delete --children-only on external snapshot · 2086a990
      Eric Blake 提交于
      https://bugzilla.redhat.com/show_bug.cgi?id=956506 documents that
      given a domain where an internal snapshot parent has an external
      snapshot child, we lacked a safety check when trying to use the
      --children-only option to snapshot-delete:
      
      $ virsh start dom
      $ virsh snapshot-create-as dom internal
      $ virsh snapshot-create-as dom external --disk-only
      $ virsh snapshot-delete dom external
      error: Failed to delete snapshot external
      error: unsupported configuration: deletion of 1 external disk snapshots not supported yet
      $ virsh snapshot-delete dom internal --children
      error: Failed to delete snapshot internal
      error: unsupported configuration: deletion of 1 external disk snapshots not supported yet
      $ virsh snapshot-delete dom internal --children-only
      Domain snapshot internal children deleted
      
      While I'd still like to see patches that actually do proper external
      snapshot deletion, we should at least fix the inconsistency in the
      meantime.  With this patch:
      
      $ virsh snapshot-delete dom internal --children-only
      error: Failed to delete snapshot internal
      error: unsupported configuration: deletion of 1 external disk snapshots not supported yet
      
      * src/qemu/qemu_driver.c (qemuDomainSnapshotDelete): Fix condition.
      Signed-off-by: NEric Blake <eblake@redhat.com>
      2086a990
  3. 23 10月, 2014 2 次提交
    • D
      Rename virDriver to virHypervisorDriver · 931dff99
      Daniel P. Berrange 提交于
      To prepare for introducing a single global driver, rename the
      virDriver struct to virHypervisorDriver and the registration
      API to virRegisterHypervisorDriver()
      931dff99
    • E
      qemu: Disallow NUMA/network tuning for session mode · 43b67f2e
      Erik Skultety 提交于
      Tuning NUMA or network interface parameters requires root
      privileges to manage cgroups. Thus an attempt to set some of these
      parameters in session mode on a running domain should be invalid
      followed by an error. An example might be memory tuning which raises
      an error in such case.
      
      The following behavior in session mode will be present after applying
      this patch:
      
        Tuning  |      SET      |   GET  |
      ----------|---------------|--------|
      NUMA      | shut off only | always |
      Memory    |     never     | never  |
      Interface |     never     | always |
      
      Resolves https://bugzilla.redhat.com/show_bug.cgi?id=1126762
      43b67f2e
  4. 22 10月, 2014 2 次提交
  5. 21 10月, 2014 3 次提交
    • M
      qemu: unref cfg after TerminateMachine has been called · 9661ac2f
      Martin Kletzander 提交于
      Commit 4882618e added the code that
      requests driver cfg, but forgot to unref it.
      Signed-off-by: NMartin Kletzander <mkletzan@redhat.com>
      9661ac2f
    • L
      qemu: x86_64 is good enough for i686 · afe8f420
      Lubomir Rintel 提交于
      virt-manager on Fedora sets up i686 hosts with "/usr/bin/qemu-kvm" emulator,
      which in turn unconditionally execs qemu-system-x86_64 querying capabilities
      then fails:
      
      Error launching details: invalid argument: architecture from emulator 'x86_64' doesn't match given architecture 'i686'
      
      Traceback (most recent call last):
        File "/usr/share/virt-manager/virtManager/engine.py", line 748, in _show_vm_helper
          details = self._get_details_dialog(uri, vm.get_connkey())
        File "/usr/share/virt-manager/virtManager/engine.py", line 726, in _get_details_dialog
          obj = vmmDetails(conn.get_vm(connkey))
        File "/usr/share/virt-manager/virtManager/details.py", line 399, in __init__
          self.init_details()
        File "/usr/share/virt-manager/virtManager/details.py", line 784, in init_details
          domcaps = self.vm.get_domain_capabilities()
        File "/usr/share/virt-manager/virtManager/domain.py", line 518, in get_domain_capabilities
          self.get_xmlobj().os.machine, self.get_xmlobj().type)
        File "/usr/lib/python2.7/site-packages/libvirt.py", line 3492, in getDomainCapabilities
          if ret is None: raise libvirtError ('virConnectGetDomainCapabilities() failed', conn=self)
      libvirtError: invalid argument: architecture from emulator 'x86_64' doesn't match given architecture 'i686'
      
      Journal:
      
      Oct 16 21:08:26 goatlord.localdomain libvirtd[1530]: invalid argument: architecture from emulator 'x86_64' doesn't match given architecture 'i686'
      afe8f420
    • Z
      qemu: move setting emulatorpin ahead of monitor showing up · 411cea63
      Zhou yimin 提交于
      If VM is configured with many devices(including passthrough devices)
      and large memory, libvirtd will take seconds(in the worst case) to
      wait for monitor. In this period the qemu process may run on any
      PCPU though I intend to pin emulator to the specified PCPU in xml
      configuration.
      
      Actually qemu process takes high cpu usage during vm startup.
      So this is not the strict CPU isolation in this case.
      Signed-off-by: NZhou yimin <zhouyimin@huawei.com>
      411cea63
  6. 15 10月, 2014 11 次提交
  7. 09 10月, 2014 3 次提交
  8. 07 10月, 2014 4 次提交
    • L
      qemu: change macvtap device MAC address in response to NIC_RX_FILTER_CHANGED · db6b738d
      Laine Stump 提交于
      This patch fills in the functionality of
      processNicRxFilterChangedEvent().  It now checks if it is appropriate
      to respond to the NIC_RX_FILTER_CHANGED event (based on device type
      and configuration) and takes appropriate action. Currently it checks
      if the guest interface has been configured with
      trustGuestRxFilters='yes', and if the host side device is macvtap. If
      so, and the MAC address on the guest has changed, the MAC address of
      the macvtap device is changed to match.
      
      The result of this is that networking from the guest will continue to
      work if the mac address of a macvtap-connected network device is
      changed from within the guest, as long as trustGuestRxFilters='yes'
      (previously changing the MAC address in the guest would break
      networking).
      db6b738d
    • L
      qemu: setup infrastructure to handle NIC_RX_FILTER_CHANGED event · b6bdda45
      Laine Stump 提交于
      NIC_RX_FILTER_CHANGED is sent by qemu any time a NIC driver in the
      guest modified the NIC's RX Filter (for example, if the MAC address of
      the NIC is changed by the guest).
      
      This patch doesn't do anything useful with that event; it just sets up
      all the plumbing to get news of the event into a worker thread with
      all proper locking/reference counting, and provide an easy place to
      add in desired functionality.
      
      See src/qemu/EVENTHANDLERS.txt for information/instructions on adding
      a libvirt-internal handler for a qemu event (using
      NIC_RX_FILTER_CHANGED as an example).
      b6bdda45
    • L
      qemu: add short document on qemu event handlers · ac4f8be4
      Laine Stump 提交于
      This text was in the commit log for the patch that added the event
      handler for NIC_RX_FILTER_CHANGED, and John Ferlan expressed a desire
      that the information not be "lost", so I've put it into a file in the
      qemu directory, hoping that it might catch the attention of future
      writers of handlers for qemu events.
      ac4f8be4
    • L
      qemu: qemuMonitorQueryRxFilter - retrieve guest netdev rx-filter · ab989962
      Laine Stump 提交于
      This function can be called at any time to get the current status of a
      guest's network device rx-filter. In particular it is useful to call
      after libvirt recieves a NIC_RX_FILTER_CHANGED event - this event only
      tells you that something has changed in the rx-filter, the details are
      retrieved with the query-rx-filter monitor command (only available in
      the json monitor). The command sent to the qemu monitor looks like this:
      
        {"execute":"query-rx-filter", "arguments": {"name":"net2"} }'
      
      and the results will look something like this:
      
      {
          "return": [
              {
                  "promiscuous": false,
                  "name": "net2",
                  "main-mac": "52:54:00:98:2d:e3",
                  "unicast": "normal",
                  "vlan": "normal",
                  "vlan-table": [
                      42,
                      0
                  ],
                  "unicast-table": [
      
                  ],
                  "multicast": "normal",
                  "multicast-overflow": false,
                  "unicast-overflow": false,
                  "multicast-table": [
                      "33:33:ff:98:2d:e3",
                      "01:80:c2:00:00:21",
                      "01:00:5e:00:00:fb",
                      "33:33:ff:98:2d:e2",
                      "01:00:5e:00:00:01",
                      "33:33:00:00:00:01"
                  ],
                  "broadcast-allowed": false
              }
          ],
          "id": "libvirt-14"
      }
      
      This is all parsed from JSON into a virNetDevRxFilter object for
      easier consumption. (unicast-table is usually empty, but is also an
      array of mac addresses similar to multicast-table).
      
      (NB: LIBNL_CFLAGS was added to tests/Makefile.am because virnetdev.h
      now includes util/virnetlink.h, which includes netlink/msg.h when
      appropriate. Without LIBNL_CFLAGS, gcc can't find that file (if
      libnl/netlink isn't available, LIBNL_CFLAGS will be empty and
      virnetlink.h won't try to include netlink/msg.h anyway).)
      ab989962
  9. 06 10月, 2014 3 次提交
    • J
      qemu: Remove possible NULL deref in debug output · b7890a8c
      John Ferlan 提交于
      Check for !dev->info.alias was done after a VIR_DEBUG() statement
      that already tried to print - just flip sequence
      b7890a8c
    • J
      qemu: Remove need for virConnectPtr in hotunplug detach host, net · 99186c41
      John Ferlan 提交于
      Prior patch removed the need for the virConnectPtr in the unplug
      detach host path which caused ripple effect to remove in multiple
      callers.  The previous patch just left things as ATTRIBUTE_UNUSED -
      this patch will remove the variable.
      99186c41
    • J
      qemu: Fix hot unplug of SCSI_HOST device · d2774e54
      John Ferlan 提交于
      https://bugzilla.redhat.com/show_bug.cgi?id=1141732
      
      Introduced by commit id '8f76ad99' the logic to detach a scsi_host
      device (SCSI or iSCSI) fails when attempting to remove the 'drive'
      because as I found in my investigation - the DelDevice takes care of
      that for us.
      
      The investigation turned up commits to adjust the logic for the
      qemuMonitorDelDevice and qemuMonitorDriveDel processing for interfaces
      (commit id '81f76598'), disk bus=VIRTIO,SCSI,USB (commit id '0635785b'),
      and chr devices (commit id '55b21f9b'), but nothing with the host devices.
      
      This commit uses the model for the previous set of changes and applies
      it to the hostdev path. The call to qemuDomainDetachHostSCSIDevice will
      return to qemuDomainDetachThisHostDevice handling either the audit of
      the failure or the wait for the removal and then call into
      qemuDomainRemoveHostDevice for the event, removal from the domain hostdev
      list, and audit of the removal similar to other paths.
      
      NOTE: For now the 'conn' param to +qemuDomainDetachHostSCSIDevice is left
      as ATTRIBUTE_UNUSED.  Removing requires a cascade of other changes to be
      left for a future patch.
      d2774e54
  10. 04 10月, 2014 4 次提交