@@ -1119,21 +1119,17 @@ private List<VmInstanceVO> getCandidateVmForAttaching(String accountUuid) {
11191119 .param ("vmType" , VmInstanceConstant .USER_VM_TYPE )
11201120 .param ("hvTypes" , hvTypes );
11211121 } else if (self .getStatus () == VolumeStatus .NotInstantiated ) {
1122- //not support vmtx volume temporarily, so filter ESX vm when volume is NotInstantiated.
11231122 sql = SQL .New ("select vm" +
11241123 " from VmInstanceVO vm, PrimaryStorageClusterRefVO ref, PrimaryStorageEO ps, PrimaryStorageCapacityVO capacity" +
11251124 " where " + (vmUuids == null ? "" : " vm.uuid in (:vmUuids) and" ) +
11261125 " vm.state in (:vmStates)" +
11271126 " and vm.type = :vmType" +
1128- " and vm.hypervisorType <> :hvType" +
11291127 " and vm.clusterUuid = ref.clusterUuid" +
11301128 " and capacity.uuid = ps.uuid" +
11311129 " and capacity.availableCapacity > :volumeSize" +
11321130 " and ref.primaryStorageUuid = ps.uuid" +
11331131 " and ps.state in (:psState)" +
11341132 " group by vm.uuid" )
1135- //TODO: this is a dirty fix, delete it when VMWare support DataVolume
1136- .param ("hvType" , "ESX" )
11371133 .param ("volumeSize" , self .getSize ())
11381134 .param ("vmType" , VmInstanceConstant .USER_VM_TYPE )
11391135 .param ("psState" , PrimaryStorageState .Enabled );
0 commit comments