CLOUDSTACK-7962: Change state to Volume State

(cherry picked from commit c615aafd7706d3036e5bd1e95671b3aa0c287cea)
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
This commit is contained in:
Saksham Srivastava 2014-11-24 12:08:58 +05:30 committed by Rohit Yadav
parent f88a34dabe
commit 6e5b9da7d4

View File

@ -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");
}