You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by bh...@apache.org on 2015/01/20 07:20:28 UTC

[04/12] git commit: updated refs/heads/4.5 to 4e01d61

CLOUDSTACK-7962: Change state to Volume State

(cherry picked from commit c615aafd7706d3036e5bd1e95671b3aa0c287cea)
Signed-off-by: Rohit Yadav <ro...@shapeblue.com>


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/6e5b9da7
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/6e5b9da7
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/6e5b9da7

Branch: refs/heads/4.5
Commit: 6e5b9da7d48919496929a8da2f7f1ebd897156f7
Parents: f88a34d
Author: Saksham Srivastava <sa...@citrix.com>
Authored: Mon Nov 24 12:08:58 2014 +0530
Committer: Rohit Yadav <ro...@shapeblue.com>
Committed: Tue Jan 20 11:30:05 2015 +0530

----------------------------------------------------------------------
 server/src/com/cloud/vm/snapshot/VMSnapshotManagerImpl.java | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/6e5b9da7/server/src/com/cloud/vm/snapshot/VMSnapshotManagerImpl.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/vm/snapshot/VMSnapshotManagerImpl.java b/server/src/com/cloud/vm/snapshot/VMSnapshotManagerImpl.java
index 0268727..b49db9b 100644
--- a/server/src/com/cloud/vm/snapshot/VMSnapshotManagerImpl.java
+++ b/server/src/com/cloud/vm/snapshot/VMSnapshotManagerImpl.java
@@ -61,6 +61,7 @@ import com.cloud.projects.Project.ListProjectResourcesCriteria;
 import com.cloud.service.dao.ServiceOfferingDetailsDao;
 import com.cloud.storage.Snapshot;
 import com.cloud.storage.SnapshotVO;
+import com.cloud.storage.Volume;
 import com.cloud.storage.Volume.Type;
 import com.cloud.storage.VolumeVO;
 import com.cloud.storage.dao.GuestOSDao;
@@ -420,7 +421,7 @@ public class VMSnapshotManagerImpl extends ManagerBase implements VMSnapshotMana
         }
 
         VolumeVO rootVolume = volumeVos.get(0);
-        if(!rootVolume.getState().equals(State.Running)) {
+        if(!rootVolume.getState().equals(Volume.State.Ready)) {
             throw new CloudRuntimeException("Create vm to snapshot failed due to vm: " + vmId + " has root disk in " + rootVolume.getState() + " state");
         }