mirror of https://github.com/apache/cloudstack.git
CLOUDSTACK-6831 [Hyper-V] Improve the logging for VM snapshot failures as it is not supported. Right now it is throwing NPEs
This commit is contained in:
parent
945e879bf2
commit
d59cc1ff8f
|
|
@ -101,6 +101,12 @@ public class HypervisorCapabilitiesDaoImpl extends GenericDaoBase<HypervisorCapa
|
|||
@Override
|
||||
public Boolean isVmSnapshotEnabled(HypervisorType hypervisorType, String hypervisorVersion) {
|
||||
HypervisorCapabilitiesVO result = getCapabilities(hypervisorType, hypervisorVersion);
|
||||
return result.getVmSnapshotEnabled();
|
||||
// if default capability profile not present for any hypervisor type result will be null.
|
||||
// So returning vm snapshot not supported if there is no default capability profile for hypervisor.
|
||||
if (result != null) {
|
||||
return result.getVmSnapshotEnabled();
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue