fix bug 2711
@@ -1072,13 +1072,16 @@ public class VolumeBase implements Volume {
.param("volUuid", self.getUuid())
.param("hvTypes", hvTypes);
} else if (self.getStatus() == VolumeStatus.NotInstantiated) {
+ //not support vmtx volume temporarily, so filter ESX vm when volume is NotInstantiated.
sql = SQL.New("select vm " +
"from VmInstanceVO vm,PrimaryStorageClusterRefVO ref,PrimaryStorageEO ps " +
"where vm.state in (:vmStates) " +
+ "and vm.hypervisorType not in (:hvTypes) " +
"and vm.clusterUuid = ref.clusterUuid " +
"and ref.primaryStorageUuid = ps.uuid " +
"and ps.state in (:psState) " +
"group by vm.uuid")
+ .param("hvTypes", VolumeFormat.valueOf(VolumeConstant.VOLUME_FORMAT_VMTX).getHypervisorTypesSupportingThisVolumeFormatInString())
.param("psState",PrimaryStorageState.Enabled);
} else {
DebugUtils.Assert(false, String.format("should not reach here, volume[uuid:%s]", self.getUuid()));
