Skip to content

Commit 52f3a74

Browse files
committed
Allow NotInstantiated volume attach vcenter vm
1 parent bb6b0f4 commit 52f3a74

1 file changed

Lines changed: 0 additions & 4 deletions

File tree

storage/src/main/java/org/zstack/storage/volume/VolumeBase.java

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1117,21 +1117,17 @@ private List<VmInstanceVO> getCandidateVmForAttaching(String accountUuid) {
11171117
.param("vmType", VmInstanceConstant.USER_VM_TYPE)
11181118
.param("hvTypes", hvTypes);
11191119
} else if (self.getStatus() == VolumeStatus.NotInstantiated) {
1120-
//not support vmtx volume temporarily, so filter ESX vm when volume is NotInstantiated.
11211120
sql = SQL.New("select vm" +
11221121
" from VmInstanceVO vm, PrimaryStorageClusterRefVO ref, PrimaryStorageEO ps, PrimaryStorageCapacityVO capacity" +
11231122
" where "+ (vmUuids == null ? "" : " vm.uuid in (:vmUuids) and") +
11241123
" vm.state in (:vmStates)" +
11251124
" and vm.type = :vmType" +
1126-
" and vm.hypervisorType <> :hvType" +
11271125
" and vm.clusterUuid = ref.clusterUuid" +
11281126
" and capacity.uuid = ps.uuid" +
11291127
" and capacity.availableCapacity > :volumeSize" +
11301128
" and ref.primaryStorageUuid = ps.uuid" +
11311129
" and ps.state in (:psState)" +
11321130
" group by vm.uuid")
1133-
//TODO: this is a dirty fix, delete it when VMWare support DataVolume
1134-
.param("hvType", "ESX")
11351131
.param("volumeSize", self.getSize())
11361132
.param("vmType", VmInstanceConstant.USER_VM_TYPE)
11371133
.param("psState", PrimaryStorageState.Enabled);

0 commit comments

Comments
 (0)