I have a prolem when I change the VM-s cpu or ram settings ant restart the machine via java vCloud api.
I have two scenarios:
1.) change data with java vCloud API:
- power off the machine
- change processors
- power on the machine
After I do this the machine poweres on ok but is unreachable by SSH, even pinging the machine says host unreachable. Looks like some network problem.
2.) change data via vCloud Director WEB GUI:
- power off the machine
- change porcessor data
- power on the machine
After that the machine starts correctly and is reachable via SSH and ping.
The difference that I noticed looking the logs of vSphere Client is that in the second scenario the machine is reconfigured three times, in the first scenario only one time.
My Java code
_vapp.powerOff().waitForTask(0);
VM vm =_vapp.getChildrenVms().get(0);
VirtualCpu cpu = vm.getCpu();
cpu.setNoOfCpus(_instance.getCpu());
vm.updateCpu(cpu).waitForTask(0);
_vapp.powerOn().waitForTask(0);