1. 18 1月, 2011 2 次提交
    • E
      qemu: use -incoming fd:n to avoid qemu holding fd indefinitely · 1859939a
      Eric Blake 提交于
      https://bugzilla.redhat.com/show_bug.cgi?id=620363
      
      When using -incoming stdio or -incoming exec:, qemu keeps the
      stdin fd open long after the migration is complete.  Not to
      mention that exec:cat is horribly inefficient, by doubling the
      I/O and going through a popen interface in qemu.
      
      The new -incoming fd: of qemu 0.12.0 closes the fd after using
      it, and allows us to bypass an intermediary cat process for
      less I/O.
      
      * src/qemu/qemu_command.h (qemuBuildCommandLine): Add parameter.
      * src/qemu/qemu_command.c (qemuBuildCommandLine): Support
      migration via fd: when possible.  Consolidate migration handling
      into one spot, now that it is more complex.
      * src/qemu/qemu_driver.c (qemudStartVMDaemon): Update caller.
      * tests/qemuxml2argvtest.c (mymain): Likewise.
      * tests/qemuxml2argvdata/qemuxml2argv-restore-v2-fd.args: New file.
      * tests/qemuxml2argvdata/qemuxml2argv-restore-v2-fd.xml: Likewise.
      1859939a
    • J
      qemu: Support per-device boot ordering · 3d440358
      Jiri Denemark 提交于
      Support for this is included in qemu and seabios from upstream git.
      3d440358
  2. 15 1月, 2011 4 次提交
    • N
      memtune: Let virsh know the unlimited value for memory tunables · d94a14f8
      Nikunj A. Dadhania 提交于
      Display or set unlimited values for memory parameters. Unlimited is
      represented by INT64_MAX in memory cgroup.
      Signed-off-by: NNikunj A. Dadhania <nikunj@linux.vnet.ibm.com>
      Reported-by: NJustin Clift <jclift@redhat.com>
      d94a14f8
    • M
      Use the new set_password monitor command to set password. · 9d73efdb
      Marc-André Lureau 提交于
      We try to use that command first when setting a VNC/SPICE password. If
      that doesn't work we fallback to the legacy VNC only password
      
      Allow an expiry time to be set, if that doesn't work, throw an error
      if they try to use SPICE.
      
      Change since v1:
      - moved qemuInitGraphicsPasswords to qemu_hotplug, renamed
        to qemuDomainChangeGraphicsPasswords.
      - updated what looks like a typo (that appears to work anyway) in
        initial patch from Daniel:
          - ret = qemuInitGraphicsPasswords(driver, vm,
          -                                 VIR_DOMAIN_GRAPHICS_TYPE_SPICE,
          -                                 &vm->def->graphics[0]->data.vnc.auth,
          -                                 driver->vncPassword);
          + ret = qemuInitGraphicsPasswords(driver, vm,
          +                                 VIR_DOMAIN_GRAPHICS_TYPE_SPICE,
          +                                 &vm->def->graphics[0]->data.spice.auth,
          +                                 driver->spicePassword);
      
      Based on patch by Daniel P. Berrange <berrange@redhat.com>.
      9d73efdb
    • E
      qemu: move monitor device out of domain_conf common code · 30b9e608
      Eric Blake 提交于
      * src/conf/domain_conf.h (virDomainChrDeviceType): Drop monitor.
      * src/conf/domain_conf.c (virDomainChrDevice)
      (virDomainChrDefParseTargetXML, virDomainChrDefFormat): Drop
      monitor support.
      * src/qemu/qemu_command.h (qemuBuildCommandLine): Alter signature.
      * src/qemu/qemu_monitor.h (qemuMonitorOpen): Likewise.
      * src/qemu/qemu_domain.h (_qemuDomainObjPrivate): Change type of
      monConfig.
      * src/qemu/qemu_domain.c (qemuDomainObjPrivateFree)
      (qemuDomainObjPrivateXMLFormat, qemuDomainObjPrivateXMLParse):
      Adjust to type change.
      * src/qemu/qemu_command.c (qemuBuildCommandLine): Likewise.
      * src/qemu/qemu_driver.c (qemuPrepareMonitorChr)
      (qemudStartVMDaemon, qemuDomainXMLToNative, qemuConnectMonitor)
      (qemudShutdownVMDaemon): Likewise.
      * src/qemu/qemu_hotplug.c (qemuDomainAttachNetDevice): Likewise.
      * src/qemu/qemu_monitor.c (qemuMonitorOpen): Likewise.
      * tests/qemuxml2argvtest.c (testCompareXMLToArgvFiles): Likewise.
      30b9e608
    • E
      domain_conf: split source data out from ChrDef · 98334e7c
      Eric Blake 提交于
      This opens up the possibility of reusing the smaller ChrSourceDef
      for both qemu monitor and a passthrough smartcard device.
      
      * src/conf/domain_conf.h (_virDomainChrDef): Factor host
      details...
      (_virDomainChrSourceDef): ...into new struct.
      (virDomainChrSourceDefFree): New prototype.
      * src/conf/domain_conf.c (virDomainChrDefFree)
      (virDomainChrDefParseXML, virDomainChrDefFormat): Split...
      (virDomainChrSourceDefClear, virDomainChrSourceDefFree)
      (virDomainChrSourceDefParseXML, virDomainChrSourceDefFormat):
      ...into new functions.
      (virDomainChrDefParseTargetXML): Update clients to reflect type
      split.
      * src/vmx/vmx.c (virVMXParseSerial, virVMXParseParallel)
      (virVMXFormatSerial, virVMXFormatParallel): Likewise.
      * src/xen/xen_driver.c (xenUnifiedDomainOpenConsole): Likewise.
      * src/xen/xend_internal.c (xenDaemonParseSxprChar)
      (xenDaemonFormatSxprChr): Likewise.
      * src/vbox/vbox_tmpl.c (vboxDomainDumpXML, vboxAttachSerial)
      (vboxAttachParallel): Likewise.
      * src/security/security_dac.c (virSecurityDACSetChardevLabel)
      (virSecurityDACSetChardevCallback)
      (virSecurityDACRestoreChardevLabel)
      (virSecurityDACRestoreChardevCallback): Likewise.
      * src/security/security_selinux.c (SELinuxSetSecurityChardevLabel)
      (SELinuxSetSecurityChardevCallback)
      (SELinuxRestoreSecurityChardevLabel)
      (SELinuxSetSecurityChardevCallback): Likewise.
      * src/security/virt-aa-helper.c (get_files): Likewise.
      * src/lxc/lxc_driver.c (lxcVmStart, lxcDomainOpenConsole):
      Likewise.
      * src/uml/uml_conf.c (umlBuildCommandLineChr): Likewise.
      * src/uml/uml_driver.c (umlIdentifyOneChrPTY, umlIdentifyChrPTY)
      (umlDomainOpenConsole): Likewise.
      * src/qemu/qemu_command.c (qemuBuildChrChardevStr)
      (qemuBuildChrArgStr, qemuBuildCommandLine)
      (qemuParseCommandLineChr): Likewise.
      * src/qemu/qemu_domain.c (qemuDomainObjPrivateXMLFormat)
      (qemuDomainObjPrivateXMLParse): Likewise.
      * src/qemu/qemu_cgroup.c (qemuSetupChardevCgroup): Likewise.
      * src/qemu/qemu_hotplug.c (qemuDomainAttachNetDevice): Likewise.
      * src/qemu/qemu_driver.c (qemudFindCharDevicePTYsMonitor)
      (qemudFindCharDevicePTYs, qemuPrepareChardevDevice)
      (qemuPrepareMonitorChr, qemudShutdownVMDaemon)
      (qemuDomainOpenConsole): Likewise.
      * src/qemu/qemu_command.h (qemuBuildChrChardevStr)
      (qemuBuildChrArgStr): Delete, now that they are static.
      * src/libvirt_private.syms (domain_conf.h): New exports.
      * cfg.mk (useless_free_options): Update list.
      * tests/qemuxml2argvtest.c (testCompareXMLToArgvFiles): Update
      tests.
      98334e7c
  3. 11 1月, 2011 1 次提交
    • D
      Refactor the security drivers to simplify usage · d6623003
      Daniel P. Berrange 提交于
      The current security driver usage requires horrible code like
      
          if (driver->securityDriver &&
              driver->securityDriver->domainSetSecurityHostdevLabel &&
              driver->securityDriver->domainSetSecurityHostdevLabel(driver->securityDriver,
                                                                    vm, hostdev) < 0)
      
      This pair of checks for NULL clutters up the code, making the driver
      calls 2 lines longer than they really need to be. The goal of the
      patchset is to change the calling convention to simply
      
        if (virSecurityManagerSetHostdevLabel(driver->securityDriver,
                                              vm, hostdev) < 0)
      
      The first check for 'driver->securityDriver' being NULL is removed
      by introducing a 'no op' security driver that will always be present
      if no real driver is enabled. This guarentees driver->securityDriver
      != NULL.
      
      The second check for 'driver->securityDriver->domainSetSecurityHostdevLabel'
      being non-NULL is hidden in a new abstraction called virSecurityManager.
      This separates the driver callbacks, from main internal API. The addition
      of a virSecurityManager object, that is separate from the virSecurityDriver
      struct also allows for security drivers to carry state / configuration
      information directly. Thus the DAC/Stack drivers from src/qemu which
      used to pull config from 'struct qemud_driver' can now be moved into
      the 'src/security' directory and store their config directly.
      
      * src/qemu/qemu_conf.h, src/qemu/qemu_driver.c: Update to
        use new virSecurityManager APIs
      * src/qemu/qemu_security_dac.c,  src/qemu/qemu_security_dac.h
        src/qemu/qemu_security_stacked.c, src/qemu/qemu_security_stacked.h:
        Move into src/security directory
      * src/security/security_stack.c, src/security/security_stack.h,
        src/security/security_dac.c, src/security/security_dac.h: Generic
        versions of previous QEMU specific drivers
      * src/security/security_apparmor.c, src/security/security_apparmor.h,
        src/security/security_driver.c, src/security/security_driver.h,
        src/security/security_selinux.c, src/security/security_selinux.h:
        Update to take virSecurityManagerPtr object as the first param
        in all callbacks
      * src/security/security_nop.c, src/security/security_nop.h: Stub
        implementation of all security driver APIs.
      * src/security/security_manager.h, src/security/security_manager.c:
        New internal API for invoking security drivers
      * src/libvirt.c: Add missing debug for security APIs
      d6623003
  4. 05 1月, 2011 1 次提交
    • S
      qemu driver: fix positioning to end of log file · 0922ff2f
      Stefan Berger 提交于
      While doing some testing with Qemu and creating huge logfiles I encountered the case where the VM could not start anymore due to the lseek() to the end of the Qemu VM's log file failing. The patch below fixes the problem by replacing the previously used 'int' with 'off_t'.
      
      To reproduce this error, you could do the following:
      
      dd if=/dev/zero of=/var/log/libvirt/qemu/<name of VM>.log bs=1024 count=$((1024*2048))
      
      and you should get an error like this:
      
      error: Failed to start domain <name of VM>
      error: Unable to seek to -2147482651 in /var/log/libvirt/qemu/<name of VM>.log: Success
      0922ff2f
  5. 24 12月, 2010 1 次提交
    • L
      Replace setuid/setgid/initgroups with virSetUIDGID() · f42cf7cb
      Laine Stump 提交于
      This patch fixes https://bugzilla.redhat.com/show_bug.cgi?id=664406
      
      If qemu is run as a different uid, it has been unable to access mode
      0660 files that are owned by a different user, but with a group that
      the qemu is a member of (aside from the one group listed in the passwd
      file), because initgroups() is not being called prior to the
      exec. initgroups will change the group membership of the process (and
      its children) to match the new uid.
      
      To make this happen, the setregid()/setreuid() code in
      qemuSecurityDACSetProcessLabel has been replaced with a call to
      virSetUIDGID(), which does both of those, plus calls initgroups.
      
      Similar, but not identical, code in qemudOpenAsUID() has been replaced
      with virSetUIDGID(). This not only consolidates the functionality to a
      single location, but also potentially fixes some as-yet unreported
      bugs.
      f42cf7cb
  6. 23 12月, 2010 2 次提交
    • M
      qemu: Reparent children when deleting a snapshot · 2412babe
      Matthias Bolte 提交于
      Shorten qemuDomainSnapshotWriteSnapshotMetadata function name
      and make it take a snapshot pointer instead of dealing with
      the current snapshot. Update other functions accordingly.
      
      Add a qemuDomainSnapshotReparentChildren hash iterator to
      reparent the children of a snapshot that is being deleted. Use
      qemuDomainSnapshotWriteMetadata to write updated metadata
      to disk.
      
      This fixes a problem where outdated parent information breaks
      the snapshot tree and hinders the deletion of child snapshots.
      
      Reported by Philipp Hahn.
      2412babe
    • J
      qemu: Return SPICE ports on domain shutdown · e6cf98ce
      Jiri Denemark 提交于
      Commit ed0d9f6c added support for
      automatic port allocation for SPICE but forgot to mark such ports as
      unused when they are not used anymore.
      e6cf98ce
  7. 21 12月, 2010 1 次提交
  8. 17 12月, 2010 9 次提交
    • D
      Move QEMU hotplug helper code out of the QEMU driver · acabd9d0
      Daniel P. Berrange 提交于
      The QEMU driver file is far too large. Move all the hotplug
      helper code out into a separate file. No functional change.
      
      * src/qemu/qemu_hotplug.c, src/qemu/qemu_hotplug.h,
        src/Makefile.am: Add hotplug helper file
      * src/qemu/qemu_driver.c: Delete hotplug code
      acabd9d0
    • D
      Move QEMU domain lock / job helper code to separate file · 679d628c
      Daniel P. Berrange 提交于
      To allow the APIs to be used from separate files, move the domain
      lock / job helper code into qemu_domain.c
      
      * src/qemu/qemu_domain.c, src/qemu/qemu_domain.h: Add domain lock
        / job code
      * src/qemu/qemu_driver.c: Remove domain lock / job code
      679d628c
    • D
      Move QEMU driver lock helpers to a separate file · 22f4cb85
      Daniel P. Berrange 提交于
      To allow their use from other source files, move qemuDriverLock
      and qemuDriverUnlock to qemu_conf.h and make them non-static
      
      * src/qemu/qemu_conf.c, src/qemu/qemu_conf.h: Add qemuDriverLock
        qemuDriverUnlock
      * src/qemu/qemu_driver.c: Remove qemuDriverLock and qemuDriverUnlock
      22f4cb85
    • D
      Move QEMU hostdev helper code out of the QEMU driver · 01abc8a1
      Daniel P. Berrange 提交于
      The QEMU driver file is far too large. Move all the hostdev
      helper code out into a separate file. No functional change.
      
      * src/qemu/qemu_hostdev.c, src/qemu/qemu_hostdev.h,
        src/Makefile.am: Add hostdev helper file
      * src/qemu/qemu_driver.c: Delete hostdev code
      01abc8a1
    • D
      Move QEMU cgroup helper code out of the QEMU driver · 52271cfc
      Daniel P. Berrange 提交于
      The QEMU driver file is far too large. Move all the cgroup
      helper code out into a separate file. No functional change.
      
      * src/qemu/qemu_cgroup.c, src/qemu/qemu_cgroup.h,
        src/Makefile.am: Add cgroup helper file
      * src/qemu/qemu_driver.c: Delete cgroup code
      52271cfc
    • D
      Move QEMU audit helper code out of the QEMU driver · 1aecb634
      Daniel P. Berrange 提交于
      The QEMU driver file is far too large. Move all the audit
      helper code out into a separate file. No functional change.
      
      * src/qemu/qemu_audit.c, src/qemu/qemu_audit.h,
        src/Makefile.am: Add audit helper file
      * src/qemu/qemu_driver.c: Delete audit code
      1aecb634
    • D
      Move QEMU private data & namespace code into separate file · df4aabaf
      Daniel P. Berrange 提交于
      Move the code for handling the QEMU virDomainObjPtr private
      data, and custom XML namespace into a separate file
      
      * src/qemu/qemu_domain.c, src/qemu/qemu_domain.h: New file
        for private data & namespace code
      * src/qemu/qemu_driver.c, src/qemu/qemu_driver.h: Remove
        private data & namespace code
      * src/qemu/qemu_driver.h, src/qemu/qemu_command.h: Update
        includes
      * src/Makefile.am: Add src/qemu/qemu_domain.c
      df4aabaf
    • D
      Move QEMU command line management into a separate file · 0f2e4b9c
      Daniel P. Berrange 提交于
      The qemu_conf.c code is doing three jobs, driver config file
      loading, QEMU capabilities management and QEMU command line
      management. Move the command line code into its own file
      
      * src/qemu/qemu_command.c, src/qemu/qemu_command.h: New
        command line management code
      * src/qemu/qemu_conf.c, src/qemu/qemu_conf.h: Delete command
        line code
      * src/qemu/qemu_conf.h, src/qemu_conf.c: Adapt for API renames
      * src/Makefile.am: add src/qemu/qemu_command.c
      * src/qemu/qemu_monitor_json.c, src/qemu/qemu_monitor_text.c: Add
        import of qemu_command.h
      0f2e4b9c
    • D
      Move QEMU capabilities management into a separate file · d8ae147d
      Daniel P. Berrange 提交于
      The qemu_conf.c code is doing three jobs, driver config file
      loading, QEMU capabilities management and QEMU command line
      management. Move the capabilities code into its own file
      
      * src/qemu/qemu_capabilities.c, src/qemu/qemu_capabilities.h: New
        capabilities management code
      * src/qemu/qemu_conf.c, src/qemu/qemu_conf.h: Delete capabilities
        code
      * src/qemu/qemu_conf.h: Adapt for API renames
      * src/Makefile.am: add src/qemu/qemu_capabilities.c
      d8ae147d
  9. 14 12月, 2010 4 次提交
    • H
      Add a new function doStartCPUs · 226f4054
      Hu Tao 提交于
      226f4054
    • H
      Add a new function doStopCPUs · fa139130
      Hu Tao 提交于
      fa139130
    • H
      54c68333
    • O
      qemu: Introduce two new job types · 5faf88fe
      Osier Yang 提交于
      Currently, all of domain "save/dump/managed save/migration"
      use the same function "qemudDomainWaitForMigrationComplete"
      to wait the job finished, but the error messages are all
      about "migration", e.g. when a domain saving job is canceled
      by user, "migration was cancled by client" will be throwed as
      an error message, which will be confused for user.
      
      As a solution, intoduce two new job types(QEMU_JOB_SAVE,
      QEMU_JOB_DUMP), and set "priv->jobActive" to "QEMU_JOB_SAVE"
      before saving, to "QEMU_JOB_DUMP" before dumping, so that we
      could get the real job type in
      "qemudDomainWaitForMigrationComplete", and give more clear
      message further.
      
      And as It's not important to figure out what's the exact job
      is in the DEBUG and WARN log, also we don't need translated
      string in logs, simply repace "migration" with "job" in some
      statements.
      
      * src/qemu/qemu_driver.c
      5faf88fe
  10. 10 12月, 2010 2 次提交
    • H
      Add a watchdog action `dump' · e19cdbfc
      Hu Tao 提交于
      `dump' watchdog action lets libvirtd to dump the guest when receives a
      watchdog event (which probably means a guest crash)
      
      Currently only qemu is supported.
      e19cdbfc
    • H
      Add a new function doCoreDump · b4560bf2
      Hu Tao 提交于
      This patch prepares for the next patch.
      b4560bf2
  11. 09 12月, 2010 3 次提交
    • J
      qemu: Distinguish between domain shutdown and crash · c778fe96
      Jiri Denemark 提交于
      When we get an EOF event on monitor connection, it may be a result of
      either crash or graceful shutdown. QEMU which supports async events
      (i.e., we are talking to it using JSON monitor) emits SHUTDOWN event on
      graceful shutdown. In case we don't get this event by the time monitor
      connection is closed, we assume the associated domain crashed.
      c778fe96
    • R
      qemu: call drive_del in DetachPciDiskDevice · aefaeb3d
      Ryan Harper 提交于
      Currently libvirt doesn't confirm whether the guest has responded to the
      disk removal request.  In some cases this can leave the guest with
      continued access to the device while the mgmt layer believes that it has
      been removed.  With a recent qemu monitor command[1] we can
      deterministically revoke a guests access to the disk (on the QEMU side)
      to ensure no futher access is permitted.
      
      This patch adds support for the drive_del() command and introduces it
      in the disk removal paths.  If the guest is running in a QEMU without this
      command we currently explicitly check for unknown command/CommandNotFound
      and log the issue.
      
      If QEMU supports the command we issue the drive_del command after we attempt
      to remove the device.  The guest may respond and remove the block device
      before we get to attempt to call drive_del.  In that case, we explicitly check
      for 'Device not found' from the monitor indicating that the target drive
      was auto-deleted upon guest responds to the device removal notification.
      
      1. http://thread.gmane.org/gmane.comp.emulators.qemu/84745Signed-off-by: NRyan Harper <ryanh@us.ibm.com>
      aefaeb3d
    • R
      qemu: call drive_unplug in DetachPciDiskDevice · 0cdc9829
      Ryan Harper 提交于
      Currently libvirt doesn't confirm whether the guest has responded to the
      disk removal request.  In some cases this can leave the guest with
      continued access to the device while the mgmt layer believes that it has
      been removed.  With a recent qemu monitor command[1] we can
      deterministically revoke a guests access to the disk (on the QEMU side)
      to ensure no futher access is permitted.
      
      This patch adds support for the drive_unplug() command and introduces it
      in the disk removal paths.  There is some discussion to be had about how
      to handle the case where the guest is running in a QEMU without this
      command (and the fact that we currently don't have a way of detecting
      what monitor commands are available).
      
      Changes since v2:
       - use VIR_ERROR to report when unplug command not found
      Changes since v1:
       - return > 0 when command isn't present, < 0 on command failure
       - detect when drive_unplug command isn't present and log error
         instead of failing entire command
      Signed-off-by: NRyan Harper <ryanh@us.ibm.com>
      0cdc9829
  12. 08 12月, 2010 1 次提交
    • O
      qemu: Only build devstr when needs (attach PCI controller) · 981f7c8c
      Osier Yang 提交于
      - qemudDomainAttachPciControllerDevice: Don't build "devstr"
        if "-device" of qemu is not available, as "devstr" will only
        be used by "qemuMonitorAddDevice", which depends on "-device"
        argument of qemu is supported.
      
      - "qemudDomainSaveImageOpen": Fix indent problem.
      
      * src/qemu/qemu_driver.c
      981f7c8c
  13. 06 12月, 2010 1 次提交
    • J
      qemu: Fix a possible deadlock in p2p migration · 584c13f3
      Jiri Denemark 提交于
      Two more calls to remote libvirtd have to be surrounded by
      qemuDomainObjEnterRemoteWithDriver() and
      qemuDomainObjExitRemoteWithDriver() to prevent possible deadlock between
      two communicating libvirt daemons.
      
      See commit f0c8e1cb for further details.
      584c13f3
  14. 05 12月, 2010 1 次提交
  15. 03 12月, 2010 1 次提交
    • E
      qemu: convert to virCommand · 6a7e7c4f
      Eric Blake 提交于
      * src/qemu/qemu_conf.c (qemudExtractVersionInfo): Check for file
      before executing it here, rather than in callers.
      (qemudBuildCommandLine): Rewrite with virCommand.
      * src/qemu/qemu_conf.h (qemudBuildCommandLine): Update signature.
      * src/qemu/qemu_driver.c (qemuAssignPCIAddresses)
      (qemudStartVMDaemon, qemuDomainXMLToNative): Adjust callers.
      6a7e7c4f
  16. 02 12月, 2010 4 次提交
    • O
      qemu: Use macro for max and min vnc port instead of number · 401979a4
      Osier Yang 提交于
      * src/qemu/qemu_driver.c (though MACROS QEMU_VNC_PORT_MAX, and
      QEMU_VNC_PORT_MIN are defined at the beginning, numbers (65535, 5900)
      are still used, replace them)
      401979a4
    • O
      qemu: Fix typo in qemuTeardownDiskPathDeny · ead3c434
      Osier Yang 提交于
      typo in error message, it should be by copy-a-paste
      from "qemuSetupDiskPathAllow".
      
      * src/qemu/qemu_driver.c (qemuTeardownDiskPathDeny)
      ead3c434
    • E
      qemu: plug memory leak · 428ea3a6
      Eric Blake 提交于
      * src/qemu/qemu_driver.c (qemudShutdown): Free all strings and the
      ebtables structure.
      * src/libvirt_private.syms (ebtablesContextFree): Export missing
      symbol.
      * src/util/ebtables.c (ebtablesContextFree): Allow early exit.
      428ea3a6
    • M
      Fix undefined symbol errors when macvtap support is disabled · 474b1c14
      Matthias Bolte 提交于
      Use macvtap specific functions depending on WITH_MACVTAP.
      
      Use #if instead of #ifdef to check for WITH_MACVTAP, because
      WITH_MACVTAP is always defined with value 0 or 1.
      
      Also export virVMOperationType{To|From}String unconditional,
      because they are used unconditional in the domain config code.
      474b1c14
  17. 01 12月, 2010 2 次提交
    • H
      Fall back to QEMUD_SAVE_FORMAT_RAW if compression method fails. · 1b6f13bb
      Hu Tao 提交于
      When dumping a domain, it's reasonable to save dump-file in raw format
      if dump format is misconfigured or the corresponding compress program
      is not available rather then fail dumping.
      1b6f13bb
    • S
      802.1Qbg: use pre-associate state at beginning of inc. migr · c2b38277
      Stefan Berger 提交于
      This patch introduces the usage of the pre-associate state of the IEEE 802.1Qbg standard on incoming VM migration on the target host. It is in response to bugzilla entry 632750.
      
      https://bugzilla.redhat.com/show_bug.cgi?id=632750
      
      For being able to differentiate the exact reason as to why a macvtap device is being created, either due to a VM creation or an incoming VM migration, I needed to pass that reason as a parameter from wherever qemudStartVMDaemon is being called in order to determine whether to send an ASSOCIATE (VM creation) or a PRE-ASSOCIATE (incoming VM migration) towards lldpad.
      
      I am also fixing a problem with the virsh domainxml-to-native call on the way.
      
      Gerhard successfully tested the patch with a recent blade network 802.1Qbg-compliant switch.
      
      The patch should not have any side-effects on the 802.1Qbh support in libvirt, but Roopa (cc'ed) may want to verify this.
      c2b38277