Permalink
Browse files

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

  • Loading branch information...
1 parent 7a6342f commit d65e48a76ed38e974260ba2422b3adc7638f2a3d Takashi HOSHINO committed Apr 12, 2011
Showing with 7 additions and 0 deletions.
  1. +7 −0 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);

0 comments on commit d65e48a

Please sign in to comment.