I'm studying resource management in cloud computing and I would like to know if is possible change the amount of resources (i.e. cpu numbers, memory size) allocated to a virtual machine.
Only machines with enough free resources can be used:
enough free CPU resources.
enough free RAM resources.
enabled datastore with enough free space to hold the virtual image.
Allocation Limits Management
Hard Limit: The maximum amount of virtual resources (RAM, virtual CPU, local hard disk, external storage, VLANs and public IPs) that a virtual datacenter will be allowed to consume.
Soft Limit: This limit is always lower than the hard limit and it is used to alert users. When a virtual datacenter reaches the soft limit, users will see a warning that they are reaching the resource allocation limits for their virtual datacenter.
When deploying a virtual appliance or a single virtual machine the user may see the following errors related to the scheduler logic.Not enough resources
In the virtual appliance's datacenter there isn't a physical machine with enough free resources for the virtual machine requirements.
Add some physical machines.
Increase the resources available in a physical machine.
Power off some virtual machines.
Resource allocation limits exceeded (Hard limits)
The configured Resource Allocation Limits. on the infrastructure do not allow the total resource utilization over the virtual machine requirements.
Power off some virtual machines or change the configured limits (0 for unlimited).
Increase the hard limits for the enterprise.
Resource allocation limits exceeded (Soft limits)
The configured Resource Allocation Limits. on the infrastructure allow the total resource utilization over the virtual machine requirements but alerts users that their resources are reaching the hard limit
Power off some virtual machines or change the configured limits (0 for unlimited).
Thanks a lot Badgujar but my question still remain: is possible (for a single virtual machine) change the resource allocation limits? For instance, is possible increase or decrease the soft limits during the machine execution?
If I read your question correctly, what you are really is asking is: is it possible for a running VM to change its own resource allocations independently, without human intervention or interaction?
It really depends on the particular virtualization tool that you are using, but the general answer is "no". This is not a good idea from a best practices standpoint.
Saiko, my doubt is about resource allocation for a running VM but not by its own initiative, i.e. by a external software component (for instance, a usage monitor).
Okay. As others have mentioned, this is done automatically through the configuration of soft and hard limits. You define initial resource allocations for a VM (soft), and define the conditions under which the VM manager will provide additional resources to the VM (e.g. CPU > 90% for 30 seconds). The VM manager will the provide resources as configured up to the hard resource allocation limits. The hard limits will never be exceeded.