|
17 | 17 | package com.cloud.deploy; |
18 | 18 |
|
19 | 19 | import java.util.ArrayList; |
| 20 | +import java.util.Arrays; |
20 | 21 | import java.util.Comparator; |
21 | 22 | import java.util.HashMap; |
22 | 23 | import java.util.HashSet; |
|
91 | 92 | import com.cloud.resource.ResourceState; |
92 | 93 | import com.cloud.storage.DiskOfferingVO; |
93 | 94 | import com.cloud.storage.ScopeType; |
| 95 | +import com.cloud.storage.Storage; |
94 | 96 | import com.cloud.storage.StorageManager; |
95 | 97 | import com.cloud.storage.StoragePool; |
96 | 98 | import com.cloud.storage.StoragePoolHostVO; |
@@ -1215,8 +1217,12 @@ protected Pair<Map<Volume, List<StoragePool>>, List<Volume>> findSuitablePoolsFo |
1215 | 1217 | s_logger.debug("Calling StoragePoolAllocators to find suitable pools"); |
1216 | 1218 |
|
1217 | 1219 | DiskOfferingVO diskOffering = _diskOfferingDao.findById(toBeCreated.getDiskOfferingId()); |
1218 | | - DiskProfile diskProfile = new DiskProfile(toBeCreated, diskOffering, vmProfile.getHypervisorType()); |
1219 | 1220 |
|
| 1221 | + if (vmProfile.getTemplate().getFormat() == Storage.ImageFormat.ISO && vmProfile.getServiceOffering().getTagsArray().length != 0) { |
| 1222 | + diskOffering.setTagsArray(Arrays.asList(vmProfile.getServiceOffering().getTagsArray())); |
| 1223 | + } |
| 1224 | + |
| 1225 | + DiskProfile diskProfile = new DiskProfile(toBeCreated, diskOffering, vmProfile.getHypervisorType()); |
1220 | 1226 | boolean useLocalStorage = false; |
1221 | 1227 | if (vmProfile.getType() != VirtualMachine.Type.User) { |
1222 | 1228 | String ssvmUseLocalStorage = _configDao.getValue(Config.SystemVMUseLocalStorage.key()); |
|
0 commit comments