|
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; |
@@ -1202,8 +1204,12 @@ protected Pair<Map<Volume, List<StoragePool>>, List<Volume>> findSuitablePoolsFo |
1202 | 1204 | s_logger.debug("Calling StoragePoolAllocators to find suitable pools"); |
1203 | 1205 |
|
1204 | 1206 | DiskOfferingVO diskOffering = _diskOfferingDao.findById(toBeCreated.getDiskOfferingId()); |
1205 | | - DiskProfile diskProfile = new DiskProfile(toBeCreated, diskOffering, vmProfile.getHypervisorType()); |
1206 | 1207 |
|
| 1208 | + if (vmProfile.getTemplate().getFormat() == Storage.ImageFormat.ISO && vmProfile.getServiceOffering().getTagsArray().length != 0) { |
| 1209 | + diskOffering.setTagsArray(Arrays.asList(vmProfile.getServiceOffering().getTagsArray())); |
| 1210 | + } |
| 1211 | + |
| 1212 | + DiskProfile diskProfile = new DiskProfile(toBeCreated, diskOffering, vmProfile.getHypervisorType()); |
1207 | 1213 | boolean useLocalStorage = false; |
1208 | 1214 | if (vmProfile.getType() != VirtualMachine.Type.User) { |
1209 | 1215 | String ssvmUseLocalStorage = _configDao.getValue(Config.SystemVMUseLocalStorage.key()); |
|
0 commit comments