mirror of https://github.com/apache/cloudstack.git
CLOUDSTACK-7962: Change state to Volume State
This commit is contained in:
parent
690a5ded35
commit
c615aafd77
|
|
@ -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…
Reference in New Issue