]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
Add missing call to re-attach host devices if VM startup fails
authorDaniel P. Berrange <berrange@redhat.com>
Wed, 13 Jan 2010 17:09:41 +0000 (17:09 +0000)
committerDaniel P. Berrange <berrange@redhat.com>
Thu, 21 Jan 2010 14:00:16 +0000 (14:00 +0000)
If there is a problem with VM startup, PCI devices may be left
assigned to pci-stub / pci-back. Adding a call to reattach
host devices in the cleanup path is required.

* qemu/qemu_driver.c: qemuDomainReAttachHostDevices() when
  VM startup fails

src/qemu/qemu_driver.c

index 3495499f973dca3307bcaee65a78f6aaf9b3f769..7c7732173771621dcb8ae0c99b5d704ffb9e2518 100644 (file)
@@ -2749,6 +2749,8 @@ cleanup:
     /* We jump here if we failed to start the VM for any reason
      * XXX investigate if we can kill this block and safely call
      * qemudShutdownVMDaemon even though no PID is running */
+    qemuDomainReAttachHostDevices(conn, driver, vm->def);
+
     if (driver->securityDriver &&
         driver->securityDriver->domainRestoreSecurityAllLabel)
         driver->securityDriver->domainRestoreSecurityAllLabel(conn, vm);