mirror of https://github.com/apache/cloudstack.git
bug 11219: use local storage flag from service offering when it is ROOT disk
This commit is contained in:
parent
6c4743a8b8
commit
a51383e296
|
|
@ -609,6 +609,14 @@ public class FirstFitPlanner extends PlannerBase implements DeploymentPlanner {
|
|||
}
|
||||
} else {
|
||||
useLocalStorage = diskOffering.getUseLocalStorage();
|
||||
|
||||
// TODO: this is a hacking fix for the problem of deploy ISO-based VM on local storage
|
||||
// when deploying VM based on ISO, we have a service offering and an additional disk offering, use-local storage flag is actually
|
||||
// saved in service offering, overrde the flag from service offering when it is a ROOT disk
|
||||
if(!useLocalStorage && vmProfile.getServiceOffering().getUseLocalStorage()) {
|
||||
if(toBeCreated.getVolumeType() == Volume.Type.ROOT)
|
||||
useLocalStorage = true;
|
||||
}
|
||||
}
|
||||
diskProfile.setUseLocalStorage(useLocalStorage);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue