bug 10764: changing service offering drops cpu cap

status 10764: resolved fixed
This commit is contained in:
Murali Reddy 2011-07-25 18:15:31 +05:30
parent 96bacb85f8
commit 9e90999aab
2 changed files with 6 additions and 1 deletions

View File

@ -352,7 +352,11 @@ public class VMInstanceVO implements VirtualMachine, FiniteStateObject<State, Vi
public boolean limitCpuUse() {
return limitCpuUse;
}
public void setLimitCpuUse(boolean value) {
limitCpuUse = value;
}
@Override
public String getPrivateMacAddress() {
return privateMacAddress;

View File

@ -964,6 +964,7 @@ public class UserVmManagerImpl implements UserVmManager, UserVmService, Manager
UserVmVO vmForUpdate = _vmDao.createForUpdate();
vmForUpdate.setServiceOfferingId(serviceOfferingId);
vmForUpdate.setHaEnabled(_serviceOfferingDao.findById(serviceOfferingId).getOfferHA());
vmForUpdate.setLimitCpuUse(_serviceOfferingDao.findById(serviceOfferingId).getLimitCpuUse());
_vmDao.update(vmInstance.getId(), vmForUpdate);
return _vmDao.findById(vmInstance.getId());