mirror of
https://github.com/apache/cloudstack.git
synced 2025-10-26 08:42:29 +01:00
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:
parent
f88a34dabe
commit
6e5b9da7d4
@ -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");
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user