CLOUDSTACK-6833 [Hyper-V] Volume snapshot creation returns success even though snapshots are not supported for Hyper-V

(cherry picked from commit 945e879bf2)
This commit is contained in:
Rajesh Battala 2014-06-05 12:01:43 +05:30 committed by Daan Hoogland
parent 91391e6779
commit 1f7d2ee091
1 changed files with 3 additions and 0 deletions

View File

@ -1662,6 +1662,9 @@ public class VolumeApiServiceImpl extends ManagerBase implements VolumeApiServic
if (volume.getInstanceId() != null)
vm = _vmInstanceDao.findById(volume.getInstanceId());
if (volume.getHypervisorType() == HypervisorType.Hyperv) {
throw new InvalidParameterValueException("Volume Snapshots are not supported on Hypervisor Type : Hyper-V");
}
if (vm != null) {
// serialize VM operation
AsyncJobExecutionContext jobContext = AsyncJobExecutionContext.getCurrentExecutionContext();