1. 09 2月, 2011 2 次提交
    • E
      sysinfo: implement qemu support · 5ec8fb56
      Eric Blake 提交于
      * src/qemu/qemu_driver.c (qemuGetSysinfo): New function.
      (qemuDriver): Install it.
      5ec8fb56
    • E
      sysinfo: define internal driver API · dec13a5a
      Eric Blake 提交于
      * src/driver.h (virDrvGetSysinfo): New typedef.
      (_virDriver): New callback member.
      * src/esx/esx_driver.c (esxDriver): Add stub for driver.
      * src/lxc/lxc_driver.c (lxcDriver): Likewise.
      * src/opennebula/one_driver.c (oneDriver): Likewise.
      * src/openvz/openvz_driver.c (openvzDriver): Likewise.
      * src/phyp/phyp_driver.c (phypDriver): Likewise.
      * src/qemu/qemu_driver.c (qemuDriver): Likewise.
      * src/remote/remote_driver.c (remote_driver): Likewise.
      * src/test/test_driver.c (testDriver): Likewise.
      * src/uml/uml_driver.c (umlDriver): Likewise.
      * src/vbox/vbox_tmpl.c (Driver): Likewise.
      * src/vmware/vmware_driver.c (vmwareDriver): Likewise.
      * src/xen/xen_driver.c (xenUnifiedDriver): Likewise.
      * src/xenapi/xenapi_driver.c (xenapiDriver): Likewise.
      dec13a5a
  2. 04 2月, 2011 2 次提交
    • J
      qemu: Add shortcut for HMP pass through · 2169472a
      Jiri Denemark 提交于
      Currently users who want to use virDomainQemuMonitorCommand() API or
      it's virsh equivalent has to use the same protocol as libvirt uses for
      communication to qemu. Since the protocol is QMP with current qemu and
      HMP much more usable for humans, one ends up typing something like the
      following:
      
          virsh qemu-monitor-command DOM \
      '{"execute":"human-monitor-command","arguments":{"command-line":"info kvm"}}'
      
      which is not a very convenient way of debugging qemu.
      
      This patch introduces --hmp option to qemu-monitor-command, which says
      that the provided command is in HMP. If libvirt uses QMP to talk with
      qemu, the command will automatically be converted into QMP. So the
      example above is simplified to just
      
          virsh qemu-monitor-command --hmp DOM "info kvm"
      
      Also the result is converted from
      
          {"return":"kvm support: enabled\r\n"}
      
      to just plain HMP:
      
          kvm support: enabled
      
      If libvirt talks to qemu in HMP, --hmp flag is obviously a noop.
      2169472a
    • E
      qemu: avoid double shutdown · 9962e406
      Eric Blake 提交于
      * src/qemu/qemu_driver.c (qemudShutdownVMDaemon): Check that vm is
      still active.
      Reported by Wen Congyang as follows:
      
      Steps to reproduce this bug:
      
      1. use gdb to debug libvirtd, and set breakpoint in the function
         qemuConnectMonitor()
      2. start a vm, and the libvirtd will be stopped in qemuConnectMonitor()
      3. kill -STOP $(cat /var/run/libvirt/qemu/<domain>.pid)
      4. continue to run libvirtd in gdb, and libvirtd will be blocked in the
         function qemuMonitorSetCapabilities()
      5. kill -9 $(cat /var/run/libvirt/qemu/<domain>.pid)
      
      Here is log of the qemu:
      =========
      LC_ALL=C PATH=/sbin:/usr/sbin:/bin:/usr/bin ...
      char device redirected to /dev/pts/3
      2011-01-27 09:38:48.101: shutting down
      2011-01-27 09:41:26.401: shutting down
      =========
      
      The vm is shut down twice. I do not know whether this behavior has
      side effect, but I think we should shutdown the vm only once.
      9962e406
  3. 31 1月, 2011 1 次提交
  4. 28 1月, 2011 4 次提交
    • D
      Remove bogus log warning lines when launching QEMU · 0095edaa
      Daniel P. Berrange 提交于
      The refactoring of QEMU command startup was comitted with
      a couple of VIR_WARN lines left in from debugging.
      
      * src/qemu/qemu_driver.c: Remove log warning lines
      0095edaa
    • D
      Remove double close of qemu monitor · e85247e7
      Daniel P. Berrange 提交于
      When qemuMonitorSetCapabilities() fails, there is no need to
      call qemuMonitorClose(), because the caller will already see
      the error code and tear down the entire VM. The extra call to
      qemuMonitorClose resulted in a double-free due to it removing
      a ref count prematurely.
      
      * src/qemu/qemu_driver.c: Remove premature close of monitor
      e85247e7
    • E
      qemu: fix error messages · b96b6f47
      Eric Blake 提交于
      Regression in commit caa805ea let a lot of bad messages slip in.
      
      * cfg.mk (msg_gen_function): Fix function name.
      * src/qemu/qemu_cgroup.c (qemuRemoveCgroup): Fix fallout from
      'make syntax-check'.
      * src/qemu/qemu_driver.c (qemudDomainGetInfo)
      (qemuDomainWaitForMigrationComplete, qemudStartVMDaemon)
      (qemudDomainSaveFlag, qemudDomainAttachDevice)
      (qemuDomainUpdateDeviceFlags): Likewise.
      * src/qemu/qemu_hotplug.c (qemuDomainAttachHostUsbDevice)
      (qemuDomainDetachPciDiskDevice, qemuDomainDetachSCSIDiskDevice):
      Likewise.
      b96b6f47
    • W
      avoid vm to be deleted if qemuConnectMonitor failed · d96431f9
      Wen Congyang 提交于
      Steps to reproduce this bug:
      1. service libvirtd start
      2. virsh start <domain>
      3. kill -STOP $(cat /var/run/libvirt/qemu/<domain>.pid)
      4. service libvirtd restart
      5. kill -9 $(cat /var/run/libvirt/qemu/<domain>.pid)
      
      Then libvirtd will core dump or be in deadlock state.
      
      Make sure that json is built into libvirt and the version
      of qemu is newer than 0.13.0.
      
      The reason of libvirtd cores dump is that:
      We add vm->refs when we alloc the memory, and decrease it
      in the function qemuHandleMonitorEOF() in other thread.
      
      We add vm->refs in the function qemuConnectMonitor() and
      decrease it when the vm is inactive.
      
      The libvirtd will block in the function qemuMonitorSetCapabilities()
      because the vm is stopped by signal SIGSTOP. Now the vm->refs is 2.
      
      Then we kill the vm by signal SIGKILL. The function
      qemuMonitorSetCapabilities() failed, and then we will decrease vm->refs
      in the function qemuMonitorClose().
      In another thread, mon->fd is broken and the function
      qemuHandleMonitorEOF() is called.
      
      If qemuHandleMonitorEOF() decreases vm->refs before qemuConnectMonitor()
      returns, vm->refs will be decrease to 0 and the memory is freed.
      
      We will call qemudShutdownVMDaemon() as qemuConnectMonitor() failed.
      The memory has been freed, so qemudShutdownVMDaemon() is too dangerous.
      
      We will reference NULL pointer in the function virDomainConfVMNWFilterTeardown():
      =============
      void
      virDomainConfVMNWFilterTeardown(virDomainObjPtr vm) {
          int i;
      
          if (nwfilterDriver != NULL) {
              for (i = 0; i < vm->def->nnets; i++)
                  virDomainConfNWFilterTeardown(vm->def->nets[i]);
          }
      }
      ============
      vm->def->nnets is not 0 but vm->def->nets is NULL(We don't set vm->def->nnets
      to 0 when we free vm).
      
      We should add an extra reference of vm to avoid vm to be deleted if
      qemuConnectMonitor() failed.
      Signed-off-by: NWen Congyang <wency@cn.fujitsu.com>
      d96431f9
  5. 26 1月, 2011 3 次提交
    • L
      Manually kill gzip if restore fails before starting qemu · c9c794b5
      Laine Stump 提交于
      If a guest image is saved in compressed format, and the restore fails
      in some way after the intermediate process used to uncompress the
      image has been started, but before qemu has been started to hook up to
      the uncompressor, libvirt will endlessly wait for the uncompressor to
      finish, but it never will because it's still waiting to have something
      hooked up to drain its output.
      
      The solution is to close the pipes on both sides of the uncompressor,
      then send a SIGTERM before calling waitpid on it (only if the restore
      has failed, of course).
      c9c794b5
    • L
      Set SELinux context label of pipes used for qemu migration · 34a19dda
      Laine Stump 提交于
      This patch is a partial resolution to the following bug:
      
         https://bugzilla.redhat.com/show_bug.cgi?id=667756
      
      (to complete the fix, an updated selinux-policy package is required,
      to add the policy that allows libvirt to set the context of a fifo,
      which was previously not allowed).
      
      Explanation : When an incoming migration is over a pipe (for example,
      if the image was compressed and is being fed through gzip, or was on a
      root-squash nfs server, so needed to be opened by a child process
      running as a different uid), qemu cannot read it unless the selinux
      context label for the pipe has been set properly.
      
      The solution is to check the fd used as the source of the migration
      just before passing it to qemu; if it's a fifo (implying that it's a
      pipe), we call the newly added virSecurityManagerSetFDLabel() function
      to set the context properly.
      34a19dda
    • O
      qemu: Error prompt when managed save a shutoff domain · dbd63c4d
      Osier Yang 提交于
      The problem was introduced by commit 4303c91c, which removed the checking
      of domain state, this patch is to fix it.
      
      Otherwise, improper error will be thrown, e.g.
      
      error: Failed to save domain rhel6 state
      error: cannot resolve symlink /var/lib/libvirt/qemu/save/rhel6.save: No such
      file or directory
      dbd63c4d
  6. 22 1月, 2011 3 次提交
    • C
      qemu: Allow serving VNC over a unix domain socket · 1d9c0a08
      Cole Robinson 提交于
      QEMU supports serving VNC over a unix domain socket rather than traditional
      TCP host/port. This is specified with:
      
      <graphics type='vnc' socket='/foo/bar/baz'/>
      
      This provides better security access control than VNC listening on
      127.0.0.1, but will cause issues with tools that rely on the lax security
      (virt-manager in fedora runs as regular user by default, and wouldn't be
      able to access a socket owned by 'qemu' or 'root').
      
      Also not currently supported by any clients, though I have patches for
      virt-manager, and virt-viewer should be simple to update.
      
      v2:
          schema: Make listen vs. socket a <choice>
      1d9c0a08
    • C
      qemu: Set domain def transient at beginning of startup process · cb4c2694
      Cole Robinson 提交于
      This will allow us to record transient runtime state in vm->def, like
      default VNC parameters. Accomplish this by adding an extra 'live' parameter
      to SetDefTransient, with similar semantics to the 'live' flag for
      AssignDef.
      cb4c2694
    • D
      Fix error reporting when machine type probe fails · f0bbf960
      Daniel P. Berrange 提交于
      Avoid overwriting the real error message with a generic
      OOM failure message, when machine type probe fails
      
      * src/qemu/qemu_driver.c: Don't overwrite error
      f0bbf960
  7. 21 1月, 2011 1 次提交
    • W
      qemu: Fix a possible deadlock in p2p migration · bda57661
      Wen Congyang 提交于
      The function virUnrefConnect() may call virReleaseConnect() to release
      the dest connection, and the function virReleaseConnect() will call
      conn->driver->close().
      
      So the function virUnrefConnect() should be surrounded by
      qemuDomainObjEnterRemoteWithDriver() and
      qemuDomainObjExitRemoteWithDriver() to prevent possible deadlock between
      two communicating libvirt daemons.
      
      See commit f0c8e1cb for further details.
      Signed-off-by: NWen Congyang <wency@cn.fujitsu.com>
      bda57661
  8. 19 1月, 2011 3 次提交
    • J
      qemu: Avoid sending STOPPED event twice · 15e78658
      Jiri Denemark 提交于
      In some circumstances, libvirtd would issue two STOPPED events after it
      stopped a domain. This was because an EOF event can arrive after a qemu
      process is killed but before qemuMonitorClose() is called.
      
      qemuHandleMonitorEOF() should ignore EOF when the domain is not running.
      
      I wasn't able to reproduce this bug directly, only after adding an
      artificial sleep() into qemudShutdownVMDaemon().
      15e78658
    • M
      Use VIR_ERR_OPERATION_INVALID when appropriated · e065e1ea
      Matthias Bolte 提交于
      VIR_ERR_OPERATION_INVALID means that the operation is not valid
      for the current state of the involved object.
      e065e1ea
    • M
      Fix misuse of VIR_ERR_INVALID_* error code · 8c6d6116
      Matthias Bolte 提交于
      VIR_ERR_INVALID_* is meant for invalid pointers only.
      8c6d6116
  9. 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
  10. 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
  11. 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
  12. 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
  13. 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
  14. 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
  15. 21 12月, 2010 1 次提交
  16. 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