|
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; |
|
82 | 83 | import com.cloud.resource.ResourceState; |
83 | 84 | import com.cloud.storage.DiskOfferingVO; |
84 | 85 | import com.cloud.storage.ScopeType; |
| 86 | +import com.cloud.storage.Storage; |
85 | 87 | import com.cloud.storage.StorageManager; |
86 | 88 | import com.cloud.storage.StoragePool; |
87 | 89 | import com.cloud.storage.StoragePoolHostVO; |
@@ -1216,8 +1218,12 @@ protected Pair<Map<Volume, List<StoragePool>>, List<Volume>> findSuitablePoolsFo |
1216 | 1218 | s_logger.debug("Calling StoragePoolAllocators to find suitable pools"); |
1217 | 1219 |
|
1218 | 1220 | DiskOfferingVO diskOffering = _diskOfferingDao.findById(toBeCreated.getDiskOfferingId()); |
1219 | | - DiskProfile diskProfile = new DiskProfile(toBeCreated, diskOffering, vmProfile.getHypervisorType()); |
1220 | 1221 |
|
| 1222 | + if (vmProfile.getTemplate().getFormat() == Storage.ImageFormat.ISO && vmProfile.getServiceOffering().getTagsArray().length != 0) { |
| 1223 | + diskOffering.setTagsArray(Arrays.asList(vmProfile.getServiceOffering().getTagsArray())); |
| 1224 | + } |
| 1225 | + |
| 1226 | + DiskProfile diskProfile = new DiskProfile(toBeCreated, diskOffering, vmProfile.getHypervisorType()); |
1221 | 1227 | boolean useLocalStorage = false; |
1222 | 1228 | if (vmProfile.getType() != VirtualMachine.Type.User) { |
1223 | 1229 | String ssvmUseLocalStorage = _configDao.getValue(Config.SystemVMUseLocalStorage.key()); |
|
0 commit comments