1. 03 3月, 2015 2 次提交
    • P
      qemu: remove duplicated code for allocating spice ports · e4983952
      Pavel Hrdina 提交于
      We have two different places that needs to be updated while touching
      code for allocation spice ports.  Add a bool option to
      'qemuProcessSPICEAllocatePorts' function to switch between true and fake
      allocation so we can use this function also in qemu_driver to generate
      native domain definition.
      Signed-off-by: NPavel Hrdina <phrdina@redhat.com>
      e4983952
    • M
      qemu: Don't crash in qemuDomainOpenChannel() · b3ea0a8f
      Martin Kletzander 提交于
      The problem here was that when opening a channel, we were checking
      whether the channel given is alias (can't be NULL for running domain) or
      it's name, which can be NULL (for example with spicevmc).  In case of
      such domain qemuDomainOpenChannel() made the daemon crash.
      STREQ_NULLABLE() is safe to use since the code in question is wrapped in
      "if (name)" and is more readable, so use that instead of checking for
      non-NULL "vm->def->channels[i]->target.name".
      Signed-off-by: NMartin Kletzander <mkletzan@redhat.com>
      b3ea0a8f
  2. 02 3月, 2015 4 次提交
  3. 27 2月, 2015 1 次提交
  4. 26 2月, 2015 1 次提交
    • L
      qemu: fix ifindex array reported to systemd · 4bbe1029
      Laine Stump 提交于
      Commit f7afeddc added code to report to systemd an array of interface
      indexes for all tap devices used by a guest. Unfortunately it not only
      didn't add code to report the ifindexes for macvtap interfaces
      (interface type='direct') or the tap devices used by type='ethernet',
      it ended up sending "-1" as the ifindex for each macvtap or hostdev
      interface. This resulted in a failure to start any domain that had a
      macvtap or hostdev interface (or actually any type other than
      "network" or "bridge").
      
      This patch does the following with the nicindexes array:
      
      1) Modify qemuBuildInterfaceCommandLine() to only fill in the
      nicindexes array if given a non-NULL pointer to an array (and modifies
      the test jig calls to the function to send NULL). This is because
      there are tests in the test suite that have type='ethernet' and still
      have an ifname specified, but that device of course doesn't actually
      exist on the test system, so attempts to call virNetDevGetIndex() will
      fail.
      
      2) Even then, only add an entry to the nicindexes array for
      appropriate types, and to do so for all appropriate types ("network",
      "bridge", and "direct"), but only if the ifname is known (since that
      is required to call virNetDevGetIndex().
      4bbe1029
  5. 25 2月, 2015 1 次提交
    • M
      qemu: Use correct flags for ABI stability check in SaveImageUpdateDef · cf2d4c60
      Michal Privoznik 提交于
      https://bugzilla.redhat.com/show_bug.cgi?id=1183869
      
      Soo. you've successfully started yourself a domain. And since you want
      to use it on your host exclusively you are confident enough to
      passthrough the host CPU model, like this:
      
        <cpu mode='host-passthrough'/>
      
      Then, after a while, you want to save the domain into a file (e.g.
      virsh save dom dom.save). And here comes the trouble. The file consist
      of two parts: Libvirt header (containing domain XML among other
      things), and qemu migration data. Now, the domain XML in the header is
      formatted using special flags (VIR_DOMAIN_XML_SECURE |
      VIR_DOMAIN_XML_UPDATE_CPU | VIR_DOMAIN_XML_INACTIVE |
      VIR_DOMAIN_XML_MIGRATABLE).
      
      Then, on your way back from the bar, you think of changing something
      in the XML in the saved file (we have a command for it after all), say
      listen address for graphics console. So you successfully type in the
      command:
      
        virsh save-image-edit dom.save
      
      Change all the bits, and exit the editor. But instead of success
      you're left with sad error message:
      
        error: unsupported configuration: Target CPU model <null> does not
        match source Pentium Pro
      
      Sigh. Digging into the code you see lines, where we check for ABI
      stability. The new XML you've produced is compared with the old one
      from the saved file to see if qemu ABI will break or not. Wait, what?
      We are using different flags to parse the XML you've provided so we
      were just lucky it worked in some cases? Yep, that's right.
      Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
      cf2d4c60
  6. 21 2月, 2015 2 次提交
  7. 19 2月, 2015 1 次提交
  8. 17 2月, 2015 1 次提交
  9. 12 2月, 2015 2 次提交
  10. 11 2月, 2015 1 次提交
    • J
      qemu: qemuOpenFileAs - set flag VIR_FILE_OPEN_FORCE_MODE · 92f09dab
      John Ferlan 提交于
      In the event we're falling into the code that tries to create the file
      in a forked environment (VIR_FILE_OPEN_FORK) we pass different mode bits,
      but those are never set because the virFileOpenForceOwnerMode has a check
      if the OPEN_FORCE_MODE bit is set before attempting to change the mode.
      
      Since this is a special case it seems reasonable to set u+rw,g+rw,o
      92f09dab
  11. 10 2月, 2015 4 次提交
  12. 03 2月, 2015 1 次提交
  13. 30 1月, 2015 3 次提交
    • T
      qemu: change macvtap device options in response to NIC_RX_FILTER_CHANGED · 79a87694
      Tony Krowiak 提交于
      This patch enables synchronization of the host macvtap
      device options with the guest device's in response to the
      NIC_RX_FILTER_CHANGED event.
      
      The following device options will be synchronized:
      * PROMISC
      * MULTICAST
      * ALLMULTI
      Signed-off-by: NTony Krowiak <akrowiak@linux.vnet.ibm.com>
      Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
      79a87694
    • J
      qemu: Don't unconditionally delete file in qemuOpenFileAs · 7879d031
      John Ferlan 提交于
      https://bugzilla.redhat.com/show_bug.cgi?id=1158034
      
      If we're expecting to create a file somewhere and that fails for some
      reason during qemuOpenFileAs, then we unlink the path we're attempting
      to create leaving no way to determine what the "existing" privileges,
      protections, or labels are that caused the failure (open, change owner
      and group, change mode, etc.).
      
      Furthermore, if we fall into the path where we'll be opening / creating
      the file using VIR_FILE_OPEN_FORK, we need to first unlink/delete the file
      we created in the first path; otherwise, the attempt by the child process
      to open as some specific user:group may fail because the file was already
      created using nfsnobody:nfsnobody. Again, if we didn't create the file we
      don't want to blindly delete what already exists. Thus, a second reason for
      the original check to set need_unlink to false when we find the file with
      CREAT set, but already existing.
      Signed-off-by: NJohn Ferlan <jferlan@redhat.com>
      7879d031
    • J
      qemu: Adjust EndAsyncJob for qemuDomainSaveInternal error path · 8ff38336
      John Ferlan 提交于
      Commit id '540c339a' to fix issues with reference counting and transient
      domains moved the qemuDomainObjEndAsyncJob call prior to the attempt to
      restart the guest CPU's resulting in an error:
      
          error: Failed to save domain rhel70 to /tmp/pl/rhel70.save
          error: internal error: unexpected async job 3
      
      when (ret != 0) - eg, the error path from qemuDomainSaveMemory.
      
      This patch will adjust the logic to call the EndAsyncJob only after
      we've tried to restart the guest CPUs. It also needs to adjust the
      test for qemuDomainRemoveInactive to add the ret == 0 condition.
      
      Additionally, if we get to endjob: because of some error earlier, then
      we need to save that error in the event the CPU restart logic fails.
      We don't want to return the error from CPU restart failure, rather we
      want to return the error from the failed save that caused us to fall
      into the retry to start the CPU logic.
      Signed-off-by: NJohn Ferlan <jferlan@redhat.com>
      8ff38336
  14. 28 1月, 2015 1 次提交
  15. 27 1月, 2015 10 次提交
    • D
      qemu: report TAP device indexes to systemd · f7afeddc
      Daniel P. Berrange 提交于
      Record the index of each TAP device created and report them to
      systemd, so they show up in machinectl status for the VM.
      f7afeddc
    • D
      Removing probing of secondary drivers · 55ea7be7
      Daniel P. Berrange 提交于
      For stateless, client side drivers, it is never correct to
      probe for secondary drivers. It is only ever appropriate to
      use the secondary driver that is associated with the
      hypervisor in question. As a result the ESX & HyperV drivers
      have both been forced to do hacks where they register no-op
      drivers for the ones they don't implement.
      
      For stateful, server side drivers, we always just want to
      use the same built-in shared driver. The exception is
      virtualbox which is really a stateless driver and so wants
      to use its own server side secondary drivers. To deal with
      this virtualbox has to be built as 3 separate loadable
      modules to allow registration to work in the right order.
      
      This can all be simplified by introducing a new struct
      recording the precise set of secondary drivers each
      hypervisor driver wants
      
      struct _virConnectDriver {
          virHypervisorDriverPtr hypervisorDriver;
          virInterfaceDriverPtr interfaceDriver;
          virNetworkDriverPtr networkDriver;
          virNodeDeviceDriverPtr nodeDeviceDriver;
          virNWFilterDriverPtr nwfilterDriver;
          virSecretDriverPtr secretDriver;
          virStorageDriverPtr storageDriver;
      };
      
      Instead of registering the hypervisor driver, we now
      just register a virConnectDriver instead. This allows
      us to remove all probing of secondary drivers. Once we
      have chosen the primary driver, we immediately know the
      correct secondary drivers to use.
      Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
      55ea7be7
    • D
      Remove use of nwfilterPrivateData from nwfilter driver · 7b1ba956
      Daniel P. Berrange 提交于
      The nwfilter driver can rely on its global state instead
      of the connect private data.
      7b1ba956
    • P
      qemu: Fix job handling in qemuDomainSetMetadata · d13f56f0
      Peter Krempa 提交于
      The code modifies the domain configuration but doesn't take a MODIFY
      type job to do so.
      d13f56f0
    • P
      qemu: Fix job type in qemuDomainGetBlockIoTune · fb2ed975
      Peter Krempa 提交于
      The function just queries status so there's no need for a MODIFY type
      job.
      fb2ed975
    • P
      qemu: Fix job handling in qemuDomainSetSchedulerParametersFlags · c5ee5cfb
      Peter Krempa 提交于
      The code modifies the domain configuration but doesn't take a MODIFY
      type job to do so.
      c5ee5cfb
    • P
      qemu: Fix job handling in qemuDomainSetMemoryParameters · 4fd7a720
      Peter Krempa 提交于
      The code modifies the domain configuration but doesn't take a MODIFY
      type job to do so.
      4fd7a720
    • P
      qemu: Fix job handling in qemuDomainSetAutostart · e3e72743
      Peter Krempa 提交于
      The code modifies the domain configuration but doesn't take a MODIFY
      type job to do so.
      
      This patch also fixes a few very long lines of code around the touched
      parts.
      e3e72743
    • P
      qemu: Fix job handling in qemuDomainPinEmulator · 79e56033
      Peter Krempa 提交于
      The code modifies the domain configuration but doesn't take a MODIFY
      type job to do so.
      79e56033
    • P
      qemu: Fix job handling in qemuDomainPinVcpuFlags · 46d95044
      Peter Krempa 提交于
      The domain modifies the domain configuration but doesn't take a MODIFY
      type job to do it.
      46d95044
  16. 22 1月, 2015 2 次提交
  17. 19 1月, 2015 2 次提交
  18. 16 1月, 2015 1 次提交