Skip to content

Commit aee4271

Browse files
author
gitlab
committed
Merge branch 'NotInstantiated' into 'master'
Allow NotInstantiated volume attach vcenter vm See merge request zstackio/zstack!2385
2 parents db53556 + 52f3a74 commit aee4271

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
@@ -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

Comments
 (0)