[ 
https://issues.apache.org/jira/browse/CLOUDSTACK-8088?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14281763#comment-14281763
 ] 

ASF subversion and git services commented on CLOUDSTACK-8088:
-------------------------------------------------------------

Commit a1791cb4a8fb2cfd455848ca47585d94d9a309e7 in cloudstack's branch 
refs/heads/4.5 from [~saksham]
[ https://git-wip-us.apache.org/repos/asf?p=cloudstack.git;h=a1791cb ]

CLOUDSTACK-8088: VM scale up is failing in vmware with Unable to execute 
ScaleVmCommand due to java.lang.NullPointerException

(cherry picked from commit 1df0453d27e8378065c15878067fc9d2dc961e30)
Signed-off-by: Rohit Yadav <[email protected]>


> VM scale up is failing in vmware with Unable to execute ScaleVmCommand due to 
> java.lang.NullPointerException
> ------------------------------------------------------------------------------------------------------------
>
>                 Key: CLOUDSTACK-8088
>                 URL: https://issues.apache.org/jira/browse/CLOUDSTACK-8088
>             Project: CloudStack
>          Issue Type: Bug
>      Security Level: Public(Anyone can view this level - this is the 
> default.) 
>    Affects Versions: 4.5.0
>            Reporter: Saksham Srivastava
>            Assignee: Saksham Srivastava
>
> setup
> -------
> Vcenter 5.5 (esxi-5.5) setup 
> steps to reproduce
> ------------------------
> 1-enable zone level setting enable.dynamic.scale.vm
> 2-deploy a vm which is dynamically scalable
> 3- try to scale up vm to medium SO (#cpu=1,cpu=1000,mem=1024)
> expected
> -----------
> scaling up should be sucessful
> actual
> -------
> scaling up is failing with error
> com.cloud.utils.exception.CloudRuntimeException: Unable to scale vm due to 
> Unable to execute ScaleVmCommand due to java.lang.NullPointerException
> During scale vm command, in VmwareResource.java the following line is 
> executed where there is no value sent in the 'details' map for the 
> configuration parameter 'vmware.reserve.mem'. because of this NPE is occured.
> int getReservedMemoryMb(VirtualMachineTO vmSpec) {
> if 
> (vmSpec.getDetails().get(VMwareGuru.VmwareReserveMemory.key()).equalsIgnoreCase("true"))
>  { ...
> In VirtualMachineManagerImpl.java ScaleVmCommand is prepared where 
> VirtualMachineTO transfer object is created as following where we are not 
> setting 'details' map.
> public ScaleVmCommand(String vmName, int cpus, Integer minSpeed, Integer 
> maxSpeed, long minRam, long maxRam, boolean limitCpuUse) {
> .....
> this.vm = new VirtualMachineTO(1L, vmName, null, cpus, minSpeed, maxSpeed, 
> minRam, maxRam, null, null, false, limitCpuUse, null);
> .....
> We need to pass these configuration parameters ("vmware.reserve.cpu", 
> "vmware.reserve.mem") to VMwareResource.java using VirtualMachineTO.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to