You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by sa...@apache.org on 2014/11/24 07:44:34 UTC

git commit: updated refs/heads/master to c615aaf

Repository: cloudstack
Updated Branches:
  refs/heads/master 690a5ded3 -> c615aafd7


CLOUDSTACK-7962: Change state to Volume State


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

Branch: refs/heads/master
Commit: c615aafd7706d3036e5bd1e95671b3aa0c287cea
Parents: 690a5de
Author: Saksham Srivastava <sa...@citrix.com>
Authored: Mon Nov 24 12:08:58 2014 +0530
Committer: Saksham Srivastava <sa...@citrix.com>
Committed: Mon Nov 24 12:08:58 2014 +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/c615aafd/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 4198320..5ead59a 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");
         }