[pve-devel] [PATCH stable-3 qemu-server] add devices cleanup when vm fails to start

Dhaussy Alexandre ADhaussy at voyages-sncf.com
Mon Feb 15 16:39:18 CET 2016


Hello,

I should have sent this patch a long time ago.
Anyway, i still had the issue, so here it is...

See : http://pve.proxmox.com/pipermail/pve-user/2015-May/008740.html

--- a/PVE/QemuServer.pm    2016-02-12 16:27:18.744712814 +0100
+++ b/PVE/QemuServer.pm    2016-02-12 16:42:52.039045473 +0100
@@ -4174,8 +4174,11 @@

      eval  { run_command($cmd, timeout => $statefile ? undef : 30,
              umask => 0077); };
-    my $err = $@;
-    die "start failed: $err" if $err;
+    if (my $err = $@) {
+        # always deactivate volumes - avoid lvm LVs to be active on 
several nodes
+        eval { PVE::Storage::deactivate_volumes($storecfg, $vollist); };
+        die "start failed: $err";
+    };

      print "migration listens on $migrate_uri\n" if $migrate_uri;


More information about the pve-devel mailing list