mirror of
https://github.com/apache/cloudstack.git
synced 2025-10-26 08:42:29 +01:00
CS-5950: Wrong storage tags are used for ISO deployed VMs.
This commit is contained in:
parent
49a29ce0cf
commit
b25ee92c34
@ -17,6 +17,7 @@
|
|||||||
package com.cloud.deploy;
|
package com.cloud.deploy;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
import java.util.Arrays;
|
||||||
import java.util.Comparator;
|
import java.util.Comparator;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.HashSet;
|
import java.util.HashSet;
|
||||||
@ -91,6 +92,7 @@ import com.cloud.org.Grouping;
|
|||||||
import com.cloud.resource.ResourceState;
|
import com.cloud.resource.ResourceState;
|
||||||
import com.cloud.storage.DiskOfferingVO;
|
import com.cloud.storage.DiskOfferingVO;
|
||||||
import com.cloud.storage.ScopeType;
|
import com.cloud.storage.ScopeType;
|
||||||
|
import com.cloud.storage.Storage;
|
||||||
import com.cloud.storage.StorageManager;
|
import com.cloud.storage.StorageManager;
|
||||||
import com.cloud.storage.StoragePool;
|
import com.cloud.storage.StoragePool;
|
||||||
import com.cloud.storage.StoragePoolHostVO;
|
import com.cloud.storage.StoragePoolHostVO;
|
||||||
@ -1202,8 +1204,12 @@ public class DeploymentPlanningManagerImpl extends ManagerBase implements Deploy
|
|||||||
s_logger.debug("Calling StoragePoolAllocators to find suitable pools");
|
s_logger.debug("Calling StoragePoolAllocators to find suitable pools");
|
||||||
|
|
||||||
DiskOfferingVO diskOffering = _diskOfferingDao.findById(toBeCreated.getDiskOfferingId());
|
DiskOfferingVO diskOffering = _diskOfferingDao.findById(toBeCreated.getDiskOfferingId());
|
||||||
DiskProfile diskProfile = new DiskProfile(toBeCreated, diskOffering, vmProfile.getHypervisorType());
|
|
||||||
|
|
||||||
|
if (vmProfile.getTemplate().getFormat() == Storage.ImageFormat.ISO && vmProfile.getServiceOffering().getTagsArray().length != 0) {
|
||||||
|
diskOffering.setTagsArray(Arrays.asList(vmProfile.getServiceOffering().getTagsArray()));
|
||||||
|
}
|
||||||
|
|
||||||
|
DiskProfile diskProfile = new DiskProfile(toBeCreated, diskOffering, vmProfile.getHypervisorType());
|
||||||
boolean useLocalStorage = false;
|
boolean useLocalStorage = false;
|
||||||
if (vmProfile.getType() != VirtualMachine.Type.User) {
|
if (vmProfile.getType() != VirtualMachine.Type.User) {
|
||||||
String ssvmUseLocalStorage = _configDao.getValue(Config.SystemVMUseLocalStorage.key());
|
String ssvmUseLocalStorage = _configDao.getValue(Config.SystemVMUseLocalStorage.key());
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user