Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

[fix] call revertToSnapshot() before deleteSnapshot() in restore.

  • Loading branch information...
commit d65e48a76ed38e974260ba2422b3adc7638f2a3d 1 parent 7a6342f
Takashi HOSHINO authored
Showing with 7 additions and 0 deletions.
  1. +7 −0 vmbkp/com/cybozu/vmbkp/control/VmbkpMain.java
View
7 vmbkp/com/cybozu/vmbkp/control/VmbkpMain.java
@@ -1298,6 +1298,13 @@ private static void logException(Exception e, String msg)
logger_.warning("Connect failed or not found vm.");
throw e;
}
+
+ /* Revert the vm to the snapshot. */
+ assert snapName != null;
+ revertToSnapshot(vmm, snapName);
+ msg = String.format("Revert to snapshot %s succeeded.", snapName);
+ System.out.println(msg); logger_.info(msg);
+
/* Delete the snapshot. */
assert snapName != null;
deleteSnapshot(vmm, snapName);
Please sign in to comment.
Something went wrong with that request. Please try again.